Openwall GNU/*/Linux - a small security-enhanced Linux distro for servers
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Fri, 13 Mar 2015 22:05:27 +0800
From: Lei Zhang <zhanglei.april@...il.com>
To: john-dev@...ts.openwall.com
Subject: Re: [GSoC] building JtR for MIC

Hi,

I'm kind of stuck with this autoconf problem now.

I can see macro OPENSSL_LIBS is supposed to be bound to "-lssl -lcrypto" in the following code snippet (from configure.ac):
-----------------------------------------------------------------------------------
   AS_IF([test "x${OPENSSL_CFLAGS}${OPENSSL_LIBS}" != "x"],
      [AC_MSG_CHECKING([supplied paths for OpenSSL])]
      [JTR_LIST_ADD(CFLAGS, [$OPENSSL_CFLAGS])]
      [AC_MSG_RESULT([$OPENSSL_CFLAGS $OPENSSL_LIBS])],
      [test "x$cross_compiling" = xno],
      [JTR_SET_NORMAL_SSL_INCLUDES([/usr/local/ssl])]
      [AC_CHECK_HEADER([openssl/opensslv.h],
	 [AC_CHECK_LIB([ssl],[SSL_library_init],
	    [AC_CHECK_LIB([crypto],[MD5_Update],
	       [AC_DEFINE(HAVE_LIBSSL,1,[Define to 1 if you have the `ssl' library (-lssl).])]
	       [AC_DEFINE(HAVE_LIBCRYPTO,1,[Define to 1 if you have the `crypto' library (-lcrypto).])]
		  [OPENSSL_LIBS="-lssl -lcrypto"],
	       [AC_MSG_FAILURE(JtR requires libssl/libcrypto being installed,1)])],
	    [AC_MSG_FAILURE(JtR requires libssl being installed,1)]
	 )],
	 [AC_MSG_FAILURE(JtR requires OpenSSL headers being installed,1)]
      )]
   )
--------------------------------------------------------------------------------------

But it's strange that the binding won't happen when I configure for MIC. The configure command used is:
$ ./configure CC=icc CFLAGS="-mmic -I$MIC/include" LDFLAGS="-mmic -L$MIC/lib" --host=mic-linux

Could anyone briefly explain to me what this code is doing? I want to figure out what's going wrong here.


Thanks,
Lei


> On Mar 12, 2015, at 7:27 PM, jfoug@....net <mailto:jfoug@....net> wrote:
> 
> 
> ---- Lei Zhang <zhanglei.april@...il.com <mailto:zhanglei.april@...il.com>> wrote: 
>> Hi,
>> 
>> I’ve posted a pull request on GitHub with the changes I made and a new README file.
>> 
>> There’re two minor issues:
>> 1. I made two patches which is used to build GMP and OpenSSL on MIC. I don’t know where to put them, and now I temporarily put them under john/src/unused. Maybe you have some better solutions.
>> 
>> 2. There is a variable ‘OPENSSL_LIBS’ which is supposed to be bound to “-lssl -lcrypto” in the configure script. But when targeting MIC, it’s bound to an empty string, and those linker flags are not added into Makefile. I have to add them to LDFLAGS manually, like this:
>> 	$ LDFLAGS=“-lssl -lcrypto” ./configure
>> I haven’t figure out how to resolve this yet.
> 
> These system specific changes have been handled in ./m4/jtr_systems_specific_logic.m4      Add a mic*) case to the last case statement, and put in the logic needed there.


[ CONTENT OF TYPE text/html SKIPPED ]

Powered by blists - more mailing lists

Your e-mail address:

Powered by Openwall GNU/*/Linux - Powered by OpenVZ