mirror of
https://git.suyu.dev/suyu/mbedtls.git
synced 2025-12-21 21:36:21 +01:00
Change a few ssl_conf return types to void
This commit is contained in:
parent
caace65711
commit
01e5e8c1f8
5 changed files with 31 additions and 97 deletions
|
|
@ -1183,24 +1183,10 @@ int main( int argc, char *argv[] )
|
|||
#endif
|
||||
|
||||
if( opt.min_version != DFL_MIN_VERSION )
|
||||
{
|
||||
ret = mbedtls_ssl_conf_min_version( &conf, MBEDTLS_SSL_MAJOR_VERSION_3, opt.min_version );
|
||||
if( ret != 0 )
|
||||
{
|
||||
mbedtls_printf( " failed\n ! selected min_version is not available\n" );
|
||||
goto exit;
|
||||
}
|
||||
}
|
||||
mbedtls_ssl_conf_min_version( &conf, MBEDTLS_SSL_MAJOR_VERSION_3, opt.min_version );
|
||||
|
||||
if( opt.max_version != DFL_MAX_VERSION )
|
||||
{
|
||||
ret = mbedtls_ssl_conf_max_version( &conf, MBEDTLS_SSL_MAJOR_VERSION_3, opt.max_version );
|
||||
if( ret != 0 )
|
||||
{
|
||||
mbedtls_printf( " failed\n ! selected max_version is not available\n" );
|
||||
goto exit;
|
||||
}
|
||||
}
|
||||
mbedtls_ssl_conf_max_version( &conf, MBEDTLS_SSL_MAJOR_VERSION_3, opt.max_version );
|
||||
|
||||
#if defined(MBEDTLS_SSL_FALLBACK_SCSV)
|
||||
if( opt.fallback != DFL_FALLBACK )
|
||||
|
|
|
|||
|
|
@ -1735,24 +1735,10 @@ int main( int argc, char *argv[] )
|
|||
#endif
|
||||
|
||||
if( opt.min_version != DFL_MIN_VERSION )
|
||||
{
|
||||
ret = mbedtls_ssl_conf_min_version( &conf, MBEDTLS_SSL_MAJOR_VERSION_3, opt.min_version );
|
||||
if( ret != 0 )
|
||||
{
|
||||
mbedtls_printf( " failed\n ! selected min_version is not available\n" );
|
||||
goto exit;
|
||||
}
|
||||
}
|
||||
mbedtls_ssl_conf_min_version( &conf, MBEDTLS_SSL_MAJOR_VERSION_3, opt.min_version );
|
||||
|
||||
if( opt.max_version != DFL_MIN_VERSION )
|
||||
{
|
||||
ret = mbedtls_ssl_conf_max_version( &conf, MBEDTLS_SSL_MAJOR_VERSION_3, opt.max_version );
|
||||
if( ret != 0 )
|
||||
{
|
||||
mbedtls_printf( " failed\n ! selected max_version is not available\n" );
|
||||
goto exit;
|
||||
}
|
||||
}
|
||||
mbedtls_ssl_conf_max_version( &conf, MBEDTLS_SSL_MAJOR_VERSION_3, opt.max_version );
|
||||
|
||||
mbedtls_printf( " ok\n" );
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue