diff options
author | Nick Mathewson <nickm@torproject.org> | 2013-09-08 17:14:07 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2013-09-08 17:14:07 -0400 |
commit | a0a855d586d99540277014ccd3c85592487a69a4 (patch) | |
tree | d7191658a9c4780ed499af26b40d90ff6f26b329 /src/test/test_dir.c | |
parent | c7113e702b7e0ad1f33eb72cc8fffc5f26d0ae64 (diff) | |
download | tor-a0a855d586d99540277014ccd3c85592487a69a4.tar.gz tor-a0a855d586d99540277014ccd3c85592487a69a4.zip |
Fix unit tests with --disable-curve25519
Diffstat (limited to 'src/test/test_dir.c')
-rw-r--r-- | src/test/test_dir.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/test/test_dir.c b/src/test/test_dir.c index 94d1284f86..a82ccb086c 100644 --- a/src/test/test_dir.c +++ b/src/test/test_dir.c @@ -214,8 +214,10 @@ test_dir_formats(void) strlcat(buf2, "signing-key\n", sizeof(buf2)); strlcat(buf2, pk1_str, sizeof(buf2)); strlcat(buf2, "hidden-service-dir\n", sizeof(buf2)); +#ifdef CURVE25519_ENABLED strlcat(buf2, "ntor-onion-key " "skyinAnvardNostarsNomoonNowindormistsorsnow=\n", sizeof(buf2)); +#endif strlcat(buf2, "accept *:80\nreject 18.0.0.0/8:24\n", sizeof(buf2)); strlcat(buf2, "router-signature\n", sizeof(buf2)); @@ -235,9 +237,11 @@ test_dir_formats(void) test_eq(rp2->bandwidthrate, r2->bandwidthrate); test_eq(rp2->bandwidthburst, r2->bandwidthburst); test_eq(rp2->bandwidthcapacity, r2->bandwidthcapacity); +#ifdef CURVE25519_ENABLED test_memeq(rp2->onion_curve25519_pkey->public_key, r2->onion_curve25519_pkey->public_key, CURVE25519_PUBKEY_LEN); +#endif test_assert(crypto_pk_cmp_keys(rp2->onion_pkey, pk2) == 0); test_assert(crypto_pk_cmp_keys(rp2->identity_pkey, pk1) == 0); |