From 9f4cc5ff65f03fa8ef60b4bfecc4ebeb0afb0e3c Mon Sep 17 00:00:00 2001 From: Jerry Yu Date: Thu, 16 Jun 2022 11:40:44 +0800 Subject: [PATCH] Add pss_rsae sig algs into test conf Signed-off-by: Jerry Yu --- programs/ssl/ssl_test_common_source.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/programs/ssl/ssl_test_common_source.c b/programs/ssl/ssl_test_common_source.c index 0e66895dbd..6da5dea5ef 100644 --- a/programs/ssl/ssl_test_common_source.c +++ b/programs/ssl/ssl_test_common_source.c @@ -263,12 +263,24 @@ int send_cb( void *ctx, unsigned char const *buf, size_t len ) #if defined(MBEDTLS_X509_CRT_PARSE_C) #if defined(MBEDTLS_ECDSA_C) && defined(MBEDTLS_RSA_C) +#if defined(MBEDTLS_SSL_PROTO_TLS1_3) +#define MBEDTLS_SSL_SIG_ALG( hash ) (( hash << 8 ) | MBEDTLS_SSL_SIG_ECDSA), \ + ( 0x800 | hash ), \ + (( hash << 8 ) | MBEDTLS_SSL_SIG_RSA), + +#else #define MBEDTLS_SSL_SIG_ALG( hash ) (( hash << 8 ) | MBEDTLS_SSL_SIG_ECDSA), \ (( hash << 8 ) | MBEDTLS_SSL_SIG_RSA), +#endif #elif defined(MBEDTLS_ECDSA_C) #define MBEDTLS_SSL_SIG_ALG( hash ) (( hash << 8 ) | MBEDTLS_SSL_SIG_ECDSA), #elif defined(MBEDTLS_RSA_C) +#if defined(MBEDTLS_SSL_PROTO_TLS1_3) +#define MBEDTLS_SSL_SIG_ALG( hash ) ( 0x800 | hash ), \ + (( hash << 8 ) | MBEDTLS_SSL_SIG_RSA), +#else #define MBEDTLS_SSL_SIG_ALG( hash ) (( hash << 8 ) | MBEDTLS_SSL_SIG_RSA), +#endif #else #define MBEDTLS_SSL_SIG_ALG( hash ) #endif