A few more issues with small configurations

This commit is contained in:
Manuel Pégourié-Gonnard 2013-09-20 12:29:56 +02:00
parent 1a483833b3
commit 7831b0cb3c
3 changed files with 31 additions and 32 deletions

View file

@ -32,6 +32,19 @@
#include "polarssl/config.h"
#if !defined(POLARSSL_RSA_C) || !defined(POLARSSL_X509_CRT_PARSE_C) || \
!defined(POLARSSL_FS_IO)
int main( int argc, char *argv[] )
{
((void) argc);
((void) argv);
printf("POLARSSL_RSA_C and/or POLARSSL_X509_CRT_PARSE_C "
"not defined.\n");
return( 0 );
}
#else
#include "polarssl/certs.h"
#include "polarssl/x509_crt.h"
@ -39,6 +52,7 @@
#define snprintf _snprintf
#endif
#define MAX_CLIENT_CERTS 8
const char *client_certificates[MAX_CLIENT_CERTS] =
@ -65,20 +79,6 @@ const char *client_private_keys[MAX_CLIENT_CERTS] =
"cert_digest.key"
};
#if !defined(POLARSSL_BIGNUM_C) || !defined(POLARSSL_RSA_C) || \
!defined(POLARSSL_X509_CRT_PARSE_C) || !defined(POLARSSL_PK_PARSE_C) || \
!defined(POLARSSL_FS_IO)
int main( int argc, char *argv[] )
{
((void) argc);
((void) argv);
printf("POLARSSL_BIGNUM_C and/or POLARSSL_RSA_C and/or "
"POLARSSL_X509_CRT_PARSE_C and/or POLARSSL_FS_IO and/or "
"POLARSSL_PK_PARSE_C not defined.\n");
return( 0 );
}
#else
int main( int argc, char *argv[] )
{
int ret, i;
@ -261,5 +261,4 @@ exit:
return( ret );
}
#endif /* POLARSSL_BIGNUM_C && POLARSSL_RSA_C && POLARSSL_X509_CRT_PARSE_C &&
POLARSSL_FS_IO && POLARSSL_PK_PARSE_C */
#endif /* POLARSSL_RSA_C && POLARSSL_X509_CRT_PARSE_C && POLARSSL_FS_IO */

View file

@ -39,6 +39,16 @@
#define DFL_FILENAME "file.pem"
#define DFL_OUTPUT_FILENAME "file.der"
#if !defined(POLARSSL_BASE64_C) || !defined(POLARSSL_FS_IO)
int main( int argc, char *argv[] )
{
((void) argc);
((void) argv);
printf("POLARSSL_BASE64_C and/or POLARSSL_FS_IO not defined.\n");
return( 0 );
}
#else
/*
* global options
*/
@ -161,16 +171,6 @@ static int write_file( const char *path, unsigned char *buf, size_t n )
" output_file=%%s default: file.der\n" \
"\n"
#if !defined(POLARSSL_BASE64_C) || !defined(POLARSSL_FS_IO)
int main( int argc, char *argv[] )
{
((void) argc);
((void) argv);
printf("POLARSSL_BASE64_C and/or POLARSSL_FS_IO not defined.\n");
return( 0 );
}
#else
int main( int argc, char *argv[] )
{
int ret = 0;

View file

@ -33,12 +33,6 @@
#include "polarssl/config.h"
#include "polarssl/x509_crt.h"
#include "polarssl/x509_csr.h"
#include "polarssl/entropy.h"
#include "polarssl/ctr_drbg.h"
#include "polarssl/error.h"
#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) || \
@ -56,6 +50,12 @@ int main( int argc, char *argv[] )
}
#else
#include "polarssl/x509_crt.h"
#include "polarssl/x509_csr.h"
#include "polarssl/entropy.h"
#include "polarssl/ctr_drbg.h"
#include "polarssl/error.h"
#define DFL_ISSUER_CRT ""
#define DFL_REQUEST_FILE ""
#define DFL_SUBJECT_KEY "subject.key"