From b4b19f395f776ce5b9c16b750162dc25f9722da2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Tue, 7 Jul 2015 11:41:21 +0200 Subject: [PATCH] Add a debug message --- library/ssl_cli.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/library/ssl_cli.c b/library/ssl_cli.c index af28d00fc2..1d683d3072 100644 --- a/library/ssl_cli.c +++ b/library/ssl_cli.c @@ -2515,7 +2515,10 @@ static int ssl_write_client_key_exchange( mbedtls_ssl_context *ssl ) * opaque psk_identity<0..2^16-1>; */ if( ssl->conf->psk == NULL || ssl->conf->psk_identity == NULL ) + { + MBEDTLS_SSL_DEBUG_MSG( 1, ( "got no private key for PSK" ) ); return( MBEDTLS_ERR_SSL_PRIVATE_KEY_REQUIRED ); + } i = 4; n = ssl->conf->psk_identity_len; @@ -2695,7 +2698,7 @@ static int ssl_write_certificate_verify( mbedtls_ssl_context *ssl ) if( mbedtls_ssl_own_key( ssl ) == NULL ) { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "got no private key" ) ); + MBEDTLS_SSL_DEBUG_MSG( 1, ( "got no private key for certificate" ) ); return( MBEDTLS_ERR_SSL_PRIVATE_KEY_REQUIRED ); }