Binary files JohnTheRipper.orig/run/gpg2john and JohnTheRipper/run/gpg2john differ diff -urpN JohnTheRipper.orig/src/common-opencl.c JohnTheRipper/src/common-opencl.c --- JohnTheRipper.orig/src/common-opencl.c 2013-03-15 01:52:57.622687618 +0000 +++ JohnTheRipper/src/common-opencl.c 2013-03-15 05:31:52.886635049 +0000 @@ -873,6 +873,31 @@ int get_device_version(int dev_id) return DEV_UNKNOWN; } +char *get_opencl_header_version() +{ + static char *opencl_versions[] = { + "1.0","1.1","1.2","1.3","1.4","1.5", + }; + int version = -1; + #ifdef CL_VERSION_1_5 + version = 5; + #elif CL_VERSION_1_4 + version = 4; + #elif CL_VERSION_1_3 + version = 3; + #elif CL_VERSION_1_2 + version = 2; + #elif CL_VERSION_1_1 + version = 1; + #elif CL_VERSION_1_0 + version = 0; + #endif + if (version == -1 || version > 5 ) { + return "Unknown"; + } + return opencl_versions[version]; +} + char *get_error_name(cl_int cl_error) { static char *err_small[] = { diff -urpN JohnTheRipper.orig/src/common-opencl.h JohnTheRipper/src/common-opencl.h --- JohnTheRipper.orig/src/common-opencl.h 2013-03-15 01:52:57.618687618 +0000 +++ JohnTheRipper/src/common-opencl.h 2013-03-15 02:03:44.886685027 +0000 @@ -80,8 +80,12 @@ int get_platform_vendor_id(int platform_ int get_device_version(int dev_id); int get_byte_addressable(int dev_id); +/* Returns error name based on error codes list defined in cl.h */ char *get_error_name(cl_int cl_error); +/* Returns OpenCL version based on macro CL_VERSION_X_Y definded in cl.h */ +char *get_opencl_header_version(); + void handle_clerror(cl_int cl_error, const char *message, const char *file, int line); void advance_cursor(); diff -urpN JohnTheRipper.orig/src/listconf.c JohnTheRipper/src/listconf.c --- JohnTheRipper.orig/src/listconf.c 2013-03-15 01:52:57.622687618 +0000 +++ JohnTheRipper/src/listconf.c 2013-03-15 02:17:16.654681780 +0000 @@ -134,6 +134,9 @@ static void listconf_list_build_info(voi #ifdef __clang_version__ printf("clang version: %s\n", __clang_version__); #endif +#ifdef HAVE_OPENCL + printf("OpenCL library version: %s\n",get_opencl_header_version()); +#endif #ifdef OPENSSL_VERSION_NUMBER // The man page suggests the type of OPENSSL_VERSION_NUMBER is long, // gcc insists it is int. @@ -142,7 +145,6 @@ static void listconf_list_build_info(voi printf("\t(loaded: %lx)", (unsigned long)SSLeay()); printf("\n"); #endif - #ifdef __GNU_MP_VERSION // print GMP version info if HAVE_GMP has been set in Makefile printf("GMP library version: %d.%d.%d",