Add reduced configuration used by picocoin
diff --git a/configs/config-picocoin.h b/configs/config-picocoin.h
new file mode 100644
index 0000000..c1ace1e
--- /dev/null
+++ b/configs/config-picocoin.h
@@ -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 */
diff --git a/tests/scripts/test-ref-configs.pl b/tests/scripts/test-ref-configs.pl
index 6f60925..6587140 100755
--- a/tests/scripts/test-ref-configs.pl
+++ b/tests/scripts/test-ref-configs.pl
@@ -17,6 +17,8 @@
=> '-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 @@
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";