Hello,

2007/8/22, Chris Ridd <[EMAIL PROTECTED]>:
> On 22/8/07 10:34, "Jean-Luc Boss" <[EMAIL PROTECTED]> wrote:

> > when i try to run this simple Crypt::X509 script, i have this
> > error: "Attempt to bless into a reference at
> > /opt/perl_32/lib/site_perl/5.8.8/Crypt/X509.pm line 105."
This happens in the following code:
sub new {
        my ($class,%args) = @_;
        if (!defined ($parser)) {
                $parser=_init();
        }
        my $self = $parser->decode($args{'cert'});
        
        $self->{"_error"} = $parser->error;
        bless ($self, $class);  <========== Error comes down here
        return $self;
}

This can only happen, when the given cert argument is not a string (or
scalar in Perl speak)

Like Chris already suggested, you probably give the new function an
undef, which leads to an uninitialised parser, that cannot be blessed.

Did the Tests work when you installed Crypt::X509 ? When you look in
the t subdirectory you'll find an example how to read a *binary*
certificate file and use the module.

Mit freundlichen Grüßen,

Alexander Jung

Reply via email to