Commit 968afaa0 authored by Paul Bakker's avatar Paul Bakker
Browse files

ssl_key_cert not available in all configurations

parent ec3a617d
......@@ -3270,8 +3270,7 @@ int ssl_parse_finished( ssl_context *ssl )
return( 0 );
}
static void ssl_handshake_params_init( ssl_handshake_params *handshake,
ssl_key_cert *key_cert )
static void ssl_handshake_params_init( ssl_handshake_params *handshake )
{
memset( handshake, 0, sizeof( ssl_handshake_params ) );
......@@ -3302,10 +3301,6 @@ static void ssl_handshake_params_init( ssl_handshake_params *handshake,
#if defined(POLARSSL_ECDH_C)
ecdh_init( &handshake->ecdh_ctx );
#endif
#if defined(POLARSSL_X509_CRT_PARSE_C)
handshake->key_cert = key_cert;
#endif
}
static void ssl_transform_init( ssl_transform *transform )
......@@ -3377,7 +3372,11 @@ static int ssl_handshake_init( ssl_context *ssl )
/* Initialize structures */
ssl_session_init( ssl->session_negotiate );
ssl_transform_init( ssl->transform_negotiate );
ssl_handshake_params_init( ssl->handshake, ssl->key_cert );
ssl_handshake_params_init( ssl->handshake );
#if defined(POLARSSL_X509_CRT_PARSE_C)
ssl->handshake->key_cert = ssl->key_cert;
#endif
return( 0 );
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment