diff --git a/programs/pkey/gen_key.c b/programs/pkey/gen_key.c index fca35e55a..275e541c2 100644 --- a/programs/pkey/gen_key.c +++ b/programs/pkey/gen_key.c @@ -33,8 +33,9 @@ #define polarssl_printf printf #endif -#if defined(POLARSSL_PK_WRITE_C) && defined(POLARSSL_FS_IO) && \ - defined(POLARSSL_ENTROPY_C) && defined(POLARSSL_CTR_DRBG_C) +#if defined(POLARSSL_PK_WRITE_C) && defined(POLARSSL_PEM_WRITE_C) && \ + defined(POLARSSL_FS_IO) && defined(POLARSSL_ENTROPY_C) && \ + defined(POLARSSL_CTR_DRBG_C) #include "polarssl/error.h" #include "polarssl/pk.h" #include "polarssl/ecdsa.h" @@ -121,12 +122,14 @@ int dev_random_entropy_poll( void *data, unsigned char *output, USAGE_DEV_RANDOM \ "\n" -#if !defined(POLARSSL_PK_WRITE_C) || !defined(POLARSSL_FS_IO) || \ - !defined(POLARSSL_ENTROPY_C) || !defined(POLARSSL_CTR_DRBG_C) +#if !defined(POLARSSL_PK_WRITE_C) || !defined(POLARSSL_PEM_WRITE_C) || \ + !defined(POLARSSL_FS_IO) || !defined(POLARSSL_ENTROPY_C) || \ + !defined(POLARSSL_CTR_DRBG_C) int main( void ) { polarssl_printf( "POLARSSL_PK_WRITE_C and/or POLARSSL_FS_IO and/or " - "POLARSSL_ENTROPY_C and/or POLARSSL_CTR_DRBG_C " + "POLARSSL_ENTROPY_C and/or POLARSSL_CTR_DRBG_C and/or " + "POLARSSL_PEM_WRITE_C " "not defined.\n" ); return( 0 ); } @@ -417,4 +420,5 @@ exit: return( ret ); } -#endif /* POLARSSL_PK_WRITE_C && POLARSSL_FS_IO */ +#endif /* POLARSSL_PK_WRITE_C && POLARSSL_PEM_WRITE_C && POLARSSL_FS_IO && + * POLARSSL_ENTROPY_C && POLARSSL_CTR_DRBG_C */ diff --git a/programs/x509/cert_req.c b/programs/x509/cert_req.c index 01b8107a1..0e8862f37 100644 --- a/programs/x509/cert_req.c +++ b/programs/x509/cert_req.c @@ -35,13 +35,15 @@ #if !defined(POLARSSL_X509_CSR_WRITE_C) || !defined(POLARSSL_FS_IO) || \ !defined(POLARSSL_PK_PARSE_C) || !defined(POLARSSL_SHA256_C) || \ - !defined(POLARSSL_ENTROPY_C) || !defined(POLARSSL_CTR_DRBG_C) + !defined(POLARSSL_ENTROPY_C) || !defined(POLARSSL_CTR_DRBG_C) || \ + !defined(POLARSSL_PEM_WRITE_C) int main( void ) { polarssl_printf( "POLARSSL_X509_CSR_WRITE_C and/or POLARSSL_FS_IO and/or " - "POLARSSL_PK_PARSE_C and/or POLARSSL_SHA256_c and/or " - "POLARSSL_ENTROPY_C and/or POLARSSL_CTR_DRBG_C " - "not defined.\n"); + "POLARSSL_PK_PARSE_C and/or POLARSSL_SHA256_c and/or " + "POLARSSL_ENTROPY_C and/or POLARSSL_CTR_DRBG_C and/or " + "POLARSSL_PEM_WRITE_C " + "not defined.\n"); return( 0 ); } #else @@ -341,4 +343,4 @@ exit: return( ret ); } #endif /* POLARSSL_X509_CSR_WRITE_C && POLARSSL_PK_PARSE_C && POLARSSL_FS_IO && - POLARSSL_ENTROPY_C && POLARSSL_CTR_DRBG_C */ + POLARSSL_ENTROPY_C && POLARSSL_CTR_DRBG_C && POLARSSL_PEM_WRITE_C */ diff --git a/programs/x509/cert_write.c b/programs/x509/cert_write.c index 57cb6c7c0..290eebcf2 100644 --- a/programs/x509/cert_write.c +++ b/programs/x509/cert_write.c @@ -36,13 +36,16 @@ #if !defined(POLARSSL_X509_CRT_WRITE_C) || \ !defined(POLARSSL_X509_CRT_PARSE_C) || !defined(POLARSSL_FS_IO) || \ !defined(POLARSSL_ENTROPY_C) || !defined(POLARSSL_CTR_DRBG_C) || \ - !defined(POLARSSL_ERROR_C) || !defined(POLARSSL_SHA256_C) + !defined(POLARSSL_ERROR_C) || !defined(POLARSSL_SHA256_C) || \ + !defined(POLARSSL_PEM_WRITE_C) int main( void ) { - polarssl_printf( "POLARSSL_X509_CRT_WRITE_C and/or POLARSSL_X509_CRT_PARSE_C and/or " - "POLARSSL_FS_IO and/or POLARSSL_SHA256_C and_or " - "POLARSSL_ENTROPY_C and/or POLARSSL_CTR_DRBG_C and/or " - "POLARSSL_ERROR_C not defined.\n"); + polarssl_printf( "POLARSSL_X509_CRT_WRITE_C and/or " + "POLARSSL_X509_CRT_PARSE_C and/or " + "POLARSSL_FS_IO and/or POLARSSL_SHA256_C and_or " + "POLARSSL_ENTROPY_C and/or POLARSSL_CTR_DRBG_C and/or " + "POLARSSL_PEM_WRITE_C and/or " + "POLARSSL_ERROR_C not defined.\n"); return( 0 ); } #else @@ -665,4 +668,4 @@ exit: } #endif /* POLARSSL_X509_CRT_WRITE_C && POLARSSL_X509_CRT_PARSE_C && POLARSSL_FS_IO && POLARSSL_ENTROPY_C && POLARSSL_CTR_DRBG_C && - POLARSSL_ERROR_C */ + POLARSSL_ERROR_C && MBEDTLS_PEM_WRITE_C */