From 821464e45f4e335a4fab390f4fb550649da783c5 Mon Sep 17 00:00:00 2001 From: David Benjamin Date: Tue, 21 Jul 2015 21:06:39 -0400 Subject: [PATCH] Remove old 'prepare' extensions functions. These are no-ops now. Change-Id: Ib842d512571a06a45e52f30fe4bb8e98e9c37cf9 Reviewed-on: https://boringssl-review.googlesource.com/5481 Reviewed-by: Adam Langley --- ssl/internal.h | 2 -- ssl/s3_clnt.c | 5 ----- ssl/s3_srvr.c | 5 +---- ssl/t1_lib.c | 4 ---- 4 files changed, 1 insertion(+), 15 deletions(-) diff --git a/ssl/internal.h b/ssl/internal.h index 297c1554..a63c0cd7 100644 --- a/ssl/internal.h +++ b/ssl/internal.h @@ -1077,8 +1077,6 @@ uint8_t *ssl_add_serverhello_tlsext(SSL *s, uint8_t *const buf, uint8_t *const limit); int ssl_parse_clienthello_tlsext(SSL *s, CBS *cbs); int ssl_parse_serverhello_tlsext(SSL *s, CBS *cbs); -int ssl_prepare_clienthello_tlsext(SSL *s); -int ssl_prepare_serverhello_tlsext(SSL *s); #define tlsext_tick_md EVP_sha256 diff --git a/ssl/s3_clnt.c b/ssl/s3_clnt.c index 58f92cea..cf98bb67 100644 --- a/ssl/s3_clnt.c +++ b/ssl/s3_clnt.c @@ -693,11 +693,6 @@ int ssl3_send_client_hello(SSL *s) { *(p++) = 0; /* Add the NULL method */ /* TLS extensions*/ - if (ssl_prepare_clienthello_tlsext(s) <= 0) { - OPENSSL_PUT_ERROR(SSL, SSL_R_CLIENTHELLO_TLSEXT); - goto err; - } - p = ssl_add_clienthello_tlsext(s, p, buf + SSL3_RT_MAX_PLAIN_LENGTH, p - buf); if (p == NULL) { diff --git a/ssl/s3_srvr.c b/ssl/s3_srvr.c index f0383471..fba5bcb3 100644 --- a/ssl/s3_srvr.c +++ b/ssl/s3_srvr.c @@ -1207,10 +1207,7 @@ int ssl3_send_server_hello(SSL *s) { /* put the compression method */ *(p++) = 0; - if (ssl_prepare_serverhello_tlsext(s) <= 0) { - OPENSSL_PUT_ERROR(SSL, SSL_R_SERVERHELLO_TLSEXT); - return -1; - } + p = ssl_add_serverhello_tlsext(s, p, buf + SSL3_RT_MAX_PLAIN_LENGTH); if (p == NULL) { OPENSSL_PUT_ERROR(SSL, ERR_R_INTERNAL_ERROR); diff --git a/ssl/t1_lib.c b/ssl/t1_lib.c index 2607931f..86cc74ed 100644 --- a/ssl/t1_lib.c +++ b/ssl/t1_lib.c @@ -2535,10 +2535,6 @@ static int ssl_scan_serverhello_tlsext(SSL *s, CBS *cbs, int *out_alert) { return 1; } -int ssl_prepare_clienthello_tlsext(SSL *s) { return 1; } - -int ssl_prepare_serverhello_tlsext(SSL *s) { return 1; } - static int ssl_check_clienthello_tlsext(SSL *s) { int ret = SSL_TLSEXT_ERR_NOACK; int al = SSL_AD_UNRECOGNIZED_NAME;