aboutsummaryrefslogtreecommitdiff
path: root/src/test
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
parenta7c9d64fd683beeb2e88445399375cac2bee9495 (diff)
downloadtor-e7165659e02b84ee48e141c84fef510670132cbd.tar
tor-e7165659e02b84ee48e141c84fef510670132cbd.tar.gz
Fix crypto/digests test
Diffstat (limited to 'src/test')
-rw-r--r--src/test/test_crypto.c14
-rw-r--r--src/test/test_data.c4
2 files changed, 9 insertions, 9 deletions
diff --git a/src/test/test_crypto.c b/src/test/test_crypto.c
index 9dc43b1d2..6c4820f69 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);
}
diff --git a/src/test/test_data.c b/src/test/test_data.c
index 9aef106d0..e1f6f6c3c 100644
--- a/src/test/test_data.c
+++ b/src/test/test_data.c
@@ -73,9 +73,9 @@ const char AUTHORITY_SIGNKEY_A[] =
"Yx4lqK0ca5IkTp3HevwnlWaJgbaOTUspCVshzJBhDA==\n"
"-----END RSA PRIVATE KEY-----\n";
-const char AUTHORITY_SIGNKEY_1_DIGEST[] =
+const char AUTHORITY_SIGNKEY_A_DIGEST[] =
"CBF56A83368A5150F1A9AAADAFB4D77F8C4170E2";
-const char AUTHORITY_SIGNKEY_1_DIGEST256[] =
+const char AUTHORITY_SIGNKEY_A_DIGEST256[] =
"AF7C5468DBE3BA54A052726038D7F15F3C4CA511B1952645B3D96D83A8DFB51C";
/** Second of 3 example authority certificates for unit testing. */