aboutsummaryrefslogtreecommitdiffstats
path: root/util/libssl.num
diff options
context:
space:
mode:
authorBenjamin Kaduk <bkaduk@akamai.com>2017-01-23 17:03:16 -0600
committerRichard Levitte <levitte@openssl.org>2017-02-23 19:40:26 +0100
commit6b1bb98fad044a6f6b1aec9daee95d6cb450210e (patch)
tree6bfaa1b53f35d23f46da69059dfdda2f23686ea7 /util/libssl.num
parentddf972583439346cbaa99031fe8d3116018ba711 (diff)
downloadopenssl-6b1bb98fad044a6f6b1aec9daee95d6cb450210e.tar.gz
Add SSL_CTX early callback
Provide a callback interface that gives the application the ability to adjust the nascent SSL object at the earliest stage of ClientHello processing, immediately after extensions have been collected but before they have been processed. This is akin to BoringSSL's "select_certificate_cb" (though it is not API compatible), and as the name indicates, one major use is to examine the supplied server name indication and select what certificate to present to the client. However, it can also be used to make more sweeping configuration changes to the SSL object according to the selected server identity and configuration. That may include adjusting the permitted TLS versions, swapping out the SSL_CTX object (as is traditionally done in a tlsext_servername_callback), changing the server's cipher list, and more. We also wish to allow an early callback to indicate that it needs to perform additional work asynchronously and resume processing later. To that effect, refactor the second half of tls_process_client_hello() into a subroutine to be called at the post-processing stage (including the early callback itself), to allow the callback to result in remaining in the same work stage for a later call to succeed. This requires allocating for and storing the CLIENTHELLO_MSG in the SSL object to be preserved across such calls, but the storage is reclaimed after ClientHello processing finishes. Information about the CliehtHello is available to the callback by means of accessor functions that can only be used from the early callback. This allows extensions to make use of the existing internal parsing machinery without exposing structure internals (e.g., of PACKET), so that applications do not have to write fragile parsing code. Applications are encouraged to utilize an early callback and not use a servername_callback, in order to avoid unexpected behavior that occurs due to the relative order of processing between things like session resumption and the historical servername callback. Also tidy up nearby style by removing unnecessary braces around one-line conditional bodies. Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2279)
Diffstat (limited to 'util/libssl.num')
-rw-r--r--util/libssl.num8
1 files changed, 8 insertions, 0 deletions
diff --git a/util/libssl.num b/util/libssl.num
index 7f5100290b..20642ce758 100644
--- a/util/libssl.num
+++ b/util/libssl.num
@@ -416,3 +416,11 @@ SSL_get_peer_signature_type_nid 416 1_1_1 EXIST::FUNCTION:
SSL_key_update 417 1_1_1 EXIST::FUNCTION:
SSL_get_key_update_type 418 1_1_1 EXIST::FUNCTION:
SSL_bytes_to_cipher_list 419 1_1_1 EXIST::FUNCTION:
+SSL_early_get0_compression_methods 420 1_1_1 EXIST::FUNCTION:
+SSL_early_get0_ciphers 421 1_1_1 EXIST::FUNCTION:
+SSL_early_get0_ext 422 1_1_1 EXIST::FUNCTION:
+SSL_early_get0_session_id 423 1_1_1 EXIST::FUNCTION:
+SSL_early_get0_random 424 1_1_1 EXIST::FUNCTION:
+SSL_CTX_set_early_cb 425 1_1_1 EXIST::FUNCTION:
+SSL_early_get0_legacy_version 426 1_1_1 EXIST::FUNCTION:
+SSL_early_isv2 427 1_1_1 EXIST::FUNCTION: