Don't use WITH_PUBLIC_KEY / WITH_HOGWEED, then Makefile sorts out
authorNiels Möller <nisse@lysator.liu.se>
Mon, 14 May 2007 14:43:30 +0000 (16:43 +0200)
committerNiels Möller <nisse@lysator.liu.se>
Mon, 14 May 2007 14:43:30 +0000 (16:43 +0200)
which files should be compiled.

Rev: nettle/der2rsa.c:1.2
Rev: nettle/dsa-keygen.c:1.2
Rev: nettle/dsa-sign.c:1.2
Rev: nettle/dsa-verify.c:1.2
Rev: nettle/dsa.c:1.2
Rev: nettle/pkcs1-rsa-md5.c:1.2
Rev: nettle/pkcs1-rsa-sha1.c:1.2
Rev: nettle/pkcs1-rsa-sha256.c:1.2
Rev: nettle/pkcs1.c:1.2
Rev: nettle/rsa-compat.c:1.2
Rev: nettle/rsa-decrypt.c:1.2
Rev: nettle/rsa-encrypt.c:1.2
Rev: nettle/rsa-keygen.c:1.2
Rev: nettle/rsa-md5-sign.c:1.2
Rev: nettle/rsa-md5-verify.c:1.2
Rev: nettle/rsa-sha1-sign.c:1.2
Rev: nettle/rsa-sha1-verify.c:1.2
Rev: nettle/rsa-sha256-sign.c:1.2
Rev: nettle/rsa-sha256-verify.c:1.2
Rev: nettle/rsa-sign.c:1.2
Rev: nettle/rsa-verify.c:1.2
Rev: nettle/rsa.c:1.2
Rev: nettle/rsa2openpgp.c:1.2
Rev: nettle/rsa2sexp.c:1.2
Rev: nettle/sexp2dsa.c:1.2
Rev: nettle/sexp2rsa.c:1.2

26 files changed:
der2rsa.c
dsa-keygen.c
dsa-sign.c
dsa-verify.c
dsa.c
pkcs1-rsa-md5.c
pkcs1-rsa-sha1.c
pkcs1-rsa-sha256.c
pkcs1.c
rsa-compat.c
rsa-decrypt.c
rsa-encrypt.c
rsa-keygen.c
rsa-md5-sign.c
rsa-md5-verify.c
rsa-sha1-sign.c
rsa-sha1-verify.c
rsa-sha256-sign.c
rsa-sha256-verify.c
rsa-sign.c
rsa-verify.c
rsa.c
rsa2openpgp.c
rsa2sexp.c
sexp2dsa.c
sexp2rsa.c

index 9d8b437ff137aed13b87106caf9485e5b61bd741..679b33682b2274e7a3ebbef28bde24581355ab1c 100644 (file)
--- a/der2rsa.c
+++ b/der2rsa.c
@@ -27,8 +27,6 @@
 # include "config.h"
 #endif
 
-#if WITH_PUBLIC_KEY
-
 #include "rsa.h"
 
 #include "bignum.h"
@@ -133,5 +131,3 @@ rsa_keypair_from_der(struct rsa_public_key *pub,
   else
     return rsa_public_key_from_der_iterator(pub, limit, &i);    
 }
-
-#endif /* WITH_PUBLIC_KEY */
index 9f5172250d28caa37f2790bd4eb14375f3a5bba9..2d12bc24b72415f92f48673169d397c2bfa3e2f4 100644 (file)
@@ -27,8 +27,6 @@
 # include "config.h"
 #endif
 
-#if WITH_PUBLIC_KEY
-
 #include <stdlib.h>
 
 #include "dsa.h"
@@ -249,5 +247,3 @@ dsa_generate_keypair(struct dsa_public_key *pub,
 
   return 1;
 }
-
-#endif /* WITH_PUBLIC_KEY */
index 7204e7fc88adcef1d8c46a8ab900cbb3575edc91..a44c2ea048abae58c90ccf361f749648ab469af3 100644 (file)
@@ -27,8 +27,6 @@
 # include "config.h"
 #endif
 
-#if WITH_PUBLIC_KEY
-
 #include <stdlib.h>
 
 #include "dsa.h"
@@ -93,5 +91,3 @@ dsa_sign(const struct dsa_public_key *pub,
   dsa_sign_digest(pub, key, random_ctx, random,
                  digest, signature);
 }
-
-#endif /* WITH_PUBLIC_KEY */
index 798f1ab8664cf4692b5710757e4e390007a4225f..519c4207a62dbc2686220c1058ddc8418ae4819e 100644 (file)
@@ -27,8 +27,6 @@
 # include "config.h"
 #endif
 
-#if WITH_PUBLIC_KEY
-
 #include <stdlib.h>
 
 #include "dsa.h"
@@ -108,5 +106,3 @@ dsa_verify(const struct dsa_public_key *key,
 
   return dsa_verify_digest(key, digest, signature);
 }
-
-#endif /* WITH_PUBLIC_KEY */
diff --git a/dsa.c b/dsa.c
index ed733b6c4af345a79a612ea523dcf37161740774..02cc785891d5aa7ca7b9d0b1b42ff2d8b86a8355 100644 (file)
--- a/dsa.c
+++ b/dsa.c
@@ -27,8 +27,6 @@
 # include "config.h"
 #endif
 
-#if WITH_PUBLIC_KEY
-
 #include "dsa.h"
 
 #include "bignum.h"
@@ -78,5 +76,3 @@ dsa_signature_clear(struct dsa_signature *signature)
   mpz_clear(signature->r);
   mpz_clear(signature->s);
 }
-
-#endif /* WITH_PUBLIC_KEY */
index d3ccd8b055efdbf81bfbe658fb71377637433b84..1b9af157ba35cfcc9f59f72344fb9443041b9032 100644 (file)
@@ -27,8 +27,6 @@
 # include "config.h"
 #endif
 
-#if WITH_PUBLIC_KEY
-
 #include <assert.h>
 #include <stdlib.h>
 #include <string.h>
@@ -92,5 +90,3 @@ pkcs1_rsa_md5_encode_digest(mpz_t m, unsigned length, const uint8_t *digest)
   memcpy(em + length - MD5_DIGEST_SIZE, digest, MD5_DIGEST_SIZE);
   nettle_mpz_set_str_256_u(m, length, em);
 }
-
-#endif /* WITH_PUBLIC_KEY */
index 11c52eb344af2fec24d5ff8dd93dc7e93ac25757..b13be63c1d28ee7ed6428013591cc73bd9823266 100644 (file)
@@ -27,8 +27,6 @@
 # include "config.h"
 #endif
 
-#if WITH_PUBLIC_KEY
-
 #include <assert.h>
 #include <stdlib.h>
 #include <string.h>
@@ -92,5 +90,3 @@ pkcs1_rsa_sha1_encode_digest(mpz_t m, unsigned length, const uint8_t *digest)
   memcpy(em + length - SHA1_DIGEST_SIZE, digest, SHA1_DIGEST_SIZE);
   nettle_mpz_set_str_256_u(m, length, em);
 }
-
-#endif /* WITH_PUBLIC_KEY */
index 77f9d04885718764bc96a72fd5f884f37b9141c2..82c169a539c2ca64e66022fde6d212c9aa9cba39 100644 (file)
@@ -27,8 +27,6 @@
 # include "config.h"
 #endif
 
-#if WITH_PUBLIC_KEY
-
 #include <assert.h>
 #include <stdlib.h>
 #include <string.h>
@@ -90,5 +88,3 @@ pkcs1_rsa_sha256_encode_digest(mpz_t m, unsigned length, const uint8_t *digest)
   memcpy(em + length - SHA256_DIGEST_SIZE, digest, SHA256_DIGEST_SIZE);
   nettle_mpz_set_str_256_u(m, length, em);
 }
-
-#endif /* WITH_PUBLIC_KEY */
diff --git a/pkcs1.c b/pkcs1.c
index 74d7cfc03129607cc5b78c84dad5571f60308cbe..1a0fa9ddfa467af8ae4bb84143fff779ff7c644f 100644 (file)
--- a/pkcs1.c
+++ b/pkcs1.c
@@ -27,8 +27,6 @@
 # include "config.h"
 #endif
 
-#if WITH_PUBLIC_KEY
-
 #include <assert.h>
 #include <string.h>
 
@@ -57,5 +55,3 @@ pkcs1_signature_prefix(unsigned length,
   memset(buffer + 1, 0xff, length - 1);
   buffer[0] = 1;
 }
-                    
-#endif /* WITH_PUBLIC_KEY */
index 6e9943856974deb0564447f6cdde4f8dc63229d6..7106acea2fb4601ecfa5269ff398006db32fd770 100644 (file)
@@ -27,8 +27,6 @@
 # include "config.h"
 #endif
 
-#if WITH_PUBLIC_KEY
-
 #include "rsa-compat.h"
 
 #include "bignum.h"
@@ -154,5 +152,3 @@ R_VerifyFinal(R_SIGNATURE_CTX *ctx,
 
   return res;
 }
