Help for this page

Select Code to Download


  1. or download this
    my $s_filename = 'path/to/file';
    my ($dev, $ino, $mode, $nlink, $uid, $gid, $rdev, $size, $atime, $mtim
    +e, $ctime, $blksize, $blocks) = stat $s_filename;
    open FILE, "<$s_filename" or die "no such file";
    ...
    my $pem_cert;
    read FILE, $pem_cert, $size;
    close FILE;
    
  2. or download this
    $pem_cert =~ /-----BEGIN CERTIFICATE-----(?:\r\n?|\n)(.+)(?:\r\n?|\n)-
    +----END CERTIFICATE-----/s;
    my $s_pem = $1;
    
  3. or download this
    my $out = $asn->decode($der);
    if(!defined $out)
    {
        die $asn->error();
    }
    print Dumper($out);