refine supported sig alg print
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
This commit is contained in:
parent
ee28e7a21d
commit
202919c23d
3 changed files with 24 additions and 36 deletions
|
@ -1602,24 +1602,7 @@ int main( int argc, char *argv[] )
|
|||
{
|
||||
ret = -1;
|
||||
mbedtls_printf( "unknown signature algorithm \"%s\"\n", q );
|
||||
mbedtls_printf( "supported signature algorithms:\n" );
|
||||
mbedtls_printf("\trsa_pkcs1_sha256 ");
|
||||
mbedtls_printf("rsa_pkcs1_sha384 ");
|
||||
mbedtls_printf("rsa_pkcs1_sha512\n");
|
||||
mbedtls_printf("\tecdsa_secp256r1_sha256 ");
|
||||
mbedtls_printf("ecdsa_secp384r1_sha384 ");
|
||||
mbedtls_printf("ecdsa_secp521r1_sha512\n");
|
||||
mbedtls_printf("\trsa_pss_rsae_sha256 ");
|
||||
mbedtls_printf("rsa_pss_rsae_sha384 ");
|
||||
mbedtls_printf("rsa_pss_rsae_sha512\n");
|
||||
mbedtls_printf("\trsa_pss_pss_sha256 ");
|
||||
mbedtls_printf("rsa_pss_pss_sha384 ");
|
||||
mbedtls_printf("rsa_pss_pss_sha512\n");
|
||||
mbedtls_printf("\ted25519 ");
|
||||
mbedtls_printf("ed448 ");
|
||||
mbedtls_printf("rsa_pkcs1_sha1 ");
|
||||
mbedtls_printf("ecdsa_sha1\n");
|
||||
mbedtls_printf( "\n" );
|
||||
mbedtls_print_supported_sig_algs();
|
||||
goto exit;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2438,24 +2438,7 @@ int main( int argc, char *argv[] )
|
|||
{
|
||||
ret = -1;
|
||||
mbedtls_printf( "unknown signature algorithm \"%s\"\n", q );
|
||||
mbedtls_printf( "supported signature algorithms:\n" );
|
||||
mbedtls_printf("\trsa_pkcs1_sha256 ");
|
||||
mbedtls_printf("rsa_pkcs1_sha384 ");
|
||||
mbedtls_printf("rsa_pkcs1_sha512\n");
|
||||
mbedtls_printf("\tecdsa_secp256r1_sha256 ");
|
||||
mbedtls_printf("ecdsa_secp384r1_sha384 ");
|
||||
mbedtls_printf("ecdsa_secp521r1_sha512\n");
|
||||
mbedtls_printf("\trsa_pss_rsae_sha256 ");
|
||||
mbedtls_printf("rsa_pss_rsae_sha384 ");
|
||||
mbedtls_printf("rsa_pss_rsae_sha512\n");
|
||||
mbedtls_printf("\trsa_pss_pss_sha256 ");
|
||||
mbedtls_printf("rsa_pss_pss_sha384 ");
|
||||
mbedtls_printf("rsa_pss_pss_sha512\n");
|
||||
mbedtls_printf("\ted25519 ");
|
||||
mbedtls_printf("ed448 ");
|
||||
mbedtls_printf("rsa_pkcs1_sha1 ");
|
||||
mbedtls_printf("ecdsa_sha1\n");
|
||||
mbedtls_printf( "\n" );
|
||||
mbedtls_print_supported_sig_algs();
|
||||
goto exit;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -350,3 +350,25 @@ int x509_crt_verify_info( char *buf, size_t size, const char *prefix,
|
|||
#endif /* MBEDTLS_X509_REMOVE_INFO */
|
||||
}
|
||||
#endif /* MBEDTLS_X509_CRT_PARSE_C */
|
||||
|
||||
void mbedtls_print_supported_sig_algs( void )
|
||||
{
|
||||
mbedtls_printf( "supported signature algorithms:\n" );
|
||||
mbedtls_printf("\trsa_pkcs1_sha256 ");
|
||||
mbedtls_printf("rsa_pkcs1_sha384 ");
|
||||
mbedtls_printf("rsa_pkcs1_sha512\n");
|
||||
mbedtls_printf("\tecdsa_secp256r1_sha256 ");
|
||||
mbedtls_printf("ecdsa_secp384r1_sha384 ");
|
||||
mbedtls_printf("ecdsa_secp521r1_sha512\n");
|
||||
mbedtls_printf("\trsa_pss_rsae_sha256 ");
|
||||
mbedtls_printf("rsa_pss_rsae_sha384 ");
|
||||
mbedtls_printf("rsa_pss_rsae_sha512\n");
|
||||
mbedtls_printf("\trsa_pss_pss_sha256 ");
|
||||
mbedtls_printf("rsa_pss_pss_sha384 ");
|
||||
mbedtls_printf("rsa_pss_pss_sha512\n");
|
||||
mbedtls_printf("\ted25519 ");
|
||||
mbedtls_printf("ed448 ");
|
||||
mbedtls_printf("rsa_pkcs1_sha1 ");
|
||||
mbedtls_printf("ecdsa_sha1\n");
|
||||
mbedtls_printf( "\n" );
|
||||
}
|
Loading…
Reference in a new issue