my $oref_x509= Crypt::X509->new($der); if ( $oref_x509->error ) { warn "Error on parsing certificate: ", $oref_x509->error; }