Commit 623682a7 authored by Niels Möller's avatar Niels Möller
Browse files

Don't use WITH_PUBLIC_KEY / WITH_HOGWEED, the Makefile sorts out which

files should be compiled.

Rev: nettle/testsuite/dsa-keygen-test.c:1.2
Rev: nettle/testsuite/dsa-test.c:1.2
Rev: nettle/testsuite/pkcs1-test.c:1.2
Rev: nettle/testsuite/rsa-encrypt-test.c:1.2
Rev: nettle/testsuite/rsa-keygen-test.c:1.2
Rev: nettle/testsuite/rsa-test.c:1.2
Rev: nettle/testsuite/rsa2sexp-test.c:1.2
Rev: nettle/testsuite/sexp2rsa-test.c:1.2
parent 3e8726a9
...@@ -11,8 +11,6 @@ progress(void *ctx UNUSED, int c) ...@@ -11,8 +11,6 @@ progress(void *ctx UNUSED, int c)
int int
test_main(void) test_main(void)
{ {
#if WITH_PUBLIC_KEY
struct dsa_public_key pub; struct dsa_public_key pub;
struct dsa_private_key key; struct dsa_private_key key;
...@@ -37,8 +35,4 @@ test_main(void) ...@@ -37,8 +35,4 @@ test_main(void)
dsa_private_key_clear(&key); dsa_private_key_clear(&key);
SUCCESS(); SUCCESS();
#else /* !WITH_PUBLIC_KEY */
SKIP();
#endif /* !WITH_PUBLIC_KEY */
} }
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
int int
test_main(void) test_main(void)
{ {
#if WITH_PUBLIC_KEY
struct dsa_public_key pub; struct dsa_public_key pub;
struct dsa_private_key key; struct dsa_private_key key;
...@@ -44,8 +43,4 @@ test_main(void) ...@@ -44,8 +43,4 @@ test_main(void)
dsa_private_key_clear(&key); dsa_private_key_clear(&key);
SUCCESS(); SUCCESS();
#else /* !WITH_PUBLIC_KEY */
SKIP();
#endif /* !WITH_PUBLIC_KEY */
} }
#include "testutils.h" #include "testutils.h"
#if WITH_PUBLIC_KEY #include "pkcs1.h"
# include "pkcs1.h"
#endif
int int
test_main(void) test_main(void)
{ {
#if WITH_PUBLIC_KEY
uint8_t buffer[16]; uint8_t buffer[16];
uint8_t expected[16] = { 1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, uint8_t expected[16] = { 1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0, 'a', 'b', 'c' }; 0xff, 0xff, 0xff, 0xff, 0, 'a', 'b', 'c' };
...@@ -19,7 +15,4 @@ test_main(void) ...@@ -19,7 +15,4 @@ test_main(void)
ASSERT(MEMEQ(sizeof(buffer), buffer, expected)); ASSERT(MEMEQ(sizeof(buffer), buffer, expected));
SUCCESS(); SUCCESS();
#else /* !WITH_PUBLIC_KEY */
SKIP();
#endif /* !WITH_PUBLIC_KEY */
} }
#include "testutils.h" #include "testutils.h"
#if WITH_PUBLIC_KEY #include "rsa.h"
# include "rsa.h"
#endif
#include "knuth-lfib.h" #include "knuth-lfib.h"
int int
test_main(void) test_main(void)
{ {
#if WITH_PUBLIC_KEY
struct rsa_public_key pub; struct rsa_public_key pub;
struct rsa_private_key key; struct rsa_private_key key;
struct knuth_lfib_ctx lfib; struct knuth_lfib_ctx lfib;
...@@ -67,9 +63,5 @@ test_main(void) ...@@ -67,9 +63,5 @@ test_main(void)
mpz_clear(gibberish); mpz_clear(gibberish);
free(decrypted); free(decrypted);
SUCCESS(); SUCCESS();
#else /* !WITH_PUBLIC_KEY */
SKIP();
#endif /* !WITH_PUBLIC_KEY */
} }
...@@ -11,8 +11,6 @@ progress(void *ctx UNUSED, int c) ...@@ -11,8 +11,6 @@ progress(void *ctx UNUSED, int c)
int int
test_main(void) test_main(void)
{ {
#if WITH_PUBLIC_KEY
struct rsa_public_key pub; struct rsa_public_key pub;
struct rsa_private_key key; struct rsa_private_key key;
...@@ -78,8 +76,4 @@ test_main(void) ...@@ -78,8 +76,4 @@ test_main(void)
mpz_clear(expected); mpz_clear(expected);
SUCCESS(); SUCCESS();
#else /* !WITH_PUBLIC_KEY */
SKIP();
#endif /* !WITH_PUBLIC_KEY */
} }
...@@ -3,8 +3,6 @@ ...@@ -3,8 +3,6 @@
int int
test_main(void) test_main(void)
{ {
#if WITH_PUBLIC_KEY
struct rsa_public_key pub; struct rsa_public_key pub;
struct rsa_private_key key; struct rsa_private_key key;
...@@ -171,8 +169,4 @@ test_main(void) ...@@ -171,8 +169,4 @@ test_main(void)
mpz_clear(expected); mpz_clear(expected);
SUCCESS(); SUCCESS();
#else /* !WITH_PUBLIC_KEY */
SKIP();
#endif /* !WITH_PUBLIC_KEY */
} }
...@@ -5,7 +5,6 @@ ...@@ -5,7 +5,6 @@
int int
test_main(void) test_main(void)
{ {
#if WITH_PUBLIC_KEY
struct rsa_public_key pub; struct rsa_public_key pub;
struct rsa_private_key priv; struct rsa_private_key priv;
...@@ -105,8 +104,4 @@ test_main(void) ...@@ -105,8 +104,4 @@ test_main(void)
rsa_private_key_clear(&priv); rsa_private_key_clear(&priv);
SUCCESS(); SUCCESS();
#else /* !WITH_PUBLIC_KEY */
SKIP();
#endif /* !WITH_PUBLIC_KEY */
} }
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
int int
test_main(void) test_main(void)
{ {
#if WITH_PUBLIC_KEY
struct rsa_public_key pub; struct rsa_public_key pub;
struct rsa_private_key priv; struct rsa_private_key priv;
...@@ -43,9 +42,5 @@ test_main(void) ...@@ -43,9 +42,5 @@ test_main(void)
rsa_private_key_clear(&priv); rsa_private_key_clear(&priv);
SUCCESS(); SUCCESS();
#else /* !WITH_PUBLIC_KEY */
SKIP();
#endif /* !WITH_PUBLIC_KEY */
} }
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment