On 22/8/07 10:34, "Jean-Luc Boss" <[EMAIL PROTECTED]> wrote:
> Hi, > > 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." > I want to build a mailer to send alerts to our customer, > if they have to renew their certificates, the ldap > extraction is already running. > ___________________________________________________ > use Crypt::X509; > #INITIALIZING > my $certfile="46B2D0D7.cer"; > my $certificate; > > open CERTFILE , $certfile or die "Error to open file"; > binmode binmode Presumably that ought to be: binmode CERTFILE; ? > read (CERTFILE, $certificate, 65536); > close CERTFILE; > > $decoded = new Crypt::X509->new( cert => $certificate ); > > print "Certificate Subject: ".$decoded->Subject; > ___________________________________________________ > > Does someone know what's wrong with this? What happens if you single-step with the perl debugger? Cheers, Chris