summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorBenjamin Kaduk <bkaduk@akamai.com>2017-08-01 15:28:14 -0500
committerBenjamin Kaduk <kaduk@mit.edu>2017-08-15 10:52:21 -0500
commit0aed6e449da5f06a23fd191bb86bfdd71bde6f9c (patch)
treee31f4434d478de9232454cefc7ccf769ebdb8c16 /include
parent5626f634c31cfde48ccbbee243be29e0eb77171e (diff)
Add SSL_get_pending_cipher()
The existing function SSL_get_current_cipher() queries the current session for the ciphersuite in use, but there is no way for application code to determine what ciphersuite has been negotiated and will be used in the future, prior to ChangeCipherState (or the TLS 1.3 equivalent) causing the new cipher to take effect and become visible in the session information. Expose this information to appropriate application callbacks to use during the handshake. The name SSL_get_pending_cipher() was chosen for compatibility with BoringSSL's routine of that name. Improve the note on macro implementations in SSL_get_current_cipher.pod while here. Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/4070)
Diffstat (limited to 'include')
-rw-r--r--include/openssl/ssl.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/openssl/ssl.h b/include/openssl/ssl.h
index b4c66441c2..04388817b6 100644
--- a/include/openssl/ssl.h
+++ b/include/openssl/ssl.h
@@ -1430,6 +1430,7 @@ __owur int SSL_clear(SSL *s);
void SSL_CTX_flush_sessions(SSL_CTX *ctx, long tm);
__owur const SSL_CIPHER *SSL_get_current_cipher(const SSL *s);
+__owur const SSL_CIPHER *SSL_get_pending_cipher(const SSL *s);
__owur int SSL_CIPHER_get_bits(const SSL_CIPHER *c, int *alg_bits);
__owur const char *SSL_CIPHER_get_version(const SSL_CIPHER *c);
__owur const char *SSL_CIPHER_get_name(const SSL_CIPHER *c);