summaryrefslogtreecommitdiffstats
path: root/ssl/s3_lib.c
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2019-06-18 12:45:26 +0200
committerMatt Caswell <matt@openssl.org>2019-06-18 14:36:25 +0200
commitcd0fb43cbe2774220f2702b8289faec590a72d01 (patch)
tree5d8e94dabc78600b440a30ea29496284943b0113 /ssl/s3_lib.c
parentFix a race condition in ciphers handling (diff)
downloadopenssl-cd0fb43cbe2774220f2702b8289faec590a72d01.tar.xz
openssl-cd0fb43cbe2774220f2702b8289faec590a72d01.zip
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 <tmraz@fedoraproject.org> (Merged from https://github.com/openssl/openssl/pull/9162)
Diffstat (limited to 'ssl/s3_lib.c')
-rw-r--r--ssl/s3_lib.c7
1 files changed, 3 insertions, 4 deletions
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