>From 85e36b6c65df2d424530519df3433af8108ee8f0 Mon Sep 17 00:00:00 2001 From: Frank Dittrich Date: Fri, 20 Jul 2012 08:42:39 +0200 Subject: [PATCH] Add OpenSSL version info to --list=build-info --- src/john.c | 13 +++++++++++++ 1 files changed, 13 insertions(+), 0 deletions(-) diff --git a/src/john.c b/src/john.c index 872ffe1..d173665 100644 --- a/src/john.c +++ b/src/john.c @@ -54,6 +54,7 @@ #endif /* _OPENMP */ #endif /* HAVE_MPI */ #include +#include #include "unicode.h" #include "plugin.h" #ifdef CL_VERSION_1_0 @@ -675,6 +676,18 @@ static void john_init(char *name, int argc, char **argv) #ifdef __clang_version__ printf("clang version: %s\n", __clang_version__); #endif +#ifdef OPENSSL_VERSION_NUMBER + // The man page suggests the type of OPENSSL_VERSION_NUMBER is long, + // gcc insists it is int. + printf("OpenSSL library version: %lx", (unsigned long)OPENSSL_VERSION_NUMBER); + // FIXME: How do I detect a missing library? + // Even if if is extremely unlikely that openssl is missing, + // at least flush all output buffers... + fflush(NULL); + if ((unsigned long)OPENSSL_VERSION_NUMBER != (unsigned long)SSLeay()) + printf("\t(loaded: %lx)", (unsigned long)SSLeay()); + printf("\n"); +#endif exit(0); } } -- 1.7.7.6