From bbd43b5e90c073a3c8b719d538a273fe683b9944 Mon Sep 17 00:00:00 2001 From: Steven Valdez Date: Wed, 1 Jun 2016 11:46:58 -0400 Subject: [PATCH] Renaming SSL3_MT_NEWSESSION_TICKET to SSL3_MT_NEW_SESSION_TICKET. This keeps the naming convention in line with the actual spec. Change-Id: I34673f78dbc29c1659b4da0e49677ebe9b79636b Reviewed-on: https://boringssl-review.googlesource.com/8090 Reviewed-by: David Benjamin --- include/openssl/ssl3.h | 6 +++++- ssl/s3_clnt.c | 2 +- ssl/s3_srvr.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/include/openssl/ssl3.h b/include/openssl/ssl3.h index e5f9a890..64e1d311 100644 --- a/include/openssl/ssl3.h +++ b/include/openssl/ssl3.h @@ -395,7 +395,7 @@ OPENSSL_COMPILE_ASSERT( #define SSL3_MT_HELLO_REQUEST 0 #define SSL3_MT_CLIENT_HELLO 1 #define SSL3_MT_SERVER_HELLO 2 -#define SSL3_MT_NEWSESSION_TICKET 4 +#define SSL3_MT_NEW_SESSION_TICKET 4 #define SSL3_MT_CERTIFICATE 11 #define SSL3_MT_SERVER_KEY_EXCHANGE 12 #define SSL3_MT_CERTIFICATE_REQUEST 13 @@ -409,6 +409,10 @@ OPENSSL_COMPILE_ASSERT( #define SSL3_MT_CHANNEL_ID_ENCRYPTED_EXTENSIONS 203 #define DTLS1_MT_HELLO_VERIFY_REQUEST 3 +/* SSL3_MT_NEWSESSION_TICKET is a legacy alias for |SSL3_MT_NEW_SESSION_TICKET| + * for consumers which use |SSL_CTX_set_msg_callback|. */ +#define SSL3_MT_NEWSESSION_TICKET SSL3_MT_NEW_SESSION_TICKET + #define SSL3_MT_CCS 1 diff --git a/ssl/s3_clnt.c b/ssl/s3_clnt.c index 82e4e351..2665f150 100644 --- a/ssl/s3_clnt.c +++ b/ssl/s3_clnt.c @@ -1393,7 +1393,7 @@ err: int ssl3_get_new_session_ticket(SSL *ssl) { int ok, al; - long n = ssl->method->ssl_get_message(ssl, SSL3_MT_NEWSESSION_TICKET, + long n = ssl->method->ssl_get_message(ssl, SSL3_MT_NEW_SESSION_TICKET, ssl_hash_message, &ok); if (!ok) { diff --git a/ssl/s3_srvr.c b/ssl/s3_srvr.c index eef15441..50007eb4 100644 --- a/ssl/s3_srvr.c +++ b/ssl/s3_srvr.c @@ -1987,7 +1987,7 @@ int ssl3_send_new_session_ticket(SSL *ssl) { p += placeholder_len; len = p - ssl_handshake_start(ssl); - if (!ssl_set_handshake_header(ssl, SSL3_MT_NEWSESSION_TICKET, len)) { + if (!ssl_set_handshake_header(ssl, SSL3_MT_NEW_SESSION_TICKET, len)) { goto err; } ssl->state = SSL3_ST_SW_SESSION_TICKET_B; @@ -2056,7 +2056,7 @@ int ssl3_send_new_session_ticket(SSL *ssl) { /* Skip ticket lifetime hint */ p = ssl_handshake_start(ssl) + 4; s2n(len - 6, p); - if (!ssl_set_handshake_header(ssl, SSL3_MT_NEWSESSION_TICKET, len)) { + if (!ssl_set_handshake_header(ssl, SSL3_MT_NEW_SESSION_TICKET, len)) { goto err; } ssl->state = SSL3_ST_SW_SESSION_TICKET_B;