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-11-03 07:06:42 +0300
committerAdam Langley <agl@google.com>2014-11-11 02:59:47 +0300
commit688d8dfe48bb5510ad6390add0d676729dce8397 (patch)
treef2e7c8bf969b53f1cf87b638786d58424f723310 /ssl/s3_lib.c
parente1b20a013633754378439f041a72c498d29ed413 (diff)
Remove psk_identity_hint from SSL_SESSION.
There's not much point in retaining the identity hint in the SSL_SESSION. This avoids the complexity around setting psk_identity hint on either the SSL or the SSL_SESSION. Introduce a peer_psk_identity_hint for the client to store the one received from the server. This changes the semantics of SSL_get_psk_identity_hint; it now only returns the value configured for the server. The client learns the hint through the callback. This is compatible with the one use of this API in conscrypt (it pulls the hint back out to pass to a callback). Change-Id: I6d9131636b47f13ac5800b4451436a057021054a Reviewed-on: https://boringssl-review.googlesource.com/2213 Reviewed-by: Adam Langley <agl@google.com>
Diffstat (limited to 'ssl/s3_lib.c')
-rw-r--r--ssl/s3_lib.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/ssl/s3_lib.c b/ssl/s3_lib.c
index 29e40fc0..fc92b8ad 100644
--- a/ssl/s3_lib.c
+++ b/ssl/s3_lib.c
@@ -1029,6 +1029,8 @@ void ssl3_free(SSL *s)
OPENSSL_free(s->s3->tmp.peer_ecpointformatlist);
if (s->s3->tmp.peer_ellipticcurvelist)
OPENSSL_free(s->s3->tmp.peer_ellipticcurvelist);
+ if (s->s3->tmp.peer_psk_identity_hint)
+ OPENSSL_free(s->s3->tmp.peer_psk_identity_hint);
if (s->s3->handshake_buffer) {
BIO_free(s->s3->handshake_buffer);
}
@@ -1064,6 +1066,9 @@ void ssl3_clear(SSL *s)
if (s->s3->tmp.peer_ellipticcurvelist)
OPENSSL_free(s->s3->tmp.peer_ellipticcurvelist);
s->s3->tmp.peer_ellipticcurvelist = NULL;
+ if (s->s3->tmp.peer_psk_identity_hint)
+ OPENSSL_free(s->s3->tmp.peer_psk_identity_hint);
+ s->s3->tmp.peer_psk_identity_hint = NULL;
if (s->s3->tmp.dh != NULL)
{