Fix missing include in some pkey programs

The programs assume that including "pk.h" brings up "bignum.h". When
MBEDTLS_USE_TINYCRYPT is enabled and MBEDTLS_RSA_C is disabled, that
assumption no longer holds. Fix that by explicitly including bignum.h from the
programs that need it.

This is a bug pre-existing to this PR, fixed here to enable the inclusion of a
test with a config that happens to reveal it.
This commit is contained in:
Manuel Pégourié-Gonnard 2019-09-19 10:45:14 +02:00
parent 097628f871
commit f4afbf926e
3 changed files with 3 additions and 0 deletions

View file

@ -39,6 +39,7 @@
#if defined(MBEDTLS_PK_WRITE_C) && defined(MBEDTLS_FS_IO) #if defined(MBEDTLS_PK_WRITE_C) && defined(MBEDTLS_FS_IO)
#include "mbedtls/error.h" #include "mbedtls/error.h"
#include "mbedtls/pk.h" #include "mbedtls/pk.h"
#include "mbedtls/bignum.h"
#include "mbedtls/error.h" #include "mbedtls/error.h"
#include <stdio.h> #include <stdio.h>

View file

@ -56,6 +56,7 @@ int main( void )
#include "mbedtls/ctr_drbg.h" #include "mbedtls/ctr_drbg.h"
#include "mbedtls/md.h" #include "mbedtls/md.h"
#include "mbedtls/pk.h" #include "mbedtls/pk.h"
#include "mbedtls/bignum.h"
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>

View file

@ -52,6 +52,7 @@ int main( void )
#include "mbedtls/error.h" #include "mbedtls/error.h"
#include "mbedtls/md.h" #include "mbedtls/md.h"
#include "mbedtls/pk.h" #include "mbedtls/pk.h"
#include "mbedtls/bignum.h"
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>