ssl_cli/srv2: Indicate nss_keylog and eap_tls are mut. exclusive

This commit is contained in:
Hanno Becker 2019-09-09 11:38:51 +01:00
parent 48f3a3d101
commit bc5308cb9a
2 changed files with 16 additions and 2 deletions

View file

@ -234,7 +234,8 @@ int main( void )
#define USAGE_EAP_TLS \
" eap_tls=%%d default: 0 (disabled)\n"
#define USAGE_NSS_KEYLOG \
" nss_keylog=%%d default: 0 (disabled)\n"
" nss_keylog=%%d default: 0 (disabled)\n" \
" This cannot be used with eap_tls=1\n"
#define USAGE_NSS_KEYLOG_FILE \
" nss_keylog_file=%%s\n"
#else
@ -1707,6 +1708,12 @@ int main( int argc, char *argv[] )
goto usage;
}
if( opt.nss_keylog != 0 && opt.eap_tls != 0 )
{
mbedtls_printf( "Error: eap_tls and nss_keylog options cannot be used together.\n" );
goto usage;
}
/* Event-driven IO is incompatible with the above custom
* receive and send functions, as the polling builds on
* refers to the underlying net_context. */

View file

@ -311,7 +311,8 @@ int main( void )
#define USAGE_EAP_TLS \
" eap_tls=%%d default: 0 (disabled)\n"
#define USAGE_NSS_KEYLOG \
" nss_keylog=%%d default: 0 (disabled)\n"
" nss_keylog=%%d default: 0 (disabled)\n" \
" This cannot be used with eap_tls=1\n"
#define USAGE_NSS_KEYLOG_FILE \
" nss_keylog_file=%%s\n"
#else
@ -2424,6 +2425,12 @@ int main( int argc, char *argv[] )
goto usage;
}
if( opt.nss_keylog != 0 && opt.eap_tls != 0 )
{
mbedtls_printf( "Error: eap_tls and nss_keylog options cannot be used together.\n" );
goto usage;
}
/* Event-driven IO is incompatible with the above custom
* receive and send functions, as the polling builds on
* refers to the underlying net_context. */