Add ssl_set_hs_ca_chain()

This commit is contained in:
Manuel Pégourié-Gonnard 2015-05-11 08:46:37 +02:00
parent 1897af9e93
commit 22bfa4bb53
3 changed files with 58 additions and 11 deletions

View file

@ -2725,7 +2725,9 @@ static int ssl_write_certificate_request( mbedtls_ssl_context *ssl )
* opaque DistinguishedName<1..2^16-1>;
*/
p += 2;
crt = ssl->conf->ca_chain;
crt = ssl->handshake->sni_ca_chain != NULL ?
ssl->handshake->sni_ca_chain :
ssl->conf->ca_chain;
total_dn_size = 0;
while( crt != NULL && crt->version != 0 )