aboutsummaryrefslogtreecommitdiff
path: root/ssl/statem/statem_locl.h
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2016-12-01 15:21:08 +0000
committerMatt Caswell <matt@openssl.org>2017-01-06 10:25:13 +0000
commitf97d4c370844081e5e735711bd8b91979313ce7b (patch)
treee9eace1eb687853ffa00535ce9d55f2f90deb1ed /ssl/statem/statem_locl.h
parent30aeba432c99d2642bec89505fb9922518979214 (diff)
downloadopenssl-f97d4c370844081e5e735711bd8b91979313ce7b.zip
openssl-f97d4c370844081e5e735711bd8b91979313ce7b.tar.gz
openssl-f97d4c370844081e5e735711bd8b91979313ce7b.tar.bz2
Extends extension parsing to take the Certificate
Continuing from the previous commit we also need to extend the extensions framework to supply the Certificate we just read during parsing. Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2020)
Diffstat (limited to 'ssl/statem/statem_locl.h')
-rw-r--r--ssl/statem/statem_locl.h73
1 files changed, 45 insertions, 28 deletions
diff --git a/ssl/statem/statem_locl.h b/ssl/statem/statem_locl.h
index 7e34aad..5fa190a 100644
--- a/ssl/statem/statem_locl.h
+++ b/ssl/statem/statem_locl.h
@@ -156,37 +156,47 @@ __owur int tls_construct_new_session_ticket(SSL *s, WPACKET *pkt);
__owur int tls_collect_extensions(SSL *s, PACKET *packet, unsigned int context,
RAW_EXTENSION **res, int *al);
__owur int tls_parse_extension(SSL *s, TLSEXT_INDEX idx, int context,
- RAW_EXTENSION *exts, int *al);
+ RAW_EXTENSION *exts, X509 *x, size_t chain,
+ int *al);
__owur int tls_parse_all_extensions(SSL *s, int context, RAW_EXTENSION *exts,
- int *al);
+ X509 *x, size_t chain, int *al);
__owur int tls_construct_extensions(SSL *s, WPACKET *pkt, unsigned int context,
X509 *x, size_t chain, int *al);
/* Server Extension processing */
-int tls_parse_ctos_renegotiate(SSL *s, PACKET *pkt, int *al);
-int tls_parse_ctos_server_name(SSL *s, PACKET *pkt, int *al);
+int tls_parse_ctos_renegotiate(SSL *s, PACKET *pkt, X509 *x, size_t chain,
+ int *al);
+int tls_parse_ctos_server_name(SSL *s, PACKET *pkt, X509 *x, size_t chain,
+ int *al);
#ifndef OPENSSL_NO_SRP
-int tls_parse_ctos_srp(SSL *s, PACKET *pkt, int *al);
+int tls_parse_ctos_srp(SSL *s, PACKET *pkt, X509 *x, size_t chain, int *al);
#endif
#ifndef OPENSSL_NO_EC
-int tls_parse_ctos_ec_pt_formats(SSL *s, PACKET *pkt, int *al);
-int tls_parse_ctos_supported_groups(SSL *s, PACKET *pkt, int *al);
+int tls_parse_ctos_ec_pt_formats(SSL *s, PACKET *pkt, X509 *x, size_t chain,
+ int *al);
+int tls_parse_ctos_supported_groups(SSL *s, PACKET *pkt, X509 *x, size_t chain,
+ int *al);
#endif
-int tls_parse_ctos_session_ticket(SSL *s, PACKET *pkt, int *al);
-int tls_parse_ctos_sig_algs(SSL *s, PACKET *pkt, int *al);
+int tls_parse_ctos_session_ticket(SSL *s, PACKET *pkt, X509 *x, size_t chain,
+ int *al);
+int tls_parse_ctos_sig_algs(SSL *s, PACKET *pkt, X509 *x, size_t chain,
+ int *al);
#ifndef OPENSSL_NO_OCSP
-int tls_parse_ctos_status_request(SSL *s, PACKET *pkt, int *al);
+int tls_parse_ctos_status_request(SSL *s, PACKET *pkt, X509 *x, size_t chain,
+ int *al);
#endif
#ifndef OPENSSL_NO_NEXTPROTONEG
-int tls_parse_ctos_npn(SSL *s, PACKET *pkt, int *al);
+int tls_parse_ctos_npn(SSL *s, PACKET *pkt, X509 *x, size_t chain, int *al);
#endif
-int tls_parse_ctos_alpn(SSL *s, PACKET *pkt, int *al);
+int tls_parse_ctos_alpn(SSL *s, PACKET *pkt, X509 *x, size_t chain, int *al);
#ifndef OPENSSL_NO_SRTP
-int tls_parse_ctos_use_srtp(SSL *s, PACKET *pkt, int *al);
+int tls_parse_ctos_use_srtp(SSL *s, PACKET *pkt, X509 *x, size_t chain,
+ int *al);
#endif
-int tls_parse_ctos_etm(SSL *s, PACKET *pkt, int *al);
-int tls_parse_ctos_key_share(SSL *s, PACKET *pkt, int *al);
-int tls_parse_ctos_ems(SSL *s, PACKET *pkt, int *al);
+int tls_parse_ctos_etm(SSL *s, PACKET *pkt, X509 *x, size_t chain, int *al);
+int tls_parse_ctos_key_share(SSL *s, PACKET *pkt, X509 *x, size_t chain,
+ int *al);
+int tls_parse_ctos_ems(SSL *s, PACKET *pkt, X509 *x, size_t chain, int *al);
int tls_construct_stoc_renegotiate(SSL *s, WPACKET *pkt, X509 *x, size_t chain,
int *al);
@@ -273,25 +283,32 @@ int tls_construct_ctos_key_share(SSL *s, WPACKET *pkt, X509 *x, size_t chain,
int *al);
int tls_construct_ctos_padding(SSL *s, WPACKET *pkt, X509 *x, size_t chain,
int *al);
-int tls_parse_stoc_renegotiate(SSL *s, PACKET *pkt, int *al);
-int tls_parse_stoc_server_name(SSL *s, PACKET *pkt, int *al);
+int tls_parse_stoc_renegotiate(SSL *s, PACKET *pkt, X509 *x, size_t chain,
+ int *al);
+int tls_parse_stoc_server_name(SSL *s, PACKET *pkt, X509 *x, size_t chain,
+ int *al);
#ifndef OPENSSL_NO_EC
-int tls_parse_stoc_ec_pt_formats(SSL *s, PACKET *pkt, int *al);
+int tls_parse_stoc_ec_pt_formats(SSL *s, PACKET *pkt, X509 *x, size_t chain,
+ int *al);
#endif
-int tls_parse_stoc_session_ticket(SSL *s, PACKET *pkt, int *al);
+int tls_parse_stoc_session_ticket(SSL *s, PACKET *pkt, X509 *x, size_t chain,
+ int *al);
#ifndef OPENSSL_NO_OCSP
-int tls_parse_stoc_status_request(SSL *s, PACKET *pkt, int *al);
+int tls_parse_stoc_status_request(SSL *s, PACKET *pkt, X509 *x, size_t chain,
+ int *al);
#endif
#ifndef OPENSSL_NO_CT
-int tls_parse_stoc_sct(SSL *s, PACKET *pkt, int *al);
+int tls_parse_stoc_sct(SSL *s, PACKET *pkt, X509 *x, size_t chain, int *al);
#endif
#ifndef OPENSSL_NO_NEXTPROTONEG
-int tls_parse_stoc_npn(SSL *s, PACKET *pkt, int *al);
+int tls_parse_stoc_npn(SSL *s, PACKET *pkt, X509 *x, size_t chain, int *al);
#endif
-int tls_parse_stoc_alpn(SSL *s, PACKET *pkt, int *al);
+int tls_parse_stoc_alpn(SSL *s, PACKET *pkt, X509 *x, size_t chain, int *al);
#ifndef OPENSSL_NO_SRTP
-int tls_parse_stoc_use_srtp(SSL *s, PACKET *pkt, int *al);
+int tls_parse_stoc_use_srtp(SSL *s, PACKET *pkt, X509 *x, size_t chain,
+ int *al);
#endif
-int tls_parse_stoc_etm(SSL *s, PACKET *pkt, int *al);
-int tls_parse_stoc_ems(SSL *s, PACKET *pkt, int *al);
-int tls_parse_stoc_key_share(SSL *s, PACKET *pkt, int *al);
+int tls_parse_stoc_etm(SSL *s, PACKET *pkt, X509 *x, size_t chain, int *al);
+int tls_parse_stoc_ems(SSL *s, PACKET *pkt, X509 *x, size_t chain, int *al);
+int tls_parse_stoc_key_share(SSL *s, PACKET *pkt, X509 *x, size_t chain,
+ int *al);