From 2d3ac68336f36af3dbb94be6596059d6c0a925f0 Mon Sep 17 00:00:00 2001 From: Hanno Becker Date: Mon, 17 Aug 2020 09:42:37 +0100 Subject: [PATCH] Parse key-file and -password parameters in same place in ssl_client2 Signed-off-by: Hanno Becker --- programs/ssl/ssl_client2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/programs/ssl/ssl_client2.c b/programs/ssl/ssl_client2.c index ebe71ce50..553598c55 100644 --- a/programs/ssl/ssl_client2.c +++ b/programs/ssl/ssl_client2.c @@ -1375,6 +1375,8 @@ int main( int argc, char *argv[] ) opt.crt_file = q; else if( strcmp( p, "key_file" ) == 0 ) opt.key_file = q; + else if( strcmp( p, "key_pwd" ) == 0 ) + opt.key_pwd = q; #if defined(MBEDTLS_USE_PSA_CRYPTO) && defined(MBEDTLS_X509_CRT_PARSE_C) else if( strcmp( p, "key_opaque" ) == 0 ) opt.key_opaque = atoi( q ); @@ -1401,8 +1403,6 @@ int main( int argc, char *argv[] ) opt.cid_val_renego = q; } #endif /* MBEDTLS_SSL_DTLS_CONNECTION_ID */ - else if( strcmp( p, "key_pwd" ) == 0 ) - opt.key_pwd = q; else if( strcmp( p, "psk" ) == 0 ) opt.psk = q; #if defined(MBEDTLS_USE_PSA_CRYPTO)