-
-#endif /* WITH_PUBLIC_KEY */
index 058a75801c5e8421e8b2b66e7da16964483ac2cf..973fa6536e48e760a22936990246f93412d811db 100644 (file)
@@ -27,8 +27,6 @@
 # include "config.h"
 #endif
 
-#if WITH_PUBLIC_KEY
-
 #include <assert.h>
 #include <stdlib.h>
 #include <string.h>
@@ -80,5 +78,3 @@ rsa_decrypt(const struct rsa_private_key *key,
 
   return 1;
 }
-
-#endif /* WITH_PUBLIC_KEY */
index fab5f82b255bf7406428c57f2eb6e917aec13085..a901e710aa2428917318f3c1bed22496e4951018 100644 (file)
@@ -27,8 +27,6 @@
 # include "config.h"
 #endif
 
-#if WITH_PUBLIC_KEY
-
 #include <assert.h>
 #include <stdlib.h>
 #include <string.h>
@@ -83,5 +81,3 @@ rsa_encrypt(const struct rsa_public_key *key,
 
   return 1;  
 }
-
-#endif /* WITH_PUBLIC_KEY */
index 236bc1214cd9d23c8882d8bfc6c645680d20ad43..e4731d546eec469f4fcbef710ef4083347c3fe1a 100644 (file)
@@ -27,8 +27,6 @@
 # include "config.h"
 #endif
 
-#if WITH_PUBLIC_KEY
-
 #include <assert.h>
 #include <limits.h>
 #include <stdlib.h>
@@ -332,5 +330,3 @@ rsa_generate_keypair(struct rsa_public_key *pub,
 
   return 1;
 }
-
-#endif /* WITH_PUBLIC_KEY */
index 710baa78a850f9d5ea46dfcaeb604b6e9f643a75..2d26eebaffe2ccb9ad9deb55b360487fb17ebf07 100644 (file)
@@ -27,8 +27,6 @@
 # include "config.h"
 #endif
 
-#if WITH_PUBLIC_KEY
-
 #include <assert.h>
 
 #include "rsa.h"
@@ -59,5 +57,3 @@ rsa_md5_sign_digest(const struct rsa_private_key *key,
 
   rsa_compute_root(key, s, s);
 }
-
-#endif /* WITH_PUBLIC_KEY */
index 5b8d43410efe06c1013361fedad8f5cbf7941919..0f232b4b77332c0ed8cc0878f197e83a1994c290 100644 (file)
@@ -27,8 +27,6 @@
 # include "config.h"
 #endif
 
-#if WITH_PUBLIC_KEY
-
 #include <assert.h>
 
 #include "rsa.h"
@@ -74,5 +72,3 @@ rsa_md5_verify_digest(const struct rsa_public_key *key,
 
   return res;
 }
-
-#endif /* WITH_PUBLIC_KEY */
index 9fa953a6883231e4682ff01215adc034e82747fa..90338af8c59225ecd0512cbd60dd5c27fa3c5387 100644 (file)
@@ -27,8 +27,6 @@
 # include "config.h"
 #endif
 
-#if WITH_PUBLIC_KEY
-
 #include <assert.h>
 
 #include "rsa.h"
@@ -59,5 +57,3 @@ rsa_sha1_sign_digest(const struct rsa_private_key *key,
 
   rsa_compute_root(key, s, s);
 }
-
-#endif /* WITH_PUBLIC_KEY */
index f1dd2fd81f21f0c895a48995d7a3dc6e61064139..2f6b57b41ff6e80fc2a00c8343b02311cf696b08 100644 (file)
@@ -27,8 +27,6 @@
 # include "config.h"
 #endif
 
-#if WITH_PUBLIC_KEY
-
 #include <assert.h>
 
 #include "rsa.h"
@@ -73,5 +71,3 @@ rsa_sha1_verify_digest(const struct rsa_public_key *key,
 
   return res;
 }
-     
-#endif /* WITH_PUBLIC_KEY */
index ab34c19c87781b3d898f1394335c93bcb8350e20..cf1460615144e4c3741251fe6b8d8ca24b3c835f 100644 (file)
@@ -27,8 +27,6 @@
 # include "config.h"
 #endif
 
-#if WITH_PUBLIC_KEY
-
 #include <assert.h>
 
 #include "rsa.h"
@@ -59,5 +57,3 @@ rsa_sha256_sign_digest(const struct rsa_private_key *key,
 
   rsa_compute_root(key, s, s);
 }
-
-#endif /* WITH_PUBLIC_KEY */
index a0235a48753d99101ba45f402222d20f76249d09..aba5fefb44ed68310489c22212229250b17eff69 100644 (file)
@@ -27,8 +27,6 @@
 # include "config.h"
 #endif
 
-#if WITH_PUBLIC_KEY
-
 #include <assert.h>
 
 #include "rsa.h"
@@ -73,5 +71,3 @@ rsa_sha256_verify_digest(const struct rsa_public_key *key,
 
   return res;
 }
-     
-#endif /* WITH_PUBLIC_KEY */
index 5a89b4ac751952248a45dbec04b18c07bfb6d16a..4be75cdabefd291479b629d1396bfce8158d1acf 100644 (file)
@@ -27,8 +27,6 @@
 # include "config.h"
 #endif
 
-#if WITH_PUBLIC_KEY
-
 #include "rsa.h"
 
 #include "bignum.h"
@@ -138,5 +136,3 @@ rsa_compute_root(const struct rsa_private_key *key,
 
   mpz_clear(xp); mpz_clear(xq);
 }
-
-#endif /* WITH_PUBLIC_KEY */
index c872dd0221360d3f2a41819dcbef0bd19fb82d36..734eb80d05935bc81a3210f13d7240da7f35efff 100644 (file)
@@ -27,8 +27,6 @@
 # include "config.h"
 #endif
 
-#if WITH_PUBLIC_KEY
-
 #include "rsa.h"
 
 #include "bignum.h"
@@ -57,5 +55,3 @@ _rsa_verify(const struct rsa_public_key *key,
 
   return res;
 }
-
-#endif /* WITH_PUBLIC_KEY */
diff --git a/rsa.c b/rsa.c
index 9fd77c92a7b0537f17780377957bc70d74c67dbb..74b1370af75f1e1b1967bc38b8c641e681f5851e 100644 (file)
--- a/rsa.c
+++ b/rsa.c
@@ -27,8 +27,6 @@
 # include "config.h"
 #endif
 
-#if WITH_PUBLIC_KEY
-
 #include "rsa.h"
 
 #include "bignum.h"
@@ -80,5 +78,3 @@ rsa_public_key_prepare(struct rsa_public_key *key)
   
   return (key->size > 0);
 }
-
-#endif /* WITH_PUBLIC_KEY */
index 580cd3335a91d754678b43baeb2c967667fd2c15..f129ff7a45bd2c1db19e97605cdd7a5a2a45bfdf 100644 (file)
@@ -27,8 +27,6 @@
 # include "config.h"
 #endif
 
-#if WITH_PUBLIC_KEY
-
 #include <string.h>
 #include <time.h>
 
@@ -102,4 +100,3 @@ rsa_keypair_to_openpgp(struct nettle_buffer *buffer,
                                    PGP_SIGN_CERTIFICATION,
                                    &signature_hash);
 }
-#endif /* WITH_PUBLIC_KEY */
index 26720aa9fd9f151e4cd5843b983e992ee0856c8c..8ece86e46accd6ebe78a905119b9307ed00a3d90 100644 (file)
@@ -26,8 +26,6 @@
 # include "config.h"
 #endif
 
-#if WITH_PUBLIC_KEY
-
 #include "rsa.h"
 
 #include "sexp.h"
@@ -52,5 +50,3 @@ rsa_keypair_to_sexp(struct nettle_buffer *buffer,
     return sexp_format(buffer, "(public-key(%0s(n%b)(e%b)))",
                       algorithm_name, pub->n, pub->e);
 }
-
-#endif /* WITH_PUBLIC_KEY */
index c947546f963587d3e8f1728a80effc5c74620a65..cf87905e62bc41c15a5e31fd9a84bdb415204d05 100644 (file)
@@ -26,8 +26,6 @@
 # include "config.h"
 #endif
 
-#if WITH_PUBLIC_KEY
-
 #include <string.h>
 
 #include "dsa.h"
@@ -102,5 +100,3 @@ dsa_signature_from_sexp(struct dsa_signature *rs,
 
   return 1;
 }
-
-#endif /* WITH_PUBLIC_KEY */
index 9416ba985f19c55f687f8e78a178bf713b33dfe7..e3faf68ccd871d6c15db411efd1bd135f41259bb 100644 (file)
@@ -26,8 +26,6 @@
 # include "config.h"
 #endif
 
-#if WITH_PUBLIC_KEY
-
 #include <string.h>
 
 #include "rsa.h"
@@ -108,5 +106,3 @@ rsa_keypair_from_sexp(struct rsa_public_key *pub,
 
   return rsa_keypair_from_sexp_alist(pub, priv, limit, &i);
 }
-
-#endif /* WITH_PUBLIC_KEY */