summaryrefslogtreecommitdiff
path: root/src/or/test.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/or/test.c')
-rw-r--r--src/or/test.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/or/test.c b/src/or/test.c
index 050217c3a7..bac59b7834 100644
--- a/src/or/test.c
+++ b/src/or/test.c
@@ -740,6 +740,14 @@ test_crypto_pk(void)
test_memeq(data1,data3,j);
}
}
+
+ /* Try copy_full */
+ crypto_free_pk_env(pk2);
+ pk2 = crypto_pk_copy_full(pk1);
+ test_assert(pk2 != NULL);
+ test_neq_ptr(pk1, pk2);
+ test_assert(crypto_pk_cmp_keys(pk1,pk2) == 0);
+
done:
if (pk1)
crypto_free_pk_env(pk1);