diff options
author | David Benjamin <davidben@google.com> | 2017-09-07 18:39:40 -0400 |
---|---|---|
committer | Benjamin Kaduk <kaduk@mit.edu> | 2017-09-08 13:58:59 -0500 |
commit | a9c0d8beeae98355a2ef6ae1f0a9ba624be8bd54 (patch) | |
tree | b5b288d32bfa9463542350a0bfc7d20c394b0e08 /include | |
parent | 4e049e2c3658ee2bc6e63e696a3779d2f9eed377 (diff) | |
download | openssl-a9c0d8beeae98355a2ef6ae1f0a9ba624be8bd54.tar.gz |
Rename SSL_CTX_set_early_cb to SSL_CTX_set_client_hello_cb.
"Early callback" is a little ambiguous now that early data exists.
Perhaps "ClientHello callback"?
Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Ben Kaduk <kaduk@mit.edu>
(Merged from https://github.com/openssl/openssl/pull/4349)
Diffstat (limited to 'include')
-rw-r--r-- | include/openssl/ssl.h | 44 |
1 files changed, 23 insertions, 21 deletions
diff --git a/include/openssl/ssl.h b/include/openssl/ssl.h index da1fa0ff35..45d0083c58 100644 --- a/include/openssl/ssl.h +++ b/include/openssl/ssl.h @@ -844,16 +844,16 @@ __owur int SSL_extension_supported(unsigned int ext_type); # define SSL_X509_LOOKUP 4 # define SSL_ASYNC_PAUSED 5 # define SSL_ASYNC_NO_JOBS 6 -# define SSL_EARLY_WORK 7 +# define SSL_CLIENT_HELLO_CB 7 /* These will only be used when doing non-blocking IO */ -# define SSL_want_nothing(s) (SSL_want(s) == SSL_NOTHING) -# define SSL_want_read(s) (SSL_want(s) == SSL_READING) -# define SSL_want_write(s) (SSL_want(s) == SSL_WRITING) -# define SSL_want_x509_lookup(s) (SSL_want(s) == SSL_X509_LOOKUP) -# define SSL_want_async(s) (SSL_want(s) == SSL_ASYNC_PAUSED) -# define SSL_want_async_job(s) (SSL_want(s) == SSL_ASYNC_NO_JOBS) -# define SSL_want_early(s) (SSL_want(s) == SSL_EARLY_WORK) +# define SSL_want_nothing(s) (SSL_want(s) == SSL_NOTHING) +# define SSL_want_read(s) (SSL_want(s) == SSL_READING) +# define SSL_want_write(s) (SSL_want(s) == SSL_WRITING) +# define SSL_want_x509_lookup(s) (SSL_want(s) == SSL_X509_LOOKUP) +# define SSL_want_async(s) (SSL_want(s) == SSL_ASYNC_PAUSED) +# define SSL_want_async_job(s) (SSL_want(s) == SSL_ASYNC_NO_JOBS) +# define SSL_want_client_hello_cb(s) (SSL_want(s) == SSL_CLIENT_HELLO_CB) # define SSL_MAC_FLAG_READ_MAC_STREAM 1 # define SSL_MAC_FLAG_WRITE_MAC_STREAM 2 @@ -1135,7 +1135,7 @@ DECLARE_PEM_rw(SSL_SESSION, SSL_SESSION) # define SSL_ERROR_WANT_ACCEPT 8 # define SSL_ERROR_WANT_ASYNC 9 # define SSL_ERROR_WANT_ASYNC_JOB 10 -# define SSL_ERROR_WANT_EARLY 11 +# define SSL_ERROR_WANT_CLIENT_HELLO_CB 11 # define SSL_CTRL_SET_TMP_DH 3 # define SSL_CTRL_SET_TMP_ECDH 4 # define SSL_CTRL_SET_TMP_DH_CB 6 @@ -1697,19 +1697,21 @@ __owur char *SSL_get_srp_userinfo(SSL *s); # endif /* - * Early callback and helpers. + * ClientHello callback and helpers. */ -typedef int (*SSL_early_cb_fn) (SSL *s, int *al, void *arg); -void SSL_CTX_set_early_cb(SSL_CTX *c, SSL_early_cb_fn cb, void *arg); -int SSL_early_isv2(SSL *s); -unsigned int SSL_early_get0_legacy_version(SSL *s); -size_t SSL_early_get0_random(SSL *s, const unsigned char **out); -size_t SSL_early_get0_session_id(SSL *s, const unsigned char **out); -size_t SSL_early_get0_ciphers(SSL *s, const unsigned char **out); -size_t SSL_early_get0_compression_methods(SSL *s, const unsigned char **out); -int SSL_early_get1_extensions_present(SSL *s, int **out, size_t *outlen); -int SSL_early_get0_ext(SSL *s, unsigned int type, const unsigned char **out, - size_t *outlen); +typedef int (*SSL_client_hello_cb_fn) (SSL *s, int *al, void *arg); +void SSL_CTX_set_client_hello_cb(SSL_CTX *c, SSL_client_hello_cb_fn cb, + void *arg); +int SSL_client_hello_isv2(SSL *s); +unsigned int SSL_client_hello_get0_legacy_version(SSL *s); +size_t SSL_client_hello_get0_random(SSL *s, const unsigned char **out); +size_t SSL_client_hello_get0_session_id(SSL *s, const unsigned char **out); +size_t SSL_client_hello_get0_ciphers(SSL *s, const unsigned char **out); +size_t SSL_client_hello_get0_compression_methods(SSL *s, + const unsigned char **out); +int SSL_client_hello_get1_extensions_present(SSL *s, int **out, size_t *outlen); +int SSL_client_hello_get0_ext(SSL *s, unsigned int type, + const unsigned char **out, size_t *outlen); void SSL_certs_clear(SSL *s); void SSL_free(SSL *ssl); |