SSL modules now using x509_crt_parse_der()
Avoid uselessly trying to decode PEM.
This commit is contained in:
parent
b25f81665f
commit
4d2a8eb6ff
@ -149,7 +149,8 @@ static int ssl_load_session( ssl_session *session,
|
||||
|
||||
x509_crt_init( session->peer_cert );
|
||||
|
||||
if( ( ret = x509_crt_parse( session->peer_cert, p, cert_len ) ) != 0 )
|
||||
if( ( ret = x509_crt_parse_der( session->peer_cert,
|
||||
p, cert_len ) ) != 0 )
|
||||
{
|
||||
x509_crt_free( session->peer_cert );
|
||||
polarssl_free( session->peer_cert );
|
||||
|
@ -101,8 +101,8 @@ static int ssl_session_copy( ssl_session *dst, const ssl_session *src )
|
||||
|
||||
x509_crt_init( dst->peer_cert );
|
||||
|
||||
if( ( ret = x509_crt_parse( dst->peer_cert, src->peer_cert->raw.p,
|
||||
src->peer_cert->raw.len ) ) != 0 )
|
||||
if( ( ret = x509_crt_parse_der( dst->peer_cert, src->peer_cert->raw.p,
|
||||
src->peer_cert->raw.len ) ) != 0 )
|
||||
{
|
||||
polarssl_free( dst->peer_cert );
|
||||
dst->peer_cert = NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user