Skip to content
Snippets Groups Projects
Commit 66f96fe2 authored by Dr. Stephen Henson's avatar Dr. Stephen Henson
Browse files

Check return value of ssl3_output_cert_chain

parent 8b8e5bed
No related branches found
No related tags found
No related merge requests found
......@@ -3380,8 +3380,13 @@ int ssl3_send_client_certificate(SSL *s)
if (s->state == SSL3_ST_CW_CERT_C)
{
s->state=SSL3_ST_CW_CERT_D;
ssl3_output_cert_chain(s,
(s->s3->tmp.cert_req == 2)?NULL:s->cert->key);
if (!ssl3_output_cert_chain(s,
(s->s3->tmp.cert_req == 2)?NULL:s->cert->key))
{
SSLerr(SSL_F_SSL3_SEND_CLIENT_CERTIFICATE, ERR_R_INTERNAL_ERROR);
ssl3_send_alert(s,SSL3_AL_FATAL,SSL_AD_INTERNAL_ERROR);
return 0;
}
}
/* SSL3_ST_CW_CERT_D */
return ssl_do_write(s);
......
......@@ -3476,7 +3476,11 @@ int ssl3_send_server_certificate(SSL *s)
}
}
ssl3_output_cert_chain(s,cpk);
if (!ssl3_output_cert_chain(s,cpk))
{
SSLerr(SSL_F_SSL3_SEND_SERVER_CERTIFICATE,ERR_R_INTERNAL_ERROR);
return(0);
}
s->state=SSL3_ST_SW_CERT_B;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment