Add reduced configuration used by picocoin

This commit is contained in:
Manuel Pégourié-Gonnard 2014-06-24 11:25:43 +02:00
parent 1c98ff96b5
commit 43b29861fe
2 changed files with 72 additions and 3 deletions

59
configs/config-picocoin.h Normal file
View File

@ -0,0 +1,59 @@
/*
* Reduced configuration used by Picocoin.
*
* See README.txt for usage instructions.
*
* Distinguishing features:
* - no SSL/TLS;
* - no X.509;
* - ECDSA/PK and some other chosen crypto bits.
*/
#ifndef POLARSSL_CONFIG_H
#define POLARSSL_CONFIG_H
/* System support */
#define POLARSSL_HAVE_LONGLONG
#define POLARSSL_HAVE_ASM
#define POLARSSL_HAVE_TIME
#define POLARSSL_HAVE_IPV6
/* PolarSSL feature support */
#define POLARSSL_CIPHER_MODE_CBC
#define POLARSSL_CIPHER_PADDING_PKCS7
#define POLARSSL_ECP_DP_SECP256K1_ENABLED
#define POLARSSL_ECDSA_DETERMINISTIC
#define POLARSSL_PK_PARSE_EC_EXTENDED
#define POLARSSL_ERROR_STRERROR_DUMMY
#define POLARSSL_FS_IO
/* PolarSSL modules */
#define POLARSSL_AESNI_C
#define POLARSSL_AES_C
#define POLARSSL_ASN1_PARSE_C
#define POLARSSL_ASN1_WRITE_C
#define POLARSSL_BASE64_C
#define POLARSSL_BIGNUM_C
#define POLARSSL_DES_C // ???
#define POLARSSL_ECDSA_C
#define POLARSSL_ECP_C
#define POLARSSL_ENTROPY_C
#define POLARSSL_HMAC_DRBG_C
#define POLARSSL_MD_C
#define POLARSSL_MD5_C // ???
#define POLARSSL_OID_C
#define POLARSSL_PADLOCK_C
#define POLARSSL_PEM_PARSE_C // ???
#define POLARSSL_PEM_WRITE_C // ???
#define POLARSSL_PK_C
#define POLARSSL_PK_PARSE_C
#define POLARSSL_PK_WRITE_C
#define POLARSSL_RIPEMD160_C
#define POLARSSL_SHA1_C
#define POLARSSL_SHA256_C
#define POLARSSL_X509_USE_C // !!!
#define POLARSSL_X509_CRT_PARSE_C // !!!
#include "check_config.h"
#endif /* POLARSSL_CONFIG_H */

View File

@ -17,6 +17,8 @@ my %configs = (
=> '-m tls1_1 -f \'^DES-CBC3-SHA$\|^TLS-RSA-WITH-3DES-EDE-CBC-SHA$\'',
'config-suite-b.h'
=> "-m tls1_2 -f 'ECDHE-ECDSA.*AES.*GCM'",
'config-picocoin.h'
=> 0,
);
# If no config-name is provided, use all known configs.
@ -59,9 +61,17 @@ while( my ($conf, $args) = each %configs ) {
system( "make" ) and abort "Failed to build: $conf\n";
system( "make $test" ) and abort "Failed test suite: $conf\n";
print "\nrunning compat.sh $args\n";
system( "cd tests && ./compat.sh $args" )
and abort "Failed compat.sh: $conf\n";
if( $args )
{
print "\nrunning compat.sh $args\n";
system( "cd tests && ./compat.sh $args" )
and abort "Failed compat.sh: $conf\n";
}
else
{
print "\nskipping compat.sh\n";
}
}
system( "mv $config_h.bak $config_h" ) and warn "$config_h not restored\n";