mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-28 00:21:48 +03:00
Check return value of ssl_set_xxx() in programs
This commit is contained in:
@ -173,7 +173,11 @@ static void *handle_ssl_connection( void *data )
|
||||
#endif
|
||||
|
||||
ssl_set_ca_chain( &ssl, thread_info->ca_chain, NULL, NULL );
|
||||
ssl_set_own_cert( &ssl, thread_info->server_cert, thread_info->server_key );
|
||||
if( ( ret = ssl_set_own_cert( &ssl, thread_info->server_cert, thread_info->server_key ) ) != 0 )
|
||||
{
|
||||
printf( " failed\n ! ssl_set_own_cert returned %d\n\n", ret );
|
||||
goto exit;
|
||||
}
|
||||
|
||||
printf( " [ #%d ] ok\n", thread_id );
|
||||
|
||||
|
Reference in New Issue
Block a user