From 609d79ed8e0ca56511a54a95d6d61a631d396f7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Tue, 18 Feb 2020 10:22:54 +0100 Subject: [PATCH] Fix pkparse bug wrt MBEDTLS_RSA_ALT Some code paths want to access members of the mbedtls_rsa_context structure. We can only do that when using our own implementation, as otherwise we don't know anything about that structure. --- library/pkparse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/pkparse.c b/library/pkparse.c index 95b1989cc..7502fe7ff 100644 --- a/library/pkparse.c +++ b/library/pkparse.c @@ -770,7 +770,7 @@ static int pk_parse_key_pkcs1_der( mbedtls_rsa_context *rsa, NULL, NULL ) ) != 0 ) goto cleanup; -#if !defined(MBEDTLS_RSA_NO_CRT) +#if !defined(MBEDTLS_RSA_NO_CRT) && !defined(MBEDTLS_RSA_ALT) /* * The RSA CRT parameters DP, DQ and QP are nominally redundant, in * that they can be easily recomputed from D, P and Q. However by