From 7b6fdf425a9ef38fe9e16779b3af25863104d9c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dag-Erling=20Sm=C3=B8rgrav?= Date: Mon, 10 Sep 2018 16:30:18 +0000 Subject: Vendor import of Unbound 1.7.2. --- testcode/asynclook.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'testcode/asynclook.c') diff --git a/testcode/asynclook.c b/testcode/asynclook.c index a2bdb62130b79..06bcf5ab862a8 100644 --- a/testcode/asynclook.c +++ b/testcode/asynclook.c @@ -56,6 +56,15 @@ #undef free #undef strdup #endif +#ifdef HAVE_SSL +#ifdef HAVE_OPENSSL_SSL_H +#include +#endif +#ifdef HAVE_OPENSSL_ERR_H +#include +#endif +#endif /* HAVE_SSL */ + /** keeping track of the async ids */ struct track_id { @@ -459,6 +468,27 @@ int main(int argc, char** argv) argc -= optind; argv += optind; +#ifdef HAVE_SSL +#ifdef HAVE_ERR_LOAD_CRYPTO_STRINGS + ERR_load_crypto_strings(); +#endif +#if OPENSSL_VERSION_NUMBER < 0x10100000 || !defined(HAVE_OPENSSL_INIT_SSL) + ERR_load_SSL_strings(); +#endif +#if OPENSSL_VERSION_NUMBER < 0x10100000 || !defined(HAVE_OPENSSL_INIT_CRYPTO) + OpenSSL_add_all_algorithms(); +#else + OPENSSL_init_crypto(OPENSSL_INIT_ADD_ALL_CIPHERS + | OPENSSL_INIT_ADD_ALL_DIGESTS + | OPENSSL_INIT_LOAD_CRYPTO_STRINGS, NULL); +#endif +#if OPENSSL_VERSION_NUMBER < 0x10100000 || !defined(HAVE_OPENSSL_INIT_SSL) + (void)SSL_library_init(); +#else + (void)OPENSSL_init_ssl(OPENSSL_INIT_LOAD_SSL_STRINGS, NULL); +#endif +#endif /* HAVE_SSL */ + if(ext) return ext_test(ctx, argc, argv); -- cgit v1.2.3