aboutsummaryrefslogtreecommitdiff
path: root/src/common/crypto_curve25519.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2013-02-04 11:32:55 -0500
committerNick Mathewson <nickm@torproject.org>2013-02-04 11:32:55 -0500
commit5ea9a90d682279e857efd63e2a829bd5a39b0178 (patch)
tree8b0bcad6ef5587bf67f0dda897c5bdcaf45c905f /src/common/crypto_curve25519.h
parentddf2c36ab1e606ea9dcd0253512da16ab17b3457 (diff)
downloadtor-5ea9a90d682279e857efd63e2a829bd5a39b0178.tar.gz
tor-5ea9a90d682279e857efd63e2a829bd5a39b0178.zip
Fix compilation with --disable-curve25519 option
The fix is to move the two functions to format/parse base64 curve25519 public keys into a new "crypto_format.c" file. I could have put them in crypto.c, but that's a big file worth splitting anyway. Fixes bug 8153; bugfix on 0.2.4.8-alpha where I did the fix for 7869.
Diffstat (limited to 'src/common/crypto_curve25519.h')
-rw-r--r--src/common/crypto_curve25519.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/common/crypto_curve25519.h b/src/common/crypto_curve25519.h
index 5524415492..652f1883c6 100644
--- a/src/common/crypto_curve25519.h
+++ b/src/common/crypto_curve25519.h
@@ -51,6 +51,12 @@ int curve25519_keypair_read_from_file(curve25519_keypair_t *keypair_out,
char **tag_out,
const char *fname);
+#ifdef CRYPTO_CURVE25519_PRIVATE
+int curve25519_impl(uint8_t *output, const uint8_t *secret,
+ const uint8_t *basepoint);
+#endif
+#endif
+
#define CURVE25519_BASE64_PADDED_LEN 44
int curve25519_public_from_base64(curve25519_public_key_t *pkey,
@@ -58,11 +64,5 @@ int curve25519_public_from_base64(curve25519_public_key_t *pkey,
int curve25519_public_to_base64(char *output,
const curve25519_public_key_t *pkey);
-#ifdef CRYPTO_CURVE25519_PRIVATE
-int curve25519_impl(uint8_t *output, const uint8_t *secret,
- const uint8_t *basepoint);
-#endif
-#endif
-
#endif