diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2014-08-05 15:21:36 +0100 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2014-08-28 17:06:50 +0100 |
commit | da67a0ae3462f6c6447ed841a9ec514077244b02 (patch) | |
tree | 83c6ede13bdfa499ce877a4515d54994d769f95a /ssl/ssl_locl.h | |
parent | 9a9b0c0401cae443f115ff19921d347b20aa396b (diff) |
Revision of custom extension code.
Move custom extension structures from SSL_CTX to CERT structure.
This change means the form can be revised in future without binary
compatibility issues. Also since CERT is part of SSL structures
so per-SSL custom extensions could be supported in future as well as
per SSL_CTX.
Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Emilia Käsper <emilia@openssl.org>
(cherry picked from commit b83294fe3022b9d5d525ccdcfeb53d39c25b05bd)
Conflicts:
ssl/ssl.h
ssl/ssl_cert.c
ssl/ssl_locl.h
Diffstat (limited to 'ssl/ssl_locl.h')
-rw-r--r-- | ssl/ssl_locl.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/ssl/ssl_locl.h b/ssl/ssl_locl.h index 91d55f82c3..655bca1231 100644 --- a/ssl/ssl_locl.h +++ b/ssl/ssl_locl.h @@ -526,6 +526,20 @@ typedef struct cert_pkey_st #define SSL_CERT_FLAGS_CHECK_TLS_STRICT \ (SSL_CERT_FLAG_SUITEB_128_LOS|SSL_CERT_FLAG_TLS_STRICT) +typedef struct { + unsigned short ext_type; + custom_cli_ext_first_cb_fn fn1; + custom_cli_ext_second_cb_fn fn2; + void *arg; +} custom_cli_ext_record; + +typedef struct { + unsigned short ext_type; + custom_srv_ext_first_cb_fn fn1; + custom_srv_ext_second_cb_fn fn2; + void *arg; +} custom_srv_ext_record; + typedef struct cert_st { /* Current active set */ @@ -621,6 +635,12 @@ typedef struct cert_st unsigned char *ciphers_raw; size_t ciphers_rawlen; + /* Arrays containing the callbacks for custom TLS Extensions. */ + custom_cli_ext_record *custom_cli_ext_records; + size_t custom_cli_ext_records_count; + custom_srv_ext_record *custom_srv_ext_records; + size_t custom_srv_ext_records_count; + int references; /* >1 only if SSL_copy_session_id is used */ } CERT; |