mirror of
https://github.com/NLnetLabs/unbound.git
synced 2026-09-08 19:07:41 +02:00
OpenSSL config() and small memory leak. No more ENGINE_load_gost().
git-svn-id: file:///svn/unbound/trunk@1750 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
@@ -237,9 +237,14 @@ main(int argc, char* argv[])
|
||||
#endif
|
||||
break;
|
||||
case 'g':
|
||||
#if defined(HAVE_ENGINE_LOAD_GOST) && defined(USE_GOST)
|
||||
printf("GOST supported\n");
|
||||
exit(0);
|
||||
#ifdef USE_GOST
|
||||
if(ldns_key_EVP_load_gost_id()) {
|
||||
printf("GOST supported\n");
|
||||
exit(0);
|
||||
} else {
|
||||
printf("GOST not supported\n");
|
||||
exit(1);
|
||||
}
|
||||
#else
|
||||
printf("GOST not supported\n");
|
||||
exit(1);
|
||||
|
||||
+9
-1
@@ -432,7 +432,10 @@ main(int argc, char* argv[])
|
||||
}
|
||||
printf("Start of %s unit test.\n", PACKAGE_STRING);
|
||||
ERR_load_crypto_strings();
|
||||
#if defined(HAVE_ENGINE_LOAD_GOST) && defined(USE_GOST)
|
||||
#ifdef HAVE_OPENSSL_CONFIG
|
||||
OPENSSL_config("unbound");
|
||||
#endif
|
||||
#ifdef USE_GOST
|
||||
(void)ldns_key_EVP_load_gost_id();
|
||||
#endif
|
||||
checklock_start();
|
||||
@@ -451,9 +454,14 @@ main(int argc, char* argv[])
|
||||
msgparse_test();
|
||||
checklock_stop();
|
||||
printf("%d checks ok.\n", testcount);
|
||||
#ifdef HAVE_OPENSSL_CONFIG
|
||||
EVP_cleanup();
|
||||
/*ENGINE_cleanup();*/
|
||||
CONF_modules_free();
|
||||
#endif
|
||||
CRYPTO_cleanup_all_ex_data();
|
||||
ERR_remove_state(0);
|
||||
ERR_free_strings();
|
||||
RAND_cleanup();
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -484,8 +484,9 @@ verify_test()
|
||||
#endif
|
||||
verifytest_file("testdata/test_signatures.12", "20090107100022");
|
||||
verifytest_file("testdata/test_signatures.13", "20080414005004");
|
||||
#if defined(HAVE_ENGINE_LOAD_GOST) && defined(USE_GOST)
|
||||
verifytest_file("testdata/test_signatures.15", "20090807060504");
|
||||
#ifdef USE_GOST
|
||||
if(ldns_key_EVP_load_gost_id()) /* and gost can be loaded */
|
||||
verifytest_file("testdata/test_signatures.15", "20090807060504");
|
||||
#endif
|
||||
dstest_file("testdata/test_ds_sig.1");
|
||||
nsectest();
|
||||
|
||||
Reference in New Issue
Block a user