Re: Which way is the true way, and what not? -lssleay32 -llibeay32 Way? Or -lssl -lcrypto Way? Fw: HowTo: Strawberry Perl v5.12.3 x64 upgrade to OpenSSL v1.0.0d from OpenSSL 1.0.0-beta4

2011-06-02 Thread kmx
Hi Victor,


 a) -lssleay32 -llibeay32 Way:

  At this moment in strawberry-perl-5.12.3.0-64bit / 5.12.2.0 and in 
 64bit_openssl-1.0.0d-bin_20110507.zip :
 ==
 libeay32__.dll
 ssleay32__.dll
 libeay32.a
 libssl32.a
 libssleay32.a
 ==

I can give an explanation as I have prepared this part of strawberry perl.

a/ libeay32.a (+libeay32__.dll) is analogy for UNIXish -lcrypto

b/ libssl32.a == libssleay32.a (+ssleay32__.dll) is analogy for UNIXish -lssl

The trouble is that openssl has 2 different way for building MSWindows/gcc
libraries - one via Configure+make; the second via mingw32.bat.
Unfortunately each way creates *.a files with different names

*/ Configure+make creates
- libcrypto.dll.a
- libcrypto.a
- libssl.dll.a
- libssl.a

*/ mingw32.bat creates
- libeay32.a (= libcrypto.dll.a)
- libcrypto.a
- libssl32.a (= libssl.dll.a)
- libssl.a

On top of that you have also MS compiler (cl/msvc) in MS Windows world
which uses also different library names: libeay32*.lib ssleay32*.lib (from
here probably comes  -lssleay32 -llibeay32 which should be fine with MS
compiler)

Things get a little bit more complicated by the fact that the more-or-less
official openssl Win32 binaries distribution (see
http://www.openssl.org/related/binaries.html) contains also mingw/gcc *.a
libraries - however named: libeay32.a + ssleay32.a (which does not
correspond to the results produced by the mingw.bat from official openssl
tarball). Please note that ssleay32.a is not libssleay32.a thus linker will
not find it when given -lssleay32 - this is IMHO the main source of
confusion about the right lib names.

What we have done in strawberry was to use naming convention
libeay32.a/libssl32.a + a little trick to copy libssl32.a to libssleay32.a
- at that time it seemed to be a way how to satisfy most of the modules on
cpan using different -lssleay32/-lssl32/-leay32 linker options

I do not feel to have an authority to say what is the best/right/correct
way but I would keep the naming convention of the original openssl
distribution and use: -lssl32 -leay32 for MSWindows+gcc compiler (which
works with openssl included in strawberry perl however not with *.a mingw
libraries that are part of the openssl Win32 binaries distribution).

--
kmx


Re: Which way is the true way, and what not? -lssleay32 -llibeay32 Way? Or -lssl -lcrypto Way? Fw: HowTo: Strawberry Perl v5.12.3 x64 upgrade to OpenSSL v1.0.0d from OpenSSL 1.0.0-beta4

2011-06-02 Thread kmx
Dne 2.6.2011 18:05, Victor Miasnikov napsal(a):
 Hi!
 Question N2:  where to download / get / take openssl.cnf for OpenSSL from 
 *_20110507.zip?
 Take apps/openssl.cnf from the original openssl-1.0.0d.tar.gz tarball.
  Thanks!

 But you must agree to the OpenSSL in Strawberry Perl incomplete

OpenSSL included in strawberry perl is complete enough as regards openssl
related perl modules. The ambition was not to be 100% complete openssl
distribution.

You are AFAIK the first one complaining about openssl incompleteness.

Compare with postgresql - we are not packaging the complete postgresql but
just a subset necessary to build postgres related perl module(s).

 And where to download / get / take .dll from \openssl\lib\engines

 4758ccaeay32.dll
 aepeay32.dll
 atallaeay32.dll
 capieay32.dll
 chileay32.dll
 cswifteay32.dll
 gmpeay32.dll
 gosteay32.dll
 nuroneay32.dll
 padlockeay32.dll
 surewareeay32.dll
 ubseceay32.dll

 ?

Here you are: http://strawberryperl.com/package/kmx/tmp-for-victor/

--
kmx