Commit 4f90ef0c authored by Matt Caswell's avatar Matt Caswell
Browse files

Check return value of ssl3_output_cert_chain



Based on commit 66f96fe2 by Steve Henson

Reviewed-by: default avatarTim Hudson <tjh@openssl.org>
(cherry picked from commit ce5ddefc)
parent eae2bb2f
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -2962,6 +2962,12 @@ int ssl3_send_client_certificate(SSL *s)
		s->state=SSL3_ST_CW_CERT_D;
		l=ssl3_output_cert_chain(s,
			(s->s3->tmp.cert_req == 2)?NULL:s->cert->key->x509);
		if (!l)
			{
			SSLerr(SSL_F_SSL3_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_off=0;
		}
+5 −0
Original line number Diff line number Diff line
@@ -3084,6 +3084,11 @@ int ssl3_send_server_certificate(SSL *s)
			}

		l=ssl3_output_cert_chain(s,x);
		if (!l)
			{
			SSLerr(SSL_F_SSL3_SEND_SERVER_CERTIFICATE,ERR_R_INTERNAL_ERROR);
			return(0);
			}
		s->state=SSL3_ST_SW_CERT_B;
		s->init_num=(int)l;
		s->init_off=0;