From: Philippe Wooding Date: Wed, 6 May 2015 16:13:12 +0000 (+0200) Subject: Add SSL support to unittest X-Git-Tag: release_3_0_9~289 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=96cfe042c83d5641e1b4d2fa33e5c057540f41c0;p=thirdparty%2Ffreeradius-server.git Add SSL support to unittest --- diff --git a/src/main/unittest.c b/src/main/unittest.c index 421dcf851e1..aab0b579544 100644 --- a/src/main/unittest.c +++ b/src/main/unittest.c @@ -742,6 +742,13 @@ int main(int argc, char *argv[]) exit(EXIT_FAILURE); } + /* + * Initialising OpenSSL once, here, is safer than having individual modules do it. + */ +#ifdef HAVE_OPENSSL_CRYPTO_H + tls_global_init(); +#endif + if (xlat_register("poke", xlat_poke, NULL, NULL) < 0) { rcode = EXIT_FAILURE; goto finish; @@ -882,8 +889,8 @@ int main(int argc, char *argv[]) if (filter_vps && !pairvalidate(failed, filter_vps, request->reply->vps)) { pairvalidate_debug(request, failed); - fr_perror("Output file %s does not match attributes in filter %s", - output_file ? output_file : input_file, filter_file); + fr_perror("Output file %s does not match attributes in filter %s (%s)", + output_file ? output_file : input_file, filter_file, fr_strerror()); rcode = EXIT_FAILURE; goto finish; }