Also clean the last byte of the PSK identity.

Patch by Alex Kljubin.

Change-Id: Ieec830dce11b501aaa82f03c82ff04c3cdde41e1
Reviewed-on: https://boringssl-review.googlesource.com/1831
Reviewed-by: Adam Langley <agl@google.com>
This commit is contained in:
Adam Langley 2014-09-24 15:17:09 -07:00
parent 704453fa9c
commit 5d0c163b37

View File

@ -1959,7 +1959,7 @@ int ssl3_send_client_key_exchange(SSL *s)
}
psk_err = 0;
psk_err:
OPENSSL_cleanse(identity, PSK_MAX_IDENTITY_LEN);
OPENSSL_cleanse(identity, sizeof(identity));
OPENSSL_cleanse(pre_ms, sizeof(pre_ms));
if (psk_err != 0)
{