diff options
Diffstat (limited to 'lib/libssl/t1_meth.c')
-rw-r--r-- | lib/libssl/t1_meth.c | 125 |
1 files changed, 116 insertions, 9 deletions
diff --git a/lib/libssl/t1_meth.c b/lib/libssl/t1_meth.c index 49fe9624a28..b39303b369f 100644 --- a/lib/libssl/t1_meth.c +++ b/lib/libssl/t1_meth.c @@ -60,6 +60,122 @@ #include <openssl/objects.h> #include "ssl_locl.h" +static const SSL_METHOD *tls1_get_method(int ver); + +const SSL_METHOD TLSv1_method_data = { + .version = TLS1_VERSION, + .ssl_new = tls1_new, + .ssl_clear = tls1_clear, + .ssl_free = tls1_free, + .ssl_accept = ssl3_accept, + .ssl_connect = ssl3_connect, + .ssl_read = ssl3_read, + .ssl_peek = ssl3_peek, + .ssl_write = ssl3_write, + .ssl_shutdown = ssl3_shutdown, + .ssl_renegotiate = ssl3_renegotiate, + .ssl_renegotiate_check = ssl3_renegotiate_check, + .ssl_get_message = ssl3_get_message, + .ssl_read_bytes = ssl3_read_bytes, + .ssl_write_bytes = ssl3_write_bytes, + .ssl_dispatch_alert = ssl3_dispatch_alert, + .ssl_ctrl = ssl3_ctrl, + .ssl_ctx_ctrl = ssl3_ctx_ctrl, + .get_cipher_by_char = ssl3_get_cipher_by_char, + .put_cipher_by_char = ssl3_put_cipher_by_char, + .ssl_pending = ssl3_pending, + .num_ciphers = ssl3_num_ciphers, + .get_cipher = ssl3_get_cipher, + .get_ssl_method = tls1_get_method, + .get_timeout = tls1_default_timeout, + .ssl3_enc = &TLSv1_enc_data, + .ssl_version = ssl_undefined_void_function, + .ssl_callback_ctrl = ssl3_callback_ctrl, + .ssl_ctx_callback_ctrl = ssl3_ctx_callback_ctrl, +}; + +const SSL_METHOD TLSv1_1_method_data = { + .version = TLS1_1_VERSION, + .ssl_new = tls1_new, + .ssl_clear = tls1_clear, + .ssl_free = tls1_free, + .ssl_accept = ssl3_accept, + .ssl_connect = ssl3_connect, + .ssl_read = ssl3_read, + .ssl_peek = ssl3_peek, + .ssl_write = ssl3_write, + .ssl_shutdown = ssl3_shutdown, + .ssl_renegotiate = ssl3_renegotiate, + .ssl_renegotiate_check = ssl3_renegotiate_check, + .ssl_get_message = ssl3_get_message, + .ssl_read_bytes = ssl3_read_bytes, + .ssl_write_bytes = ssl3_write_bytes, + .ssl_dispatch_alert = ssl3_dispatch_alert, + .ssl_ctrl = ssl3_ctrl, + .ssl_ctx_ctrl = ssl3_ctx_ctrl, + .get_cipher_by_char = ssl3_get_cipher_by_char, + .put_cipher_by_char = ssl3_put_cipher_by_char, + .ssl_pending = ssl3_pending, + .num_ciphers = ssl3_num_ciphers, + .get_cipher = ssl3_get_cipher, + .get_ssl_method = tls1_get_method, + .get_timeout = tls1_default_timeout, + .ssl3_enc = &TLSv1_enc_data, + .ssl_version = ssl_undefined_void_function, + .ssl_callback_ctrl = ssl3_callback_ctrl, + .ssl_ctx_callback_ctrl = ssl3_ctx_callback_ctrl, +}; + +const SSL_METHOD TLSv1_2_method_data = { + .version = TLS1_2_VERSION, + .ssl_new = tls1_new, + .ssl_clear = tls1_clear, + .ssl_free = tls1_free, + .ssl_accept = ssl3_accept, + .ssl_connect = ssl3_connect, + .ssl_read = ssl3_read, + .ssl_peek = ssl3_peek, + .ssl_write = ssl3_write, + .ssl_shutdown = ssl3_shutdown, + .ssl_renegotiate = ssl3_renegotiate, + .ssl_renegotiate_check = ssl3_renegotiate_check, + .ssl_get_message = ssl3_get_message, + .ssl_read_bytes = ssl3_read_bytes, + .ssl_write_bytes = ssl3_write_bytes, + .ssl_dispatch_alert = ssl3_dispatch_alert, + .ssl_ctrl = ssl3_ctrl, + .ssl_ctx_ctrl = ssl3_ctx_ctrl, + .get_cipher_by_char = ssl3_get_cipher_by_char, + .put_cipher_by_char = ssl3_put_cipher_by_char, + .ssl_pending = ssl3_pending, + .num_ciphers = ssl3_num_ciphers, + .get_cipher = ssl3_get_cipher, + .get_ssl_method = tls1_get_method, + .get_timeout = tls1_default_timeout, + .ssl3_enc = &TLSv1_enc_data, + .ssl_version = ssl_undefined_void_function, + .ssl_callback_ctrl = ssl3_callback_ctrl, + .ssl_ctx_callback_ctrl = ssl3_ctx_callback_ctrl, +}; + +const SSL_METHOD * +TLSv1_method(void) +{ + return &TLSv1_method_data; +} + +const SSL_METHOD * +TLSv1_1_method(void) +{ + return &TLSv1_1_method_data; +} + +const SSL_METHOD * +TLSv1_2_method(void) +{ + return &TLSv1_2_method_data; +} + static const SSL_METHOD * tls1_get_method(int ver) { @@ -71,12 +187,3 @@ tls1_get_method(int ver) return (TLSv1_method()); return (NULL); } - -IMPLEMENT_tls_meth_func(TLS1_2_VERSION, TLSv1_2_method, - ssl3_accept, ssl3_connect, tls1_get_method) - -IMPLEMENT_tls_meth_func(TLS1_1_VERSION, TLSv1_1_method, - ssl3_accept, ssl3_connect, tls1_get_method) - -IMPLEMENT_tls_meth_func(TLS1_VERSION, TLSv1_method, - ssl3_accept, ssl3_connect, tls1_get_method) |