ssl_write_certificate_request() can handle empty ca_chain

(cherry picked from commit 21360ca4d4)

Conflicts:
	library/ssl_srv.c
This commit is contained in:
Paul Bakker 2013-06-21 15:13:59 +02:00
parent 8199a3375f
commit 3f5b753654
2 changed files with 2 additions and 1 deletions

View File

@ -10,6 +10,7 @@ Bugfix
instead of the x509parse_crt() wrapper that can also parse PEM instead of the x509parse_crt() wrapper that can also parse PEM
certificates certificates
* Fixed values for 2-key Triple DES in cipher layer * Fixed values for 2-key Triple DES in cipher layer
* ssl_write_certificate_request() can handle empty ca_chain
Security Security
* A possible DoS during the SSL Handshake, due to faulty parsing of * A possible DoS during the SSL Handshake, due to faulty parsing of

View File

@ -505,7 +505,7 @@ static int ssl_write_certificate_request( ssl_context *ssl )
p += 2; p += 2;
crt = ssl->ca_chain; crt = ssl->ca_chain;
while( crt != NULL ) while( crt != NULL && crt->version != 0)
{ {
if( p - buf > 4096 ) if( p - buf > 4096 )
break; break;