From 4b67290f0098b04f88ccbb86c801fec4ab57c047 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Thu, 21 Feb 2008 02:21:14 +0000 Subject: [PATCH] 2008-02-21 Tatsuhiro Tsujikawa * test/AllTest.cc: Added OpenSSL, GNUTLS initialization code. --- ChangeLog | 4 ++++ test/AllTest.cc | 21 +++++++++++++++++++++ 2 files changed, 25 insertions(+) diff --git a/ChangeLog b/ChangeLog index 50aacbc0..195b405c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2008-02-21 Tatsuhiro Tsujikawa + + * test/AllTest.cc: Added OpenSSL, GNUTLS initialization code. + 2008-02-21 Tatsuhiro Tsujikawa Make room for future enchancements for IPv6 addresses. diff --git a/test/AllTest.cc b/test/AllTest.cc index 41db8292..8cfcbefd 100644 --- a/test/AllTest.cc +++ b/test/AllTest.cc @@ -2,6 +2,13 @@ #include #include #include +#ifdef HAVE_LIBSSL +# include +# include +#endif // HAVE_LIBSSL +#ifdef HAVE_LIBGNUTLS +# include +#endif // HAVE_LIBGNUTLS using aria2::SharedHandle; using aria2::SingletonHolder; @@ -14,11 +21,25 @@ int main(int argc, char* argv[]) { runner.setOutputter(new CppUnit::CompilerOutputter(&runner.result(), std::cerr)); // setup + +#ifdef HAVE_LIBSSL + // for SSL initialization + SSL_load_error_strings(); + SSL_library_init(); +#endif // HAVE_LIBSSL +#ifdef HAVE_LIBGNUTLS + gnutls_global_init(); +#endif // HAVE_LIBGNUTLS + SharedHandle cookieBoxFactory = new aria2::CookieBoxFactory(); SingletonHolder >::instance(cookieBoxFactory); // Run the tests. bool successfull = runner.run(); +#ifdef HAVE_LIBGNUTLS + gnutls_global_deinit(); +#endif // HAVE_LIBGNUTLS + return successfull ? 0 : 1; }