1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-07-29 11:41:15 +03:00

Split ssl_init() -> ssl_setup()

This commit is contained in:
Manuel Pégourié-Gonnard
2015-04-29 00:48:22 +02:00
parent ec160c0f53
commit 41d479e7df
15 changed files with 57 additions and 41 deletions

View File

@ -761,7 +761,7 @@ int main( int argc, char *argv[] )
* Make sure memory references are valid in case we exit early.
*/
listen_fd = 0;
memset( &ssl, 0, sizeof( mbedtls_ssl_context ) );
mbedtls_ssl_init( &ssl );
mbedtls_ctr_drbg_init( &ctr_drbg );
#if defined(MBEDTLS_X509_CRT_PARSE_C)
mbedtls_x509_crt_init( &cacert );
@ -1518,9 +1518,9 @@ int main( int argc, char *argv[] )
mbedtls_printf( " . Setting up the SSL/TLS structure..." );
fflush( stdout );
if( ( ret = mbedtls_ssl_init( &ssl ) ) != 0 )
if( ( ret = mbedtls_ssl_setup( &ssl ) ) != 0 )
{
mbedtls_printf( " failed\n ! mbedtls_ssl_init returned -0x%x\n\n", -ret );
mbedtls_printf( " failed\n ! mbedtls_ssl_setup returned -0x%x\n\n", -ret );
goto exit;
}