aboutsummaryrefslogtreecommitdiff
path: root/src/test/test_tortls.c
diff options
context:
space:
mode:
authorMarek Majkowski <marek@popcount.org>2013-06-10 20:30:57 +0100
committerNick Mathewson <nickm@torproject.org>2013-06-12 13:02:06 -0400
commit16d1dd134a995cf62cdbcf6c2d59da7ae09d601b (patch)
tree5ae484f315b6b5878d8cdb436881ca4e994317ca /src/test/test_tortls.c
parent616fd790ecacf933e6a624a14a8971d9ebf70d5c (diff)
downloadtor-16d1dd134a995cf62cdbcf6c2d59da7ae09d601b.tar.gz
tor-16d1dd134a995cf62cdbcf6c2d59da7ae09d601b.zip
Fix #9043 - simplyfy the code and use EVP_PKEY_cmp instead of pkey_eq / tor_tls_evp_pkey_eq
Diffstat (limited to 'src/test/test_tortls.c')
-rw-r--r--src/test/test_tortls.c45
1 files changed, 0 insertions, 45 deletions
diff --git a/src/test/test_tortls.c b/src/test/test_tortls.c
deleted file mode 100644
index 5409ced9d1..0000000000
--- a/src/test/test_tortls.c
+++ /dev/null
@@ -1,45 +0,0 @@
-/* Copyright (c) 2013-2013, The Tor Project, Inc. */
-/* See LICENSE for licensing information */
-
-#include <openssl/evp.h>
-
-#include "orconfig.h"
-#define CRYPTO_PRIVATE
-#define TORTLS_PRIVATE
-#include "or.h"
-#include "test.h"
-
-static void
-test_tortls_evp_pkey_eq(void)
-{
- crypto_pk_t *pk1 = NULL, *pk2 = NULL;
- EVP_PKEY *evp1 = NULL, *evp2 = NULL;
-
- pk1 = pk_generate(0);
- pk2 = pk_generate(1);
- test_assert(pk1 && pk2);
-
- evp1 = crypto_pk_get_evp_pkey_(pk1, 0);
- evp2 = crypto_pk_get_evp_pkey_(pk2, 0);
- test_assert(evp1 && evp2);
-
- test_assert(tor_tls_evp_pkey_eq(evp1, evp2) == 0);
- test_assert(tor_tls_evp_pkey_eq(evp1, evp1) == 1);
-
- done:
- crypto_pk_free(pk1);
- crypto_pk_free(pk2);
- if (evp1)
- EVP_PKEY_free(evp1);
- if (evp2)
- EVP_PKEY_free(evp2);
-}
-
-#define TORTLS_LEGACY(name) \
- { #name, legacy_test_helper, 0, &legacy_setup, test_tortls_ ## name }
-
-struct testcase_t tortls_tests[] = {
- TORTLS_LEGACY(evp_pkey_eq),
- END_OF_TESTCASES
-};
-