Browse Source

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>
kris/onging/CECPQ3_patch15
David Benjamin 8 years ago
committed by Adam Langley
parent
commit
f0ee907942
6 changed files with 14 additions and 14 deletions
  1. +1
    -1
      ssl/d1_pkt.c
  2. +1
    -1
      ssl/handshake_client.c
  3. +1
    -1
      ssl/handshake_server.c
  4. +5
    -5
      ssl/internal.h
  5. +2
    -2
      ssl/s3_pkt.c
  6. +4
    -4
      ssl/ssl_lib.c

+ 1
- 1
ssl/d1_pkt.c View File

@@ -362,7 +362,7 @@ int dtls1_write_record(SSL *ssl, int type, const uint8_t *buf, size_t len,

/* 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;
}


+ 1
- 1
ssl/handshake_client.c View File

@@ -463,7 +463,7 @@ int ssl3_connect(SSL *ssl) {
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;
}


+ 1
- 1
ssl/handshake_server.c View File

@@ -376,7 +376,7 @@ int ssl3_accept(SSL *ssl) {
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;
}


+ 5
- 5
ssl/internal.h View File

@@ -813,11 +813,11 @@ struct ssl_protocol_method_st {
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);


+ 2
- 2
ssl/s3_pkt.c View File

@@ -268,7 +268,7 @@ static int do_ssl3_write(SSL *ssl, int type, const uint8_t *buf, unsigned len) {

/* 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 @@ int ssl3_send_alert(SSL *ssl, int level, int desc) {
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. */


+ 4
- 4
ssl/ssl_lib.c View File

@@ -642,7 +642,7 @@ static int ssl_read_impl(SSL *ssl, void *buf, int num, int peek) {
}
}

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 @@ int SSL_write(SSL *ssl, const void *buf, int num) {
}
}

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 @@ int SSL_shutdown(SSL *ssl) {
}
} 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;
}


Loading…
Cancel
Save