Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/boringssl.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Benjamin <davidben@chromium.org>2014-09-25 00:27:30 +0400
committerAdam Langley <agl@google.com>2014-10-01 02:58:59 +0400
commit5b33a5e0dd7f1660a2f3f5569c7fb6e3675972db (patch)
tree8046e9a4c5937d520b401566f774edfaa3577c04 /ssl/s3_srvr.c
parenta9ca90abbb8e0324372a91dd1e1d8ef51a1ac91c (diff)
Merge the get_ssl_method hooks between TLS and SSLv3.
Remove one more difference to worry about switching between TLS and SSLv3 method tables. Although this does change the get_ssl_method hook for the version-specific tables (before TLS and SSLv3 would be somewhat partitioned), it does not appear to do anything. get_ssl_method is only ever called in SSL_set_session for client session resumption. Either you're using the version-specific method tables and don't know about other versions anyway or you're using SSLv23 and don't partition TLS vs SSL3 anyway. BUG=chromium:403378 Change-Id: I8cbdf02847653a01b04dbbcaf61fcb3fa4753a99 Reviewed-on: https://boringssl-review.googlesource.com/1842 Reviewed-by: Adam Langley <agl@google.com>
Diffstat (limited to 'ssl/s3_srvr.c')
-rw-r--r--ssl/s3_srvr.c37
1 files changed, 31 insertions, 6 deletions
diff --git a/ssl/s3_srvr.c b/ssl/s3_srvr.c
index 3b2ab764..b355f5bc 100644
--- a/ssl/s3_srvr.c
+++ b/ssl/s3_srvr.c
@@ -171,16 +171,41 @@
#include "ssl_locl.h"
#include "../crypto/dh/internal.h"
-static const SSL_METHOD *ssl3_get_server_method(int ver);
-
static const SSL_METHOD *ssl3_get_server_method(int ver)
{
- if (ver == SSL3_VERSION)
- return(SSLv3_server_method());
- else
- return(NULL);
+ switch (ver)
+ {
+ case TLS1_2_VERSION:
+ return TLSv1_2_server_method();
+ case TLS1_1_VERSION:
+ return TLSv1_1_server_method();
+ case TLS1_VERSION:
+ return TLSv1_server_method();
+ case SSL3_VERSION:
+ return SSLv3_server_method();
+ default:
+ return NULL;
+ }
}
+IMPLEMENT_tls_meth_func(TLS1_2_VERSION, TLSv1_2_server_method,
+ ssl3_accept,
+ ssl_undefined_function,
+ ssl3_get_server_method,
+ TLSv1_2_enc_data)
+
+IMPLEMENT_tls_meth_func(TLS1_1_VERSION, TLSv1_1_server_method,
+ ssl3_accept,
+ ssl_undefined_function,
+ ssl3_get_server_method,
+ TLSv1_1_enc_data)
+
+IMPLEMENT_tls_meth_func(TLS1_VERSION, TLSv1_server_method,
+ ssl3_accept,
+ ssl_undefined_function,
+ ssl3_get_server_method,
+ TLSv1_enc_data)
+
IMPLEMENT_tls_meth_func(SSL3_VERSION, SSLv3_server_method,
ssl3_accept,
ssl_undefined_function,