From 8de259b9539d6936870780fd3ff6a768a749783d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Wed, 11 Jun 2014 14:19:06 +0200 Subject: [PATCH] Minor code simplification in ssl programs --- programs/ssl/ssl_client2.c | 4 +--- programs/ssl/ssl_server2.c | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/programs/ssl/ssl_client2.c b/programs/ssl/ssl_client2.c index 06e4a16a4..8db6ddb77 100644 --- a/programs/ssl/ssl_client2.c +++ b/programs/ssl/ssl_client2.c @@ -458,11 +458,9 @@ int main( int argc, char *argv[] ) opt.psk_identity = q; else if( strcmp( p, "force_ciphersuite" ) == 0 ) { - opt.force_ciphersuite[0] = -1; - opt.force_ciphersuite[0] = ssl_get_ciphersuite_id( q ); - if( opt.force_ciphersuite[0] <= 0 ) + if( opt.force_ciphersuite[0] == 0 ) { ret = 2; goto usage; diff --git a/programs/ssl/ssl_server2.c b/programs/ssl/ssl_server2.c index 8af5f6429..9f53ad287 100644 --- a/programs/ssl/ssl_server2.c +++ b/programs/ssl/ssl_server2.c @@ -736,11 +736,9 @@ int main( int argc, char *argv[] ) opt.psk_list = q; else if( strcmp( p, "force_ciphersuite" ) == 0 ) { - opt.force_ciphersuite[0] = -1; - opt.force_ciphersuite[0] = ssl_get_ciphersuite_id( q ); - if( opt.force_ciphersuite[0] <= 0 ) + if( opt.force_ciphersuite[0] == 0 ) { ret = 2; goto usage;