Skip to content

Commit

Permalink
Cleanup the peer point formats on regotiation
Browse files Browse the repository at this point in the history
Fixes openssl#14875

Reviewed-by: Ben Kaduk <kaduk@mit.edu>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from openssl#15383)
  • Loading branch information
beldmit committed May 21, 2021
1 parent 0491691 commit 3f98738
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion ssl/statem/extensions.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ 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);
Expand Down Expand Up @@ -159,7 +160,7 @@ static const EXTENSION_DEFINITION ext_defs[] = {
TLSEXT_TYPE_ec_point_formats,
SSL_EXT_CLIENT_HELLO | SSL_EXT_TLS1_2_SERVER_HELLO
| SSL_EXT_TLS1_2_AND_BELOW_ONLY,
NULL, tls_parse_ctos_ec_pt_formats, tls_parse_stoc_ec_pt_formats,
init_ec_point_formats, tls_parse_ctos_ec_pt_formats, tls_parse_stoc_ec_pt_formats,
tls_construct_stoc_ec_pt_formats, tls_construct_ctos_ec_pt_formats,
final_ec_pt_formats
},
Expand Down Expand Up @@ -1145,6 +1146,15 @@ 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;
Expand Down

0 comments on commit 3f98738

Please sign in to comment.