summaryrefslogtreecommitdiff
path: root/ssl/s3_clnt.c
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2014-03-18 14:19:22 +0000
committerDr. Stephen Henson <steve@openssl.org>2014-03-28 14:49:04 +0000
commit66f96fe2d519147097c118d4bf60704c69ed0635 (patch)
treebf79ef3375ca34b52b67ce5718ab1f92596d7fd9 /ssl/s3_clnt.c
parent8b8e5bed233a2d8106296c8e460be252719e0fdd (diff)
downloadopenssl-new-66f96fe2d519147097c118d4bf60704c69ed0635.tar.gz
Check return value of ssl3_output_cert_chain
Diffstat (limited to 'ssl/s3_clnt.c')
-rw-r--r--ssl/s3_clnt.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/ssl/s3_clnt.c b/ssl/s3_clnt.c
index 70c6533268..efc3710abd 100644
--- a/ssl/s3_clnt.c
+++ b/ssl/s3_clnt.c
@@ -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);