Rename (s3,d1)_meth.c.

These are where the DTLS- and TLS-specific transport layer hooks will be
defined. Later we can probably move much of the implementations of these
hooks into these files so those functions can be static.

While I'm here, fix up the naming of some constants.

Change-Id: I1009dd9fdc3cc4fd49fbff0802f6289931abec3d
Reviewed-on: https://boringssl-review.googlesource.com/8665
Reviewed-by: Steven Valdez <svaldez@google.com>
Reviewed-by: David Benjamin <davidben@google.com>
diff --git a/ssl/CMakeLists.txt b/ssl/CMakeLists.txt
index 2716241..d5cb870 100644
--- a/ssl/CMakeLists.txt
+++ b/ssl/CMakeLists.txt
@@ -8,14 +8,13 @@
   handshake_client.c
   d1_both.c
   d1_lib.c
-  d1_meth.c
   d1_pkt.c
   d1_srtp.c
+  dtls_method.c
   dtls_record.c
   s3_both.c
   s3_enc.c
   s3_lib.c
-  s3_meth.c
   s3_pkt.c
   ssl_aead_ctx.c
   ssl_asn1.c
@@ -30,6 +29,7 @@
   ssl_stat.c
   t1_enc.c
   t1_lib.c
+  tls_method.c
   tls_record.c
 )
 
diff --git a/ssl/d1_meth.c b/ssl/dtls_method.c
similarity index 93%
rename from ssl/d1_meth.c
rename to ssl/dtls_method.c
index 19b7af0..00454dd 100644
--- a/ssl/d1_meth.c
+++ b/ssl/dtls_method.c
@@ -88,7 +88,7 @@
   return ~(version - 0x0201);
 }
 
-static const SSL_PROTOCOL_METHOD DTLS_protocol_method = {
+static const SSL_PROTOCOL_METHOD kDTLSProtocolMethod = {
     1 /* is_dtls */,
     TLS1_1_VERSION,
     TLS1_2_VERSION,
@@ -112,29 +112,29 @@
 };
 
 const SSL_METHOD *DTLS_method(void) {
-  static const SSL_METHOD method = {
+  static const SSL_METHOD kMethod = {
       0,
-      &DTLS_protocol_method,
+      &kDTLSProtocolMethod,
   };
-  return &method;
+  return &kMethod;
 }
 
 /* Legacy version-locked methods. */
 
 const SSL_METHOD *DTLSv1_2_method(void) {
-  static const SSL_METHOD method = {
+  static const SSL_METHOD kMethod = {
       DTLS1_2_VERSION,
-      &DTLS_protocol_method,
+      &kDTLSProtocolMethod,
   };
-  return &method;
+  return &kMethod;
 }
 
 const SSL_METHOD *DTLSv1_method(void) {
-  static const SSL_METHOD method = {
+  static const SSL_METHOD kMethod = {
       DTLS1_VERSION,
-      &DTLS_protocol_method,
+      &kDTLSProtocolMethod,
   };
-  return &method;
+  return &kMethod;
 }
 
 /* Legacy side-specific methods. */
diff --git a/ssl/s3_meth.c b/ssl/tls_method.c
similarity index 91%
rename from ssl/s3_meth.c
rename to ssl/tls_method.c
index b3cfd8c..e8cf1d6 100644
--- a/ssl/s3_meth.c
+++ b/ssl/tls_method.c
@@ -65,7 +65,7 @@
 
 static uint16_t ssl3_version_to_wire(uint16_t version) { return version; }
 
-static const SSL_PROTOCOL_METHOD TLS_protocol_method = {
+static const SSL_PROTOCOL_METHOD kTLSProtocolMethod = {
     0 /* is_dtls */,
     SSL3_VERSION,
     TLS1_3_VERSION,
@@ -89,11 +89,11 @@
 };
 
 const SSL_METHOD *TLS_method(void) {
-  static const SSL_METHOD method = {
+  static const SSL_METHOD kMethod = {
       0,
-      &TLS_protocol_method,
+      &kTLSProtocolMethod,
   };
-  return &method;
+  return &kMethod;
 }
 
 const SSL_METHOD *SSLv23_method(void) {
@@ -103,35 +103,35 @@
 /* Legacy version-locked methods. */
 
 const SSL_METHOD *TLSv1_2_method(void) {
-  static const SSL_METHOD method = {
+  static const SSL_METHOD kMethod = {
       TLS1_2_VERSION,
-      &TLS_protocol_method,
+      &kTLSProtocolMethod,
   };
-  return &method;
+  return &kMethod;
 }
 
 const SSL_METHOD *TLSv1_1_method(void) {
-  static const SSL_METHOD method = {
+  static const SSL_METHOD kMethod = {
       TLS1_1_VERSION,
-      &TLS_protocol_method,
+      &kTLSProtocolMethod,
   };
-  return &method;
+  return &kMethod;
 }
 
 const SSL_METHOD *TLSv1_method(void) {
-  static const SSL_METHOD method = {
+  static const SSL_METHOD kMethod = {
       TLS1_VERSION,
-      &TLS_protocol_method,
+      &kTLSProtocolMethod,
   };
-  return &method;
+  return &kMethod;
 }
 
 const SSL_METHOD *SSLv3_method(void) {
-  static const SSL_METHOD method = {
+  static const SSL_METHOD kMethod = {
       SSL3_VERSION,
-      &TLS_protocol_method,
+      &kTLSProtocolMethod,
   };
-  return &method;
+  return &kMethod;
 }
 
 /* Legacy side-specific methods. */