You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Rodney Broom <rb...@rbroom.com> on 2002/08/03 04:31:50 UTC

Net::SSLeay works in CGI, fails in mod_perl

Hi all,

I've got a teribly simple chunk of code that basically just does:

  post_https('secure.authorize.net', 443, '/gateway/transact.dll','',$pd);

This works at the command line, and in CGI, but fails in mod_perl with this message:

  SSL_connect 27438: 1 - error:140D308A:SSL \
  routines:TLS1_SETUP_KEY_BLOCK:cipher or hash unavailable


I've searched around in the docs and groups, but haven't found anything related. Has anybody seen this before?

---
Rodney Broom
President, R.Broom Consulting



Re: Net::SSLeay works in CGI, fails in mod_perl

Posted by Alexandre Dulaunoy <ad...@foo.be>.
On Fri, 2 Aug 2002, Rodney Broom wrote:

> Hi all,
> 
> I've got a teribly simple chunk of code that basically just does:
> 
>   post_https('secure.authorize.net', 443, '/gateway/transact.dll','',$pd);
> 
> This works at the command line, and in CGI, but fails in mod_perl with this message:
> 
>   SSL_connect 27438: 1 - error:140D308A:SSL \
>   routines:TLS1_SETUP_KEY_BLOCK:cipher or hash unavailable
> 

	Quite strange. The error is coming from OpenSSL : 

		if (!ssl_cipher_get_evp(s->session,&c,&hash,&comp))
		{
		SSLerr(SSL_F_TLS1_SETUP_KEY_BLOCK,SSL_R_CIPHER_OR_HASH_UNAVAILABLE);
		return(0);
		}

	Seems the cipher/hash algorithm is not available at the key 
setup. Could you check the library in use ? Maybe different version 
mitmatch of OpenSSL ? 

	just an idea.

	adulau