Remove the 'ssl_' prefix on most SSL_PROTOCOL_METHOD hooks.

It doesn't really convey anything useful. Leave ssl_get_message alone for now
since it's called everywhere in the handshake and I'm about to tweak it
further.

Change-Id: I6f3a74c170e818f624be8fbe5cf6b796353406df
Reviewed-on: https://boringssl-review.googlesource.com/8430
Reviewed-by: Adam Langley <agl@google.com>
diff --git a/ssl/d1_pkt.c b/ssl/d1_pkt.c
index b821ab3..824a00c 100644
--- a/ssl/d1_pkt.c
+++ b/ssl/d1_pkt.c
@@ -362,7 +362,7 @@
 
   /* If we have an alert to send, lets send it */
   if (ssl->s3->alert_dispatch) {
-    int ret = ssl->method->ssl_dispatch_alert(ssl);
+    int ret = ssl->method->dispatch_alert(ssl);
     if (ret <= 0) {
       return ret;
     }
diff --git a/ssl/handshake_client.c b/ssl/handshake_client.c
index 3bc27a6..9a3ffa5 100644
--- a/ssl/handshake_client.c
+++ b/ssl/handshake_client.c
@@ -463,7 +463,7 @@
         break;
 
       case SSL3_ST_CR_CHANGE:
-        ret = ssl->method->ssl_read_change_cipher_spec(ssl);
+        ret = ssl->method->read_change_cipher_spec(ssl);
         if (ret <= 0) {
           goto end;
         }
diff --git a/ssl/handshake_server.c b/ssl/handshake_server.c
index 203919c..6253e96 100644
--- a/ssl/handshake_server.c
+++ b/ssl/handshake_server.c
@@ -376,7 +376,7 @@
         break;
 
       case SSL3_ST_SR_CHANGE:
-        ret = ssl->method->ssl_read_change_cipher_spec(ssl);
+        ret = ssl->method->read_change_cipher_spec(ssl);
         if (ret <= 0) {
           goto end;
         }
diff --git a/ssl/internal.h b/ssl/internal.h
index 457a8b4..da4ad87 100644
--- a/ssl/internal.h
+++ b/ssl/internal.h
@@ -813,11 +813,11 @@
   void (*ssl_free)(SSL *ssl);
   long (*ssl_get_message)(SSL *ssl, int msg_type,
                           enum ssl_hash_message_t hash_message, int *ok);
-  int (*ssl_read_app_data)(SSL *ssl, uint8_t *buf, int len, int peek);
-  int (*ssl_read_change_cipher_spec)(SSL *ssl);
-  void (*ssl_read_close_notify)(SSL *ssl);
-  int (*ssl_write_app_data)(SSL *ssl, const void *buf_, int len);
-  int (*ssl_dispatch_alert)(SSL *ssl);
+  int (*read_app_data)(SSL *ssl, uint8_t *buf, int len, int peek);
+  int (*read_change_cipher_spec)(SSL *ssl);
+  void (*read_close_notify)(SSL *ssl);
+  int (*write_app_data)(SSL *ssl, const void *buf_, int len);
+  int (*dispatch_alert)(SSL *ssl);
   /* supports_cipher returns one if |cipher| is supported by this protocol and
    * zero otherwise. */
   int (*supports_cipher)(const SSL_CIPHER *cipher);
diff --git a/ssl/s3_pkt.c b/ssl/s3_pkt.c
index 2396a7f..1bbed59 100644
--- a/ssl/s3_pkt.c
+++ b/ssl/s3_pkt.c
@@ -268,7 +268,7 @@
 
   /* If we have an alert to send, lets send it */
   if (ssl->s3->alert_dispatch) {
-    int ret = ssl->method->ssl_dispatch_alert(ssl);
+    int ret = ssl->method->dispatch_alert(ssl);
     if (ret <= 0) {
       return ret;
     }
@@ -529,7 +529,7 @@
   if (!ssl_write_buffer_is_pending(ssl)) {
     /* Nothing is being written out, so the alert may be dispatched
      * immediately. */
-    return ssl->method->ssl_dispatch_alert(ssl);
+    return ssl->method->dispatch_alert(ssl);
   }
 
   /* The alert will be dispatched later. */
diff --git a/ssl/ssl_lib.c b/ssl/ssl_lib.c
index 5da339d..a7070d1 100644
--- a/ssl/ssl_lib.c
+++ b/ssl/ssl_lib.c
@@ -642,7 +642,7 @@
     }
   }
 
-  return ssl->method->ssl_read_app_data(ssl, buf, num, peek);
+  return ssl->method->read_app_data(ssl, buf, num, peek);
 }
 
 int SSL_read(SSL *ssl, void *buf, int num) {
@@ -681,7 +681,7 @@
     }
   }
 
-  return ssl->method->ssl_write_app_data(ssl, buf, num);
+  return ssl->method->write_app_data(ssl, buf, num);
 }
 
 int SSL_shutdown(SSL *ssl) {
@@ -719,12 +719,12 @@
     }
   } else if (ssl->s3->alert_dispatch) {
     /* Finish sending the close_notify. */
-    if (ssl->method->ssl_dispatch_alert(ssl) <= 0) {
+    if (ssl->method->dispatch_alert(ssl) <= 0) {
       return -1;
     }
   } else if (ssl->s3->recv_shutdown != ssl_shutdown_close_notify) {
     /* Wait for the peer's close_notify. */
-    ssl->method->ssl_read_close_notify(ssl);
+    ssl->method->read_close_notify(ssl);
     if (ssl->s3->recv_shutdown != ssl_shutdown_close_notify) {
       return -1;
     }