Massimiliano Pala wrote:
> 
> Nikolay Sturm wrote:
> >
> > On 20 Sep 2000, at 17:24, Massimiliano Pala wrote:
> >
> > > > Can't call method "setParams" on an undefined value at
> > > > /home/httpd/cgi-ca/ca line 112.
> > > The OpenCA::OpenSSL module can not be initialized and probably because
> > > it cannot be found the "openssl" command.
> >
> > This error seems to be perl 5.6 specific. After downgrading to perl
> > 5.004_5 I could use the script without problems. Maybe you want
> > to verify your code against a current perl, because new Linux or
> > *BSD Systems ship with perl 5.6.
> 
> The error was in the OpenCA::OpenSSL code, it seemed, anyway I have tried the
> code on Perl5.6 and got no errors.... I'll check deeper...

The problem is this section in OpenSSL.pm

        if( not -e "$self->{shell}" ) {
                return;
        };

On some systems the openssl binary does not exist under the bin
directory, but the new method does this:

        if( not $self->{shell} ) {
                $self->{shell} = "$self->{binDir}/openssl";
        };

so if the shell does not exist under the binDir path then you will not
get back a valid object and as such the setParams method fails.

As all of the initialization is supported in the new method, the
quickest fix is to pass the SHELL config option to the new call like:

        my $openssl = OpenCA::OpenSSL->new(SHELL => 'path/to/openssl');

I've been replacing:

        my $openssl = OpenCA::OpenSSL->new();
        $openssl->setParams( CONFIG=>"/usr/local/mpcNET/stuff/openssl.cnf"); 

with 

        my $openssl = OpenCA::OpenSSL->new(             
CONFIG=>"/usr/local/mpcNET/stuff/openssl.cnf");

and this works well.
Paulg

-- 
For PGP Key ID B49E3514,                 mailto:[EMAIL PROTECTED]     
send mail with Subject: pgp-key-request phoneto:+61-7-3367-0490     
Paul Gampe - Technical Manager - APNIC    faxto:+61-7-3367-0482
*** APNIC Meeting Oct 2000 - http://www.apnic.net/meetings ***

S/MIME Cryptographic Signature

Reply via email to