mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-04-24 15:02:55 +00:00
Fix typos and code style
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
This commit is contained in:
parent
4ca0d72c3b
commit
77fc9ab1ba
@ -346,7 +346,7 @@ int main( void )
|
|||||||
|
|
||||||
#define USAGE_KEY_OPAQUE_ALGS \
|
#define USAGE_KEY_OPAQUE_ALGS \
|
||||||
" key_opaque_algs=%%s Allowed opaque key algorithms.\n" \
|
" key_opaque_algs=%%s Allowed opaque key algorithms.\n" \
|
||||||
" coma-separated pair of values among the following:\n" \
|
" comma-separated pair of values among the following:\n" \
|
||||||
" rsa-sign-pkcs1, rsa-sign-pss, rsa-decrypt,\n" \
|
" rsa-sign-pkcs1, rsa-sign-pss, rsa-decrypt,\n" \
|
||||||
" ecdsa-sign, ecdh, none (only acceptable for\n" \
|
" ecdsa-sign, ecdh, none (only acceptable for\n" \
|
||||||
" the second value).\n" \
|
" the second value).\n" \
|
||||||
@ -1323,8 +1323,8 @@ int main( int argc, char *argv[] )
|
|||||||
}
|
}
|
||||||
else if( strcmp( p, "key_opaque_algs" ) == 0 )
|
else if( strcmp( p, "key_opaque_algs" ) == 0 )
|
||||||
{
|
{
|
||||||
if ( key_opaque_alg_parse( q, &opt.key_opaque_alg1,
|
if( key_opaque_alg_parse( q, &opt.key_opaque_alg1,
|
||||||
&opt.key_opaque_alg2 ) != 0 )
|
&opt.key_opaque_alg2 ) != 0 )
|
||||||
goto usage;
|
goto usage;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -458,7 +458,7 @@ int main( void )
|
|||||||
|
|
||||||
#define USAGE_KEY_OPAQUE_ALGS \
|
#define USAGE_KEY_OPAQUE_ALGS \
|
||||||
" key_opaque_algs=%%s Allowed opaque key algorithms.\n" \
|
" key_opaque_algs=%%s Allowed opaque key algorithms.\n" \
|
||||||
" coma-separated pair of values among the following:\n" \
|
" comma-separated pair of values among the following:\n" \
|
||||||
" rsa-sign-pkcs1, rsa-sign-pss, rsa-decrypt,\n" \
|
" rsa-sign-pkcs1, rsa-sign-pss, rsa-decrypt,\n" \
|
||||||
" ecdsa-sign, ecdh, none (only acceptable for\n" \
|
" ecdsa-sign, ecdh, none (only acceptable for\n" \
|
||||||
" the second value).\n" \
|
" the second value).\n" \
|
||||||
@ -690,7 +690,7 @@ static int get_auth_mode( const char *s )
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Used by sni_parse and psk_parse to handle coma-separated lists
|
* Used by sni_parse and psk_parse to handle comma-separated lists
|
||||||
*/
|
*/
|
||||||
#define GET_ITEM( dst ) \
|
#define GET_ITEM( dst ) \
|
||||||
do \
|
do \
|
||||||
@ -2103,8 +2103,8 @@ int main( int argc, char *argv[] )
|
|||||||
}
|
}
|
||||||
else if( strcmp( p, "key_opaque_algs" ) == 0 )
|
else if( strcmp( p, "key_opaque_algs" ) == 0 )
|
||||||
{
|
{
|
||||||
if ( key_opaque_alg_parse( q, &opt.key_opaque_alg1,
|
if( key_opaque_alg_parse( q, &opt.key_opaque_alg1,
|
||||||
&opt.key_opaque_alg2 ) != 0 )
|
&opt.key_opaque_alg2 ) != 0 )
|
||||||
goto usage;
|
goto usage;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -203,19 +203,19 @@ int key_opaque_alg_parse( const char *arg, const char **alg1, const char **alg2
|
|||||||
*alg1 = arg;
|
*alg1 = arg;
|
||||||
*alg2 = separator + 1;
|
*alg2 = separator + 1;
|
||||||
|
|
||||||
if ( strcmp( *alg1, "rsa-sign-pkcs1" ) != 0 &&
|
if( strcmp( *alg1, "rsa-sign-pkcs1" ) != 0 &&
|
||||||
strcmp( *alg1, "rsa-sign-pss" ) != 0 &&
|
strcmp( *alg1, "rsa-sign-pss" ) != 0 &&
|
||||||
strcmp( *alg1, "rsa-decrypt" ) != 0 &&
|
strcmp( *alg1, "rsa-decrypt" ) != 0 &&
|
||||||
strcmp( *alg1, "ecdsa-sign" ) != 0 &&
|
strcmp( *alg1, "ecdsa-sign" ) != 0 &&
|
||||||
strcmp( *alg1, "ecdh" ) != 0 )
|
strcmp( *alg1, "ecdh" ) != 0 )
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
if ( strcmp( *alg2, "rsa-sign-pkcs1" ) != 0 &&
|
if( strcmp( *alg2, "rsa-sign-pkcs1" ) != 0 &&
|
||||||
strcmp( *alg2, "rsa-sign-pss" ) != 0 &&
|
strcmp( *alg2, "rsa-sign-pss" ) != 0 &&
|
||||||
strcmp( *alg2, "rsa-decrypt" ) != 0 &&
|
strcmp( *alg2, "rsa-decrypt" ) != 0 &&
|
||||||
strcmp( *alg2, "ecdsa-sign" ) != 0 &&
|
strcmp( *alg2, "ecdsa-sign" ) != 0 &&
|
||||||
strcmp( *alg2, "ecdh" ) != 0 &&
|
strcmp( *alg2, "ecdh" ) != 0 &&
|
||||||
strcmp( *alg2, "none" ) != 0 )
|
strcmp( *alg2, "none" ) != 0 )
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -240,7 +240,6 @@ int rng_get( void *p_rng, unsigned char *output, size_t output_len );
|
|||||||
*/
|
*/
|
||||||
int key_opaque_alg_parse( const char *arg, const char **alg1, const char **alg2 );
|
int key_opaque_alg_parse( const char *arg, const char **alg1, const char **alg2 );
|
||||||
|
|
||||||
|
|
||||||
#if defined(MBEDTLS_USE_PSA_CRYPTO) && defined(MBEDTLS_PSA_CRYPTO_EXTERNAL_RNG)
|
#if defined(MBEDTLS_USE_PSA_CRYPTO) && defined(MBEDTLS_PSA_CRYPTO_EXTERNAL_RNG)
|
||||||
/* The test implementation of the PSA external RNG is insecure. When
|
/* The test implementation of the PSA external RNG is insecure. When
|
||||||
* MBEDTLS_PSA_CRYPTO_EXTERNAL_RNG is enabled, before using any PSA crypto
|
* MBEDTLS_PSA_CRYPTO_EXTERNAL_RNG is enabled, before using any PSA crypto
|
||||||
|
Loading…
x
Reference in New Issue
Block a user