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:
Wouter Wijngaards
2009-08-07 15:23:35 +00:00
parent b6076e3b6d
commit 538ca28828
12 changed files with 159 additions and 54 deletions
+8 -3
View File
@@ -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
View File
@@ -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;
}
+3 -2
View File
@@ -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();