Merge IMPLEMENT_tls_meth_func and IMPLEMENT_ssl3_meth_func.
The TLS-specific hooks have been removed. We aim to no longer perform version negotiation as a pre-processing step, so ensure the only differences to worry about are the version, get_method hook, and the enc_data. BUG=chromium:403378 Change-Id: I628ec6f4c50ceed01d7af8f4110b6dc95cfbe023 Reviewed-on: https://boringssl-review.googlesource.com/1841 Reviewed-by: Adam Langley <agl@google.com>
This commit is contained in:
parent
968ddc91fa
commit
00075b80ca
@ -175,10 +175,11 @@ static const SSL_METHOD *ssl3_get_client_method(int ver)
|
||||
return(NULL);
|
||||
}
|
||||
|
||||
IMPLEMENT_ssl3_meth_func(SSLv3_client_method,
|
||||
IMPLEMENT_tls_meth_func(SSL3_VERSION, SSLv3_client_method,
|
||||
ssl_undefined_function,
|
||||
ssl3_connect,
|
||||
ssl3_get_client_method)
|
||||
ssl3_get_client_method,
|
||||
SSLv3_enc_data)
|
||||
|
||||
int ssl3_connect(SSL *s)
|
||||
{
|
||||
|
@ -71,7 +71,8 @@ static const SSL_METHOD *ssl3_get_method(int ver)
|
||||
return(NULL);
|
||||
}
|
||||
|
||||
IMPLEMENT_ssl3_meth_func(SSLv3_method,
|
||||
ssl3_accept,
|
||||
ssl3_connect,
|
||||
ssl3_get_method)
|
||||
IMPLEMENT_tls_meth_func(SSL3_VERSION, SSLv3_method,
|
||||
ssl3_accept,
|
||||
ssl3_connect,
|
||||
ssl3_get_method,
|
||||
SSLv3_enc_data)
|
||||
|
@ -181,10 +181,11 @@ static const SSL_METHOD *ssl3_get_server_method(int ver)
|
||||
return(NULL);
|
||||
}
|
||||
|
||||
IMPLEMENT_ssl3_meth_func(SSLv3_server_method,
|
||||
IMPLEMENT_tls_meth_func(SSL3_VERSION, SSLv3_server_method,
|
||||
ssl3_accept,
|
||||
ssl_undefined_function,
|
||||
ssl3_get_server_method)
|
||||
ssl3_get_server_method,
|
||||
SSLv3_enc_data)
|
||||
|
||||
int ssl3_accept(SSL *s)
|
||||
{
|
||||
|
@ -685,40 +685,6 @@ const SSL_METHOD *func_name(void) \
|
||||
return &func_name##_data; \
|
||||
}
|
||||
|
||||
#define IMPLEMENT_ssl3_meth_func(func_name, s_accept, s_connect, s_get_meth) \
|
||||
const SSL_METHOD *func_name(void) \
|
||||
{ \
|
||||
static const SSL_METHOD func_name##_data= { \
|
||||
SSL3_VERSION, \
|
||||
ssl3_new, \
|
||||
ssl3_clear, \
|
||||
ssl3_free, \
|
||||
s_accept, \
|
||||
s_connect, \
|
||||
ssl3_read, \
|
||||
ssl3_peek, \
|
||||
ssl3_write, \
|
||||
ssl3_shutdown, \
|
||||
ssl3_renegotiate, \
|
||||
ssl3_renegotiate_check, \
|
||||
ssl3_get_message, \
|
||||
ssl3_read_bytes, \
|
||||
ssl3_write_bytes, \
|
||||
ssl3_dispatch_alert, \
|
||||
ssl3_ctrl, \
|
||||
ssl3_ctx_ctrl, \
|
||||
ssl3_pending, \
|
||||
ssl3_num_ciphers, \
|
||||
ssl3_get_cipher, \
|
||||
s_get_meth, \
|
||||
&SSLv3_enc_data, \
|
||||
ssl_undefined_void_function, \
|
||||
ssl3_callback_ctrl, \
|
||||
ssl3_ctx_callback_ctrl, \
|
||||
}; \
|
||||
return &func_name##_data; \
|
||||
}
|
||||
|
||||
#define IMPLEMENT_ssl23_meth_func(func_name, s_accept, s_connect, s_get_meth) \
|
||||
const SSL_METHOD *func_name(void) \
|
||||
{ \
|
||||
|
Loading…
Reference in New Issue
Block a user