aboutsummaryrefslogtreecommitdiff
path: root/ssl/s3_lib.c
diff options
context:
space:
mode:
authorJung-uk Kim <jkim@FreeBSD.org>2021-03-25 15:05:31 +0000
committerJung-uk Kim <jkim@FreeBSD.org>2021-03-25 15:05:31 +0000
commit94fa08a4bcdfbb3434b025d67d014af3b18e5380 (patch)
treed9b51f32dc4f6bcd110a92d0374694a93bfa2fb0 /ssl/s3_lib.c
parent4f55bd5321b72491d4eff396e4928e9ab0706735 (diff)
downloadsrc-vendor/openssl.tar.gz
src-vendor/openssl.zip
Diffstat (limited to 'ssl/s3_lib.c')
-rw-r--r--ssl/s3_lib.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/ssl/s3_lib.c b/ssl/s3_lib.c
index 4511b52c9afc..b256a4b93503 100644
--- a/ssl/s3_lib.c
+++ b/ssl/s3_lib.c
@@ -1,5 +1,5 @@
/*
- * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved.
* Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved
* Copyright 2005 Nokia. All rights reserved.
*
@@ -4629,6 +4629,7 @@ int ssl_generate_master_secret(SSL *s, unsigned char *pms, size_t pmslen,
OPENSSL_clear_free(s->s3->tmp.psk, psklen);
s->s3->tmp.psk = NULL;
+ s->s3->tmp.psklen = 0;
if (!s->method->ssl3_enc->generate_master_secret(s,
s->session->master_key, pskpms, pskpmslen,
&s->session->master_key_length)) {
@@ -4658,8 +4659,10 @@ int ssl_generate_master_secret(SSL *s, unsigned char *pms, size_t pmslen,
else
OPENSSL_cleanse(pms, pmslen);
}
- if (s->server == 0)
+ if (s->server == 0) {
s->s3->tmp.pms = NULL;
+ s->s3->tmp.pmslen = 0;
+ }
return ret;
}