OpenSSL: Clean up TLS PRF implementation

Commit fa0e715100 ('Use
tls_connection_prf() for all EAP TLS-based key derivation') copied some
pointer checks from the generic implementation to tls_openssl.c.
However, these are arrays and cannot be NULL in OpenSSL data. Remove the
unnecessary checks and add master_key_length check for completeness.
(CID 109619).

Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
Jouni Malinen 2015-04-19 20:34:12 +03:00
parent 7f90a234b6
commit cb71a8342d

View file

@ -2703,8 +2703,7 @@ static int openssl_tls_prf(void *tls_ctx, struct tls_connection *conn,
return -1;
ssl = conn->ssl;
if (ssl == NULL || ssl->s3 == NULL || ssl->session == NULL ||
ssl->s3->client_random == NULL || ssl->s3->server_random == NULL ||
ssl->session->master_key == NULL)
ssl->session->master_key_length <= 0)
return -1;
if (skip_keyblock) {