X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=blobdiff_plain;f=ssl%2Fssl_locl.h;h=c18fec33a6f1aa900fe2196f9267afe14ca921e5;hp=e068fd102ef9a2951556e5bb3a94b2ea2963c83e;hb=d270de322c7bfb9c1e7509fbc24e3bf6fde713e6;hpb=ab83e31414286ccdc35fbacf976f64a910a6c718 diff --git a/ssl/ssl_locl.h b/ssl/ssl_locl.h index e068fd102e..c18fec33a6 100644 --- a/ssl/ssl_locl.h +++ b/ssl/ssl_locl.h @@ -1636,14 +1636,41 @@ typedef struct ssl3_comp_st { # endif typedef struct raw_extension_st { - /* The type of the extension */ - unsigned int type; /* Raw packet data for the extension */ PACKET data; + /* Set to 1 if the extension is present or 0 otherwise */ + int present; /* Set to 1 if we have already parsed the extension or 0 otherwise */ int parsed; + /* The type of this extension */ + unsigned int type; } RAW_EXTENSION; +/* + * Extension index values NOTE: Any updates to these defines should be mirrored + * with equivalent updates to ext_defs in extensions.c + */ +typedef enum tlsext_index_en { + TLSEXT_IDX_renegotiate, + TLSEXT_IDX_server_name, + TLSEXT_IDX_srp, + TLSEXT_IDX_ec_point_formats, + TLSEXT_IDX_supported_groups, + TLSEXT_IDX_session_ticket, + TLSEXT_IDX_signature_algorithms, + TLSEXT_IDX_status_request, + TLSEXT_IDX_next_proto_neg, + TLSEXT_IDX_application_layer_protocol_negotiation, + TLSEXT_IDX_use_srtp, + TLSEXT_IDX_encrypt_then_mac, + TLSEXT_IDX_signed_certificate_timestamp, + TLSEXT_IDX_extended_master_secret, + TLSEXT_IDX_supported_versions, + TLSEXT_IDX_key_share, + TLSEXT_IDX_cryptopro_bug, + TLSEXT_IDX_padding +} TLSEXT_INDEX; + #define MAX_COMPRESSIONS_SIZE 255 typedef struct { @@ -1658,7 +1685,6 @@ typedef struct { size_t compressions_len; unsigned char compressions[MAX_COMPRESSIONS_SIZE]; PACKET extensions; - size_t num_extensions; RAW_EXTENSION *pre_proc_exts; } CLIENTHELLO_MSG; @@ -2079,8 +2105,6 @@ __owur int tls1_get_curvelist(SSL *s, int sess, const unsigned char **pcurves, void ssl_set_default_md(SSL *s); __owur int tls1_set_server_sigalgs(SSL *s); -__owur int ssl_check_clienthello_tlsext_late(SSL *s, int *al); -__owur int ssl_parse_serverhello_tlsext(SSL *s, PACKET *pkt); __owur RAW_EXTENSION *tls_get_extension_by_type(RAW_EXTENSION *exts, size_t numexts, unsigned int type);