aboutsummaryrefslogtreecommitdiff
path: root/src/test/test_crypto.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2013-11-18 13:33:29 -0500
committerNick Mathewson <nickm@torproject.org>2013-11-18 13:33:29 -0500
commite7165659e02b84ee48e141c84fef510670132cbd (patch)
tree2a8ce4942d0fa6a7d86b4419c3574b821a0f4c6f /src/test/test_crypto.c
parenta7c9d64fd683beeb2e88445399375cac2bee9495 (diff)
downloadtor-e7165659e02b84ee48e141c84fef510670132cbd.tar.gz
tor-e7165659e02b84ee48e141c84fef510670132cbd.zip
Fix crypto/digests test
Diffstat (limited to 'src/test/test_crypto.c')
-rw-r--r--src/test/test_crypto.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/test/test_crypto.c b/src/test/test_crypto.c
index 9dc43b1d27..6c4820f690 100644
--- a/src/test/test_crypto.c
+++ b/src/test/test_crypto.c
@@ -13,9 +13,9 @@
#include "crypto_curve25519.h"
#endif
-extern const char AUTHORITY_SIGNKEY_1[];
-extern const char AUTHORITY_SIGNKEY_1_DIGEST[];
-extern const char AUTHORITY_SIGNKEY_1_DIGEST256[];
+extern const char AUTHORITY_SIGNKEY_3[];
+extern const char AUTHORITY_SIGNKEY_A_DIGEST[];
+extern const char AUTHORITY_SIGNKEY_A_DIGEST256[];
/** Run unit tests for Diffie-Hellman functionality. */
static void
@@ -519,20 +519,20 @@ test_crypto_digests(void)
k = crypto_pk_new();
test_assert(k);
- r = crypto_pk_read_private_key_from_string(k, AUTHORITY_SIGNKEY_1, -1);
+ r = crypto_pk_read_private_key_from_string(k, AUTHORITY_SIGNKEY_3, -1);
test_assert(!r);
r = crypto_pk_get_digest(k, digest);
test_assert(r == 0);
test_memeq(hex_str(digest, DIGEST_LEN),
- AUTHORITY_SIGNKEY_1_DIGEST, HEX_DIGEST_LEN);
+ AUTHORITY_SIGNKEY_A_DIGEST, HEX_DIGEST_LEN);
r = crypto_pk_get_all_digests(k, &pkey_digests);
test_memeq(hex_str(pkey_digests.d[DIGEST_SHA1], DIGEST_LEN),
- AUTHORITY_SIGNKEY_1_DIGEST, HEX_DIGEST_LEN);
+ AUTHORITY_SIGNKEY_A_DIGEST, HEX_DIGEST_LEN);
test_memeq(hex_str(pkey_digests.d[DIGEST_SHA256], DIGEST256_LEN),
- AUTHORITY_SIGNKEY_1_DIGEST256, HEX_DIGEST256_LEN);
+ AUTHORITY_SIGNKEY_A_DIGEST256, HEX_DIGEST256_LEN);
done:
crypto_pk_free(k);
}