mirror of
https://git.suyu.dev/suyu/mbedtls.git
synced 2025-12-29 18:56:27 +01:00
Make endpoint+transport args of config_defaults()
This commit is contained in:
parent
def0bbe3ab
commit
419d5ae419
14 changed files with 98 additions and 103 deletions
|
|
@ -396,7 +396,9 @@ int main( int argc, char *argv[] )
|
|||
/*
|
||||
* 3. Setup stuff
|
||||
*/
|
||||
if( ( ret = mbedtls_ssl_config_defaults( &conf ) ) != 0 )
|
||||
if( ( ret = mbedtls_ssl_config_defaults( &conf,
|
||||
MBEDTLS_SSL_IS_CLIENT,
|
||||
MBEDTLS_SSL_TRANSPORT_STREAM ) ) != 0 )
|
||||
{
|
||||
mbedtls_printf( " failed\n ! mbedtls_ssl_config_defaults returned %d\n\n", ret );
|
||||
goto exit;
|
||||
|
|
@ -408,7 +410,6 @@ int main( int argc, char *argv[] )
|
|||
goto ssl_exit;
|
||||
}
|
||||
|
||||
mbedtls_ssl_set_endpoint( &ssl, MBEDTLS_SSL_IS_CLIENT );
|
||||
if( verify )
|
||||
{
|
||||
mbedtls_ssl_set_authmode( &ssl, MBEDTLS_SSL_VERIFY_REQUIRED );
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue