mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-11-15 15:21:08 +03:00
library: debug: remove temporary fixes for RSA key handling
Since crypto#308 has been merged: - replace MBEDTLS_PK_USE_PSA_RSA_DATA with PSA_WANT_KEY_TYPE_RSA_PUBLIC_KEY - remove "no-check-names" Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
This commit is contained in:
@@ -220,8 +220,7 @@ void mbedtls_debug_print_mpi(const mbedtls_ssl_context *ssl, int level,
|
|||||||
|
|
||||||
#if defined(MBEDTLS_X509_CRT_PARSE_C) && !defined(MBEDTLS_X509_REMOVE_INFO)
|
#if defined(MBEDTLS_X509_CRT_PARSE_C) && !defined(MBEDTLS_X509_REMOVE_INFO)
|
||||||
|
|
||||||
/* no-check-names will be removed in mbedtls#10229. */
|
#if defined(PSA_WANT_KEY_TYPE_ECC_PUBLIC_KEY) || defined(PSA_WANT_KEY_TYPE_RSA_PUBLIC_KEY)
|
||||||
#if defined(PSA_WANT_KEY_TYPE_ECC_PUBLIC_KEY) || defined(MBEDTLS_PK_USE_PSA_RSA_DATA) //no-check-names
|
|
||||||
static void mbedtls_debug_print_integer(const mbedtls_ssl_context *ssl, int level,
|
static void mbedtls_debug_print_integer(const mbedtls_ssl_context *ssl, int level,
|
||||||
const char *file, int line, const char *text,
|
const char *file, int line, const char *text,
|
||||||
const unsigned char *buf, size_t bitlen)
|
const unsigned char *buf, size_t bitlen)
|
||||||
@@ -257,8 +256,7 @@ static void mbedtls_debug_print_integer(const mbedtls_ssl_context *ssl, int leve
|
|||||||
debug_send_line(ssl, level, file, line, str);
|
debug_send_line(ssl, level, file, line, str);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* no-check-names will be removed in mbedtls#10229. */
|
#endif /* PSA_WANT_KEY_TYPE_ECC_PUBLIC_KEY || PSA_WANT_KEY_TYPE_RSA_PUBLIC_KEY */
|
||||||
#endif /* PSA_WANT_KEY_TYPE_ECC_PUBLIC_KEY || MBEDTLS_PK_USE_PSA_RSA_DATA */ //no-check-names
|
|
||||||
|
|
||||||
#if defined(PSA_WANT_KEY_TYPE_ECC_PUBLIC_KEY)
|
#if defined(PSA_WANT_KEY_TYPE_ECC_PUBLIC_KEY)
|
||||||
static void mbedtls_debug_print_psa_ec(const mbedtls_ssl_context *ssl, int level,
|
static void mbedtls_debug_print_psa_ec(const mbedtls_ssl_context *ssl, int level,
|
||||||
@@ -292,8 +290,7 @@ static void mbedtls_debug_print_psa_ec(const mbedtls_ssl_context *ssl, int level
|
|||||||
}
|
}
|
||||||
#endif /* PSA_WANT_KEY_TYPE_ECC_PUBLIC_KEY */
|
#endif /* PSA_WANT_KEY_TYPE_ECC_PUBLIC_KEY */
|
||||||
|
|
||||||
/* no-check-names will be removed in mbedtls#10229. */
|
#if defined(PSA_WANT_KEY_TYPE_RSA_PUBLIC_KEY)
|
||||||
#if defined(MBEDTLS_PK_USE_PSA_RSA_DATA) //no-check-names
|
|
||||||
static size_t debug_count_valid_bits(unsigned char **buf, size_t len)
|
static size_t debug_count_valid_bits(unsigned char **buf, size_t len)
|
||||||
{
|
{
|
||||||
size_t i, bits;
|
size_t i, bits;
|
||||||
@@ -389,8 +386,7 @@ static void mbedtls_debug_print_psa_rsa(const mbedtls_ssl_context *ssl, int leve
|
|||||||
mbedtls_snprintf(str, sizeof(str), "%s.E", text);
|
mbedtls_snprintf(str, sizeof(str), "%s.E", text);
|
||||||
mbedtls_debug_print_integer(ssl, level, file, line, str, start_cur, bits);
|
mbedtls_debug_print_integer(ssl, level, file, line, str, start_cur, bits);
|
||||||
}
|
}
|
||||||
/* no-check-names will be removed in mbedtls#10229. */
|
#endif /* PSA_WANT_KEY_TYPE_RSA_PUBLIC_KEY */
|
||||||
#endif /* MBEDTLS_PK_USE_PSA_RSA_DATA */ //no-check-names
|
|
||||||
|
|
||||||
static void debug_print_pk(const mbedtls_ssl_context *ssl, int level,
|
static void debug_print_pk(const mbedtls_ssl_context *ssl, int level,
|
||||||
const char *file, int line,
|
const char *file, int line,
|
||||||
@@ -421,12 +417,11 @@ static void debug_print_pk(const mbedtls_ssl_context *ssl, int level,
|
|||||||
mbedtls_debug_print_mpi(ssl, level, file, line, name, items[i].value);
|
mbedtls_debug_print_mpi(ssl, level, file, line, name, items[i].value);
|
||||||
} else
|
} else
|
||||||
#endif /* MBEDTLS_RSA_C */
|
#endif /* MBEDTLS_RSA_C */
|
||||||
/* no-check-names will be removed in mbedtls#10229. */
|
#if defined(PSA_WANT_KEY_TYPE_RSA_PUBLIC_KEY)
|
||||||
#if defined(MBEDTLS_PK_USE_PSA_RSA_DATA) //no-check-names
|
if (items[i].type == MBEDTLS_PK_DEBUG_PSA_RSA) {
|
||||||
if (items[i].type == MBEDTLS_PK_DEBUG_PSA_RSA) { //no-check-names
|
|
||||||
mbedtls_debug_print_psa_rsa(ssl, level, file, line, name, items[i].value);
|
mbedtls_debug_print_psa_rsa(ssl, level, file, line, name, items[i].value);
|
||||||
} else
|
} else
|
||||||
#endif /* MBEDTLS_PK_USE_PSA_RSA_DATA */ //no-check-names
|
#endif /* PSA_WANT_KEY_TYPE_RSA_PUBLIC_KEY */
|
||||||
#if defined(PSA_WANT_KEY_TYPE_ECC_PUBLIC_KEY)
|
#if defined(PSA_WANT_KEY_TYPE_ECC_PUBLIC_KEY)
|
||||||
if (items[i].type == MBEDTLS_PK_DEBUG_PSA_EC) {
|
if (items[i].type == MBEDTLS_PK_DEBUG_PSA_EC) {
|
||||||
mbedtls_debug_print_psa_ec(ssl, level, file, line, name, items[i].value);
|
mbedtls_debug_print_psa_ec(ssl, level, file, line, name, items[i].value);
|
||||||
|
|||||||
Reference in New Issue
Block a user