summaryrefslogtreecommitdiff
path: root/lib/libssl/src/ssl/t1_srvr.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libssl/src/ssl/t1_srvr.c')
-rw-r--r--lib/libssl/src/ssl/t1_srvr.c123
1 files changed, 114 insertions, 9 deletions
diff --git a/lib/libssl/src/ssl/t1_srvr.c b/lib/libssl/src/ssl/t1_srvr.c
index 01220072f1a..d38afc5a21c 100644
--- a/lib/libssl/src/ssl/t1_srvr.c
+++ b/lib/libssl/src/ssl/t1_srvr.c
@@ -66,6 +66,120 @@
static const SSL_METHOD *tls1_get_server_method(int ver);
+const SSL_METHOD TLSv1_server_method_data = {
+ .version = TLS1_VERSION,
+ .ssl_new = tls1_new,
+ .ssl_clear = tls1_clear,
+ .ssl_free = tls1_free,
+ .ssl_accept = ssl3_accept,
+ .ssl_connect = ssl_undefined_function,
+ .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_server_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_server_method_data = {
+ .version = TLS1_1_VERSION,
+ .ssl_new = tls1_new,
+ .ssl_clear = tls1_clear,
+ .ssl_free = tls1_free,
+ .ssl_accept = ssl3_accept,
+ .ssl_connect = ssl_undefined_function,
+ .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_server_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_server_method_data = {
+ .version = TLS1_2_VERSION,
+ .ssl_new = tls1_new,
+ .ssl_clear = tls1_clear,
+ .ssl_free = tls1_free,
+ .ssl_accept = ssl3_accept,
+ .ssl_connect = ssl_undefined_function,
+ .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_server_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_server_method(void)
+{
+ return &TLSv1_server_method_data;
+}
+
+const SSL_METHOD *
+TLSv1_1_server_method(void)
+{
+ return &TLSv1_1_server_method_data;
+}
+
+const SSL_METHOD *
+TLSv1_2_server_method(void)
+{
+ return &TLSv1_2_server_method_data;
+}
+
static const SSL_METHOD *
tls1_get_server_method(int ver)
{
@@ -77,12 +191,3 @@ tls1_get_server_method(int ver)
return (TLSv1_server_method());
return (NULL);
}
-
-IMPLEMENT_tls_meth_func(TLS1_2_VERSION, TLSv1_2_server_method,
- ssl3_accept, ssl_undefined_function, tls1_get_server_method)
-
-IMPLEMENT_tls_meth_func(TLS1_1_VERSION, TLSv1_1_server_method,
- ssl3_accept, ssl_undefined_function, tls1_get_server_method)
-
-IMPLEMENT_tls_meth_func(TLS1_VERSION, TLSv1_server_method,
- ssl3_accept, ssl_undefined_function, tls1_get_server_method)