Skip to content

Commit 7e12360

Browse files
snhensonandi34
authored andcommitted
Check session_cert is not NULL before dereferencing it. (cherry picked from commit 8011cd56e39a433b1837465259a9bd24a38727fb) Change-Id: If19c9037d3fb086bb913704e5e440ec7bc6e1e22
1 parent c785241 commit 7e12360

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

ssl/s3_clnt.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2598,6 +2598,13 @@ int ssl3_send_client_key_exchange(SSL *s)
25982598
int ecdh_clnt_cert = 0;
25992599
int field_size = 0;
26002600

2601+
if (s->session->sess_cert == NULL)
2602+
{
2603+
ssl3_send_alert(s,SSL3_AL_FATAL,SSL_AD_UNEXPECTED_MESSAGE);
2604+
SSLerr(SSL_F_SSL3_SEND_CLIENT_KEY_EXCHANGE,SSL_R_UNEXPECTED_MESSAGE);
2605+
goto err;
2606+
}
2607+
26012608
/* Did we send out the client's
26022609
* ECDH share for use in premaster
26032610
* computation as part of client certificate?

0 commit comments

Comments
 (0)