diff options
author | Tomas Mraz <tomas@openssl.org> | 2021-05-28 14:12:12 +0200 |
---|---|---|
committer | Dmitry Belyavskiy <beldmit@gmail.com> | 2021-05-29 17:05:43 +0200 |
commit | 3ee328ab9eff0bf0c86d07b24555a81f403d2ecb (patch) | |
tree | 9a9eb8330dd0e15e31a402ea91ff96f657901509 | |
parent | 9008dc9e38bc35541957eacebafac35912d20821 (diff) |
Put init_ec_point_formats() inside #ifndef OPENSSL_NO_EC
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/15518)
-rw-r--r-- | ssl/statem/extensions.c | 20 |
1 files changed, 10 insertions, 10 deletions
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; |