Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Check session_cert is not NULL before dereferencing it.
  • Loading branch information
snhenson committed Jun 5, 2014
1 parent d315265 commit 8011cd5
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions ssl/s3_clnt.c
Original file line number Diff line number Diff line change
Expand Up @@ -2512,6 +2512,13 @@ int ssl3_send_client_key_exchange(SSL *s)
int ecdh_clnt_cert = 0;
int field_size = 0;

if (s->session->sess_cert == NULL)
{
ssl3_send_alert(s,SSL3_AL_FATAL,SSL_AD_UNEXPECTED_MESSAGE);
SSLerr(SSL_F_SSL3_SEND_CLIENT_KEY_EXCHANGE,SSL_R_UNEXPECTED_MESSAGE);
goto err;
}

/* Did we send out the client's
* ECDH share for use in premaster
* computation as part of client certificate?
Expand Down

0 comments on commit 8011cd5

Please sign in to comment.