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>
diff --git a/ssl/s3_srvr.c b/ssl/s3_srvr.c
index 3b2ab76..b355f5b 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,