Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/boringssl.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Benjamin <davidben@chromium.org>2014-10-19 08:14:36 +0400
committerAdam Langley <agl@google.com>2014-10-21 21:55:01 +0400
commita19fc259f05e6ec2df0a55e7a37adc37506d3a91 (patch)
tree158ef6338bd092eba8bf7ceefb006c63cae383cd /ssl/s3_lib.c
parent4a674152fde054da4f5e94cc9d437448e598c94d (diff)
Move ECC extensions out of SSL_SESSION.
There's no need to store them on the session. They're temporary handshake state and weren't serialized in d2i_SSL_SESSION anyway. Change-Id: I830d378ab49aaa4fc6c4c7a6a8c035e2263fb763 Reviewed-on: https://boringssl-review.googlesource.com/1990 Reviewed-by: Adam Langley <agl@google.com>
Diffstat (limited to 'ssl/s3_lib.c')
-rw-r--r--ssl/s3_lib.c21
1 files changed, 10 insertions, 11 deletions
diff --git a/ssl/s3_lib.c b/ssl/s3_lib.c
index 03997c93..215b3f6d 100644
--- a/ssl/s3_lib.c
+++ b/ssl/s3_lib.c
@@ -1019,6 +1019,10 @@ void ssl3_free(SSL *s)
sk_X509_NAME_pop_free(s->s3->tmp.ca_names,X509_NAME_free);
if (s->s3->tmp.certificate_types != NULL)
OPENSSL_free(s->s3->tmp.certificate_types);
+ if (s->s3->tmp.peer_ecpointformatlist)
+ OPENSSL_free(s->s3->tmp.peer_ecpointformatlist);
+ if (s->s3->tmp.peer_ellipticcurvelist)
+ OPENSSL_free(s->s3->tmp.peer_ellipticcurvelist);
if (s->s3->handshake_buffer) {
BIO_free(s->s3->handshake_buffer);
}
@@ -1275,12 +1279,8 @@ long ssl3_ctrl(SSL *s, int cmd, long larg, void *parg)
case SSL_CTRL_GET_CURVES:
{
- const uint16_t *clist;
- size_t clistlen;
- if (!s->session)
- return 0;
- clist = s->session->tlsext_ellipticcurvelist;
- clistlen = s->session->tlsext_ellipticcurvelist_length;
+ const uint16_t *clist = s->s3->tmp.peer_ellipticcurvelist;
+ size_t clistlen = s->s3->tmp.peer_ellipticcurvelist_length;
if (parg)
{
size_t i;
@@ -1385,12 +1385,11 @@ long ssl3_ctrl(SSL *s, int cmd, long larg, void *parg)
}
case SSL_CTRL_GET_EC_POINT_FORMATS:
{
- SSL_SESSION *sess = s->session;
- const unsigned char **pformat = parg;
- if (!sess || !sess->tlsext_ecpointformatlist)
+ if (!s->s3->tmp.peer_ecpointformatlist)
return 0;
- *pformat = sess->tlsext_ecpointformatlist;
- return (int)sess->tlsext_ecpointformatlist_length;
+ const uint8_t **pformat = parg;
+ *pformat = s->s3->tmp.peer_ecpointformatlist;
+ return (int)s->s3->tmp.peer_ecpointformatlist_length;
}
case SSL_CTRL_CHANNEL_ID: