diff options
author | Rich Salz <rsalz@akamai.com> | 2015-05-29 12:22:43 -0400 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2015-05-30 12:28:05 -0400 |
commit | e0f9bf1de72e2717a5e8c2126259959e2d650777 (patch) | |
tree | 3e0622777db359536fdb21531ea5b30789ae7616 /ssl/s3_srvr.c | |
parent | 6218a1f57e7e25a6b9a798f00cf5f0e56a02ff31 (diff) |
clear/cleanse cleanup
Where we called openssl_cleanse, make sure we do it on all error
paths. Be consistent in use of sizeof(foo) when possible.
Reviewed-by: Andy Polyakov <appro@openssl.org>
Diffstat (limited to 'ssl/s3_srvr.c')
-rw-r--r-- | ssl/s3_srvr.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/ssl/s3_srvr.c b/ssl/s3_srvr.c index 68234ecc18..88e649d315 100644 --- a/ssl/s3_srvr.c +++ b/ssl/s3_srvr.c @@ -2238,7 +2238,6 @@ int ssl3_get_client_key_exchange(SSL *s) BIGNUM *pub = NULL; DH *dh_srvr, *dh_clnt = NULL; #endif - #ifndef OPENSSL_NO_EC EC_KEY *srvr_ecdh = NULL; EVP_PKEY *clnt_pub_pkey = NULL; @@ -2676,7 +2675,7 @@ int ssl3_get_client_key_exchange(SSL *s) psk_len = s->psk_server_callback(s, tmp_id, psk_or_pre_ms, sizeof(psk_or_pre_ms)); - OPENSSL_cleanse(tmp_id, PSK_MAX_IDENTITY_LEN + 1); + OPENSSL_cleanse(tmp_id, sizeof(tmp_id)); if (psk_len > PSK_MAX_PSK_LEN) { SSLerr(SSL_F_SSL3_GET_CLIENT_KEY_EXCHANGE, ERR_R_INTERNAL_ERROR); |