You are not logged in.

#1 2006-07-03 15:08:36

PeteMo
Member
From: H'Burg, VA
Registered: 2006-01-26
Posts: 191
Website

[solved] openssl, perl Crypt::SSLeay problems since upgrade

Hi all,

I have a perl script that uses the Crypt::SSLeay module and LWP to log into a secure site via https.  Everything worked fine, until the recent openssl upgrade. 

If I install the perl-crypt-ssleay package via pacman, I get the following error when running my script:

501 Protocol scheme 'https' is not supported (Crypt::SSLeay not installed

My next idea was that perhaps the package had not been rebuilt against the latest openssl, so I rebuilt it using abs.  That results in a segmentation fault when running my program.

Finally, I tried building the module via CPAN, but I get the following error on the build:

pmorris@arch:~ $ sudo perl -MCPAN -e 'install Crypt::SSLeay'
CPAN: Storable loaded ok
Going to read /home/pmorris/.cpan/Metadata
  Database was generated on Sun, 02 Jul 2006 22:29:27 GMT
Running install for module Crypt::SSLeay
Running make for C/CH/CHAMAS/Crypt-SSLeay-0.51.tar.gz
CPAN: Digest::SHA loaded ok
CPAN: Module::Signature loaded ok
WARNING: This key is not certified with a trusted signature!
Primary key fingerprint: 2E66 557A B97C 19C7 91AF  8E20 328D A867 450F 89EC
Signature for /home/pmorris/.cpan/sources/authors/id/C/CH/CHAMAS/CHECKSUMS ok
CPAN: Compress::Zlib loaded ok
Checksum for /home/pmorris/.cpan/sources/authors/id/C/CH/CHAMAS/Crypt-SSLeay-0.51.tar.gz ok
Scanning cache /home/pmorris/.cpan/build for sizes
Crypt-SSLeay-0.51/
Crypt-SSLeay-0.51/t/
Crypt-SSLeay-0.51/t/net_ssl.t
Crypt-SSLeay-0.51/t/ssl_context.t
Crypt-SSLeay-0.51/lib/
Crypt-SSLeay-0.51/lib/Crypt/
Crypt-SSLeay-0.51/lib/Crypt/SSLeay/
Crypt-SSLeay-0.51/lib/Crypt/SSLeay/MainContext.pm
Crypt-SSLeay-0.51/lib/Crypt/SSLeay/Conn.pm
Crypt-SSLeay-0.51/lib/Crypt/SSLeay/X509.pm
Crypt-SSLeay-0.51/lib/Crypt/SSLeay/Err.pm
Crypt-SSLeay-0.51/lib/Crypt/SSLeay/CTX.pm
Crypt-SSLeay-0.51/lib/Net/
Crypt-SSLeay-0.51/lib/Net/SSL.pm
Crypt-SSLeay-0.51/certs/
Crypt-SSLeay-0.51/certs/ca-bundle.crt
Crypt-SSLeay-0.51/certs/notacakeynopass.pem
Crypt-SSLeay-0.51/certs/notacacert.pem
Crypt-SSLeay-0.51/MANIFEST
Crypt-SSLeay-0.51/typemap
Crypt-SSLeay-0.51/MANIFEST.SKIP
Crypt-SSLeay-0.51/SSLeay.pm
Crypt-SSLeay-0.51/CHANGES
Crypt-SSLeay-0.51/lwp-ssl-test
Crypt-SSLeay-0.51/net_ssl_test
Crypt-SSLeay-0.51/SSLeay.xs
Crypt-SSLeay-0.51/README
Crypt-SSLeay-0.51/Makefile.PL
Removing previously used /home/pmorris/.cpan/build/Crypt-SSLeay-0.51
Package came without SIGNATURE


  CPAN.pm: Going to build C/CH/CHAMAS/Crypt-SSLeay-0.51.tar.gz

Found OpenSSL (version OpenSSL 0.9.8) installed at /usr
Which OpenSSL build path do you want to link against? [/usr] 

================================================
BUILD INFORMATION
================================================

ssl dir:    /usr
libraries:      -lssl -lcrypto -lgcc -lRSAglue -lrsaref
include dir:    /usr/include
ssl header:     openssl/ssl.h
ssl candidate:  /usr; /usr/include/openssl; OpenSSL 0.9.8

================================================

Checking if your kit is complete...
Looks good
Note (probably harmless): No library found for -lgcc
Note (probably harmless): No library found for -lRSAglue
Note (probably harmless): No library found for -lrsaref
Writing Makefile for Crypt::SSLeay
cp lib/Crypt/SSLeay/X509.pm blib/lib/Crypt/SSLeay/X509.pm
cp lib/Net/SSL.pm blib/lib/Net/SSL.pm
cp SSLeay.pm blib/lib/Crypt/SSLeay.pm
cp lib/Crypt/SSLeay/MainContext.pm blib/lib/Crypt/SSLeay/MainContext.pm
cp lib/Crypt/SSLeay/Conn.pm blib/lib/Crypt/SSLeay/Conn.pm
cp lib/Crypt/SSLeay/CTX.pm blib/lib/Crypt/SSLeay/CTX.pm
cp lib/Crypt/SSLeay/Err.pm blib/lib/Crypt/SSLeay/Err.pm
/usr/bin/perl /usr/lib/perl5/5.8.8/ExtUtils/xsubpp  -typemap /usr/lib/perl5/5.8.8/ExtUtils/typemap -typemap typemap  SSLeay.xs > SSLeay.xsc && mv SSLeay.xsc SSLeay.c
cc -c  -I/usr/include -D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -march=i686 -O2 -pipe   -DVERSION="0.51" -DXS_VERSION="0.51" -fpic "-I/usr/lib/perl5/5.8.8/i686-linux-thread-multi/CORE"   SSLeay.c
SSLeay.xs: In function 'XS_Crypt__SSLeay__Conn_new':
SSLeay.xs:252: warning: passing argument 2 of 'SSL_set_info_callback' from incompatible pointer type
Running Mkbootstrap for Crypt::SSLeay ()
chmod 644 SSLeay.bs
rm -f blib/arch/auto/Crypt/SSLeay/SSLeay.so
LD_RUN_PATH="/usr/lib" cc  -shared -L/usr/local/lib SSLeay.o  -o blib/arch/auto/Crypt/SSLeay/SSLeay.so     
       -L/usr/lib -lssl -lcrypto      
      
chmod 755 blib/arch/auto/Crypt/SSLeay/SSLeay.so
cp SSLeay.bs blib/arch/auto/Crypt/SSLeay/SSLeay.bs
chmod 644 blib/arch/auto/Crypt/SSLeay/SSLeay.bs
Manifying blib/man3/Crypt::SSLeay.3
  /usr/bin/make  -- OK
Running make test
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/net_ssl........dubious                                                     
    Test returned status 0 (wstat 11, 0xb)
t/ssl_context....dubious                                                     
    Test returned status 0 (wstat 11, 0xb)
FAILED--2 test scripts could be run, alas--no output ever seen
make: *** [test_dynamic] Error 255
  /usr/bin/make test -- NOT OK
Running make install
  make test had returned bad status, won't install without force

I would welcome any ideas/suggestions on how to proceed with troubleshooting and resolving this.  Thanks.

Offline

#2 2006-07-03 20:15:37

PeteMo
Member
From: H'Burg, VA
Registered: 2006-01-26
Posts: 191
Website

Re: [solved] openssl, perl Crypt::SSLeay problems since upgrade

I've found this link which seems to describe the same problem: http://www.dbforums.com/showthread.php?t=1211480

The link seems to indicate that this is a problem with openssl 0.9.8a and 0.9.8b.  The "fix" was to downgrade openssl to 0.9.7, which I think will cause many more problems than it will solve.

Offline

#3 2006-07-04 01:38:11

PeteMo
Member
From: H'Burg, VA
Registered: 2006-01-26
Posts: 191
Website

Re: [solved] openssl, perl Crypt::SSLeay problems since upgrade

OK, it seems like I'm talking to myself here, but I've fixed the problem with the Crypt::SSLeay module and thought I'd post the solution here for future reference. 

I edited the SSLeay.xs file in the build directory and commented out line 110 and added line 111 as seen below:

109:  if(!bNotFirstTime) {
110:  /* SSLeay_add_all_algorithms(); */
111:  SSL_library_init();

see the following bug report for more info http://rt.cpan.org/Public/Bug/Display.html?id=16735

edit: premature submition

Offline

Board footer

Powered by FluxBB