Checkout return value of dtls1_output_cert_chain
Reviewed-by: Tim Hudson <tjh@openssl.org>
This commit is contained in:
parent
ce5ddefc43
commit
9beb948c0d
@ -1717,6 +1717,12 @@ int dtls1_send_client_certificate(SSL *s)
|
|||||||
s->state=SSL3_ST_CW_CERT_D;
|
s->state=SSL3_ST_CW_CERT_D;
|
||||||
l=dtls1_output_cert_chain(s,
|
l=dtls1_output_cert_chain(s,
|
||||||
(s->s3->tmp.cert_req == 2)?NULL:s->cert->key->x509);
|
(s->s3->tmp.cert_req == 2)?NULL:s->cert->key->x509);
|
||||||
|
if (!l)
|
||||||
|
{
|
||||||
|
SSLerr(SSL_F_DTLS1_SEND_CLIENT_CERTIFICATE, ERR_R_INTERNAL_ERROR);
|
||||||
|
ssl3_send_alert(s,SSL3_AL_FATAL,SSL_AD_INTERNAL_ERROR);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
s->init_num=(int)l;
|
s->init_num=(int)l;
|
||||||
s->init_off=0;
|
s->init_off=0;
|
||||||
|
|
||||||
|
@ -1625,6 +1625,11 @@ int dtls1_send_server_certificate(SSL *s)
|
|||||||
}
|
}
|
||||||
|
|
||||||
l=dtls1_output_cert_chain(s,x);
|
l=dtls1_output_cert_chain(s,x);
|
||||||
|
if (!l)
|
||||||
|
{
|
||||||
|
SSLerr(SSL_F_DTLS1_SEND_SERVER_CERTIFICATE,ERR_R_INTERNAL_ERROR);
|
||||||
|
return(0);
|
||||||
|
}
|
||||||
s->state=SSL3_ST_SW_CERT_B;
|
s->state=SSL3_ST_SW_CERT_B;
|
||||||
s->init_num=(int)l;
|
s->init_num=(int)l;
|
||||||
s->init_off=0;
|
s->init_off=0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user