mirror of
https://github.com/yuzu-emu/mbedtls
synced 2024-11-24 20:58:26 +00:00
Minor code simplification in ssl programs
This commit is contained in:
parent
95c0a63023
commit
8de259b953
2 changed files with 2 additions and 6 deletions
|
@ -458,11 +458,9 @@ int main( int argc, char *argv[] )
|
||||||
opt.psk_identity = q;
|
opt.psk_identity = q;
|
||||||
else if( strcmp( p, "force_ciphersuite" ) == 0 )
|
else if( strcmp( p, "force_ciphersuite" ) == 0 )
|
||||||
{
|
{
|
||||||
opt.force_ciphersuite[0] = -1;
|
|
||||||
|
|
||||||
opt.force_ciphersuite[0] = ssl_get_ciphersuite_id( q );
|
opt.force_ciphersuite[0] = ssl_get_ciphersuite_id( q );
|
||||||
|
|
||||||
if( opt.force_ciphersuite[0] <= 0 )
|
if( opt.force_ciphersuite[0] == 0 )
|
||||||
{
|
{
|
||||||
ret = 2;
|
ret = 2;
|
||||||
goto usage;
|
goto usage;
|
||||||
|
|
|
@ -736,11 +736,9 @@ int main( int argc, char *argv[] )
|
||||||
opt.psk_list = q;
|
opt.psk_list = q;
|
||||||
else if( strcmp( p, "force_ciphersuite" ) == 0 )
|
else if( strcmp( p, "force_ciphersuite" ) == 0 )
|
||||||
{
|
{
|
||||||
opt.force_ciphersuite[0] = -1;
|
|
||||||
|
|
||||||
opt.force_ciphersuite[0] = ssl_get_ciphersuite_id( q );
|
opt.force_ciphersuite[0] = ssl_get_ciphersuite_id( q );
|
||||||
|
|
||||||
if( opt.force_ciphersuite[0] <= 0 )
|
if( opt.force_ciphersuite[0] == 0 )
|
||||||
{
|
{
|
||||||
ret = 2;
|
ret = 2;
|
||||||
goto usage;
|
goto usage;
|
||||||
|
|
Loading…
Reference in a new issue