mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-03-24 19:43:32 +00:00
ssl_key_cert not available in all configurations
This commit is contained in:
parent
ec3a617d40
commit
968afaa06f
@ -3270,8 +3270,7 @@ int ssl_parse_finished( ssl_context *ssl )
|
|||||||
return( 0 );
|
return( 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
static void ssl_handshake_params_init( ssl_handshake_params *handshake,
|
static void ssl_handshake_params_init( ssl_handshake_params *handshake )
|
||||||
ssl_key_cert *key_cert )
|
|
||||||
{
|
{
|
||||||
memset( handshake, 0, sizeof( ssl_handshake_params ) );
|
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)
|
#if defined(POLARSSL_ECDH_C)
|
||||||
ecdh_init( &handshake->ecdh_ctx );
|
ecdh_init( &handshake->ecdh_ctx );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(POLARSSL_X509_CRT_PARSE_C)
|
|
||||||
handshake->key_cert = key_cert;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void ssl_transform_init( ssl_transform *transform )
|
static void ssl_transform_init( ssl_transform *transform )
|
||||||
@ -3377,7 +3372,11 @@ static int ssl_handshake_init( ssl_context *ssl )
|
|||||||
/* Initialize structures */
|
/* Initialize structures */
|
||||||
ssl_session_init( ssl->session_negotiate );
|
ssl_session_init( ssl->session_negotiate );
|
||||||
ssl_transform_init( ssl->transform_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 );
|
return( 0 );
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user