From cd0fb43cbe2774220f2702b8289faec590a72d01 Mon Sep 17 00:00:00 2001 From: Matt Caswell Date: Tue, 18 Jun 2019 11:45:26 +0100 Subject: Following the previous 2 commits also move ecpointformats out of session The previous 2 commits moved supported groups and ciphers out of the session object to avoid race conditions. We now also move ecpointformats for consistency. There does not seem to be a race condition with access to this data since it is only ever set in a non-resumption handshake. However, there is no reason for it to be in the session. Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/9162) --- ssl/s3_lib.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'ssl/s3_lib.c') diff --git a/ssl/s3_lib.c b/ssl/s3_lib.c index e51877a6b4..3238fd9b7e 100644 --- a/ssl/s3_lib.c +++ b/ssl/s3_lib.c @@ -3702,13 +3702,12 @@ long ssl3_ctrl(SSL *s, int cmd, long larg, void *parg) #ifndef OPENSSL_NO_EC case SSL_CTRL_GET_EC_POINT_FORMATS: { - SSL_SESSION *sess = s->session; const unsigned char **pformat = parg; - if (sess == NULL || sess->ext.ecpointformats == NULL) + if (s->ext.peer_ecpointformats == NULL) return 0; - *pformat = sess->ext.ecpointformats; - return (int)sess->ext.ecpointformats_len; + *pformat = s->ext.peer_ecpointformats; + return (int)s->ext.peer_ecpointformats_len; } #endif -- cgit v1.2.3