From 3ee328ab9eff0bf0c86d07b24555a81f403d2ecb Mon Sep 17 00:00:00 2001 From: Tomas Mraz Date: Fri, 28 May 2021 14:12:12 +0200 Subject: Put init_ec_point_formats() inside #ifndef OPENSSL_NO_EC Reviewed-by: Matt Caswell Reviewed-by: Dmitry Belyavskiy (Merged from https://github.com/openssl/openssl/pull/15518) --- ssl/statem/extensions.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'ssl') diff --git a/ssl/statem/extensions.c b/ssl/statem/extensions.c index 19e91b6f4e..0f39275baa 100644 --- a/ssl/statem/extensions.c +++ b/ssl/statem/extensions.c @@ -18,6 +18,7 @@ static int final_renegotiate(SSL *s, unsigned int context, int sent); static int init_server_name(SSL *s, unsigned int context); static int final_server_name(SSL *s, unsigned int context, int sent); #ifndef OPENSSL_NO_EC +static int init_ec_point_formats(SSL *s, unsigned int context); static int final_ec_pt_formats(SSL *s, unsigned int context, int sent); #endif static int init_session_ticket(SSL *s, unsigned int context); @@ -42,7 +43,6 @@ static int tls_parse_certificate_authorities(SSL *s, PACKET *pkt, #ifndef OPENSSL_NO_SRP static int init_srp(SSL *s, unsigned int context); #endif -static int init_ec_point_formats(SSL *s, unsigned int context); static int init_etm(SSL *s, unsigned int context); static int init_ems(SSL *s, unsigned int context); static int final_ems(SSL *s, unsigned int context, int sent); @@ -1028,6 +1028,15 @@ static int final_server_name(SSL *s, unsigned int context, int sent) } #ifndef OPENSSL_NO_EC +static int init_ec_point_formats(SSL *s, unsigned int context) +{ + OPENSSL_free(s->ext.peer_ecpointformats); + s->ext.peer_ecpointformats = NULL; + s->ext.peer_ecpointformats_len = 0; + + return 1; +} + static int final_ec_pt_formats(SSL *s, unsigned int context, int sent) { unsigned long alg_k, alg_a; @@ -1166,15 +1175,6 @@ static int init_srp(SSL *s, unsigned int context) } #endif -static int init_ec_point_formats(SSL *s, unsigned int context) -{ - OPENSSL_free(s->ext.peer_ecpointformats); - s->ext.peer_ecpointformats = NULL; - s->ext.peer_ecpointformats_len = 0; - - return 1; -} - static int init_etm(SSL *s, unsigned int context) { s->ext.use_etm = 0; -- cgit v1.2.3