The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

# exported via command: perl examples/x509_cert_details.pl -dump -pem t/data/cert_twitter.crt.pem > t/data/cert_twitter.crt.pem_dump
# hashref dumped via Data::Dump
{
  cdp              => ["http://EVSecure-crl.verisign.com/EVSecure2006.crl"],
  certificate_type => 49,
  digest_sha1      => {
                        pubkey => pack("H*","e83040f63d9b25c1b1318e13f5de899415cd063f"),
                        x509   => pack("H*","ea9defd63361d97671e16c689f54a659d7f10e66"),
                      },
  extensions       => {
                        count   => 10,
                        entries => [
                                     {
                                       critical => 0,
                                       data => "DNS:www.twitter.com, DNS:twitter.com",
                                       ln => "X509v3 Subject Alternative Name",
                                       nid => 85,
                                       oid => "2.5.29.17",
                                       sn => "subjectAltName",
                                     },
                                     {
                                       critical => 0,
                                       data => "CA:FALSE",
                                       ln => "X509v3 Basic Constraints",
                                       nid => 87,
                                       oid => "2.5.29.19",
                                       sn => "basicConstraints",
                                     },
                                     {
                                       critical => 0,
                                       data => "E8:30:40:F6:3D:9B:25:C1:B1:31:8E:13:F5:DE:89:94:15:CD:06:3F",
                                       ln => "X509v3 Subject Key Identifier",
                                       nid => 82,
                                       oid => "2.5.29.14",
                                       sn => "subjectKeyIdentifier",
                                     },
                                     {
                                       critical => 0,
                                       data => "Digital Signature, Key Encipherment",
                                       ln => "X509v3 Key Usage",
                                       nid => 83,
                                       oid => "2.5.29.15",
                                       sn => "keyUsage",
                                     },
                                     {
                                       critical => 0,
                                       data => "\nFull Name:\n  URI:http://EVSecure-crl.verisign.com/EVSecure2006.crl\n",
                                       ln => "X509v3 CRL Distribution Points",
                                       nid => 103,
                                       oid => "2.5.29.31",
                                       sn => "crlDistributionPoints",
                                     },
                                     {
                                       critical => 0,
                                       data => "Policy: 2.16.840.1.113733.1.7.23.6\n  CPS: https://www.verisign.com/rpa\n",
                                       ln => "X509v3 Certificate Policies",
                                       nid => 89,
                                       oid => "2.5.29.32",
                                       sn => "certificatePolicies",
                                     },
                                     {
                                       critical => 0,
                                       data => "TLS Web Server Authentication, TLS Web Client Authentication",
                                       ln => "X509v3 Extended Key Usage",
                                       nid => 126,
                                       oid => "2.5.29.37",
                                       sn => "extendedKeyUsage",
                                     },
                                     {
                                       critical => 0,
                                       data => "keyid:FC:8A:50:BA:9E:B9:25:5A:7B:55:85:4F:95:00:63:8F:E9:58:6B:43\n",
                                       ln => "X509v3 Authority Key Identifier",
                                       nid => 90,
                                       oid => "2.5.29.35",
                                       sn => "authorityKeyIdentifier",
                                     },
                                     {
                                       critical => 0,
                                       data => "OCSP - URI:http://EVSecure-ocsp.verisign.com\nCA Issuers - URI:http://EVSecure-aia.verisign.com/EVSecure2006.cer\n",
                                       ln => "Authority Information Access",
                                       nid => 177,
                                       oid => "1.3.6.1.5.5.7.1.1",
                                       sn => "authorityInfoAccess",
                                     },
                                     {
                                       critical => 0,
                                       data => undef,
                                       ln => undef,
                                       nid => undef,
                                       oid => "1.3.6.1.5.5.7.1.12",
                                       sn => undef,
                                     },
                                   ],
                      },
  extkeyusage      => {
                        ln  => [
                                 "TLS Web Server Authentication",
                                 "TLS Web Client Authentication",
                               ],
                        nid => [129, 130],
                        oid => ["1.3.6.1.5.5.7.3.1", "1.3.6.1.5.5.7.3.2"],
                        sn  => ["serverAuth", "clientAuth"],
                      },
  fingerprint      => {
                        md5  => "34:A7:92:6A:78:82:D5:3F:11:C4:66:D0:70:66:CF:E1",
                        sha1 => "EA:9D:EF:D6:33:61:D9:76:71:E1:6C:68:9F:54:A6:59:D7:F1:0E:66",
                      },
  hash             => {
                        issuer => { dec => 1853825729, hex => "6E7F22C1" },
                        issuer_and_serial => { dec => 2422658675, hex => "9066D673" },
                        subject => { dec => 3318511233, hex => "C5CC7681" },
                      },
  issuer           => {
                        count => 5,
                        entries => [
                          {
                            data => "US",
                            data_utf8_decoded => "US",
                            ln => "countryName",
                            nid => 14,
                            oid => "2.5.4.6",
                            sn => "C",
                          },
                          {
                            data => "VeriSign, Inc.",
                            data_utf8_decoded => "VeriSign, Inc.",
                            ln => "organizationName",
                            nid => 17,
                            oid => "2.5.4.10",
                            sn => "O",
                          },
                          {
                            data => "VeriSign Trust Network",
                            data_utf8_decoded => "VeriSign Trust Network",
                            ln => "organizationalUnitName",
                            nid => 18,
                            oid => "2.5.4.11",
                            sn => "OU",
                          },
                          {
                            data => "Terms of use at https://www.verisign.com/rpa (c)06",
                            data_utf8_decoded => "Terms of use at https://www.verisign.com/rpa (c)06",
                            ln => "organizationalUnitName",
                            nid => 18,
                            oid => "2.5.4.11",
                            sn => "OU",
                          },
                          {
                            data => "VeriSign Class 3 Extended Validation SSL CA",
                            data_utf8_decoded => "VeriSign Class 3 Extended Validation SSL CA",
                            ln => "commonName",
                            nid => 13,
                            oid => "2.5.4.3",
                            sn => "CN",
                          },
                        ],
                        oneline => "/C=US/O=VeriSign, Inc./OU=VeriSign Trust Network/OU=Terms of use at https://www.verisign.com/rpa (c)06/CN=VeriSign Class 3 Extended Validation SSL CA",
                        print_rfc2253 => "CN=VeriSign Class 3 Extended Validation SSL CA,OU=Terms of use at https://www.verisign.com/rpa (c)06,OU=VeriSign Trust Network,O=VeriSign\\, Inc.,C=US",
                        print_rfc2253_utf8 => "CN=VeriSign Class 3 Extended Validation SSL CA,OU=Terms of use at https://www.verisign.com/rpa (c)06,OU=VeriSign Trust Network,O=VeriSign\\, Inc.,C=US",
                        print_rfc2253_utf8_decoded => "CN=VeriSign Class 3 Extended Validation SSL CA,OU=Terms of use at https://www.verisign.com/rpa (c)06,OU=VeriSign Trust Network,O=VeriSign\\, Inc.,C=US",
                      },
  keyusage         => ["digitalSignature", "keyEncipherment"],
  not_after        => "2012-07-27T23:59:59Z",
  not_before       => "2011-07-07T00:00:00Z",
  ns_cert_type     => [],
  pubkey_alg       => "rsaEncryption",
  pubkey_bits      => 2048,
  pubkey_id        => 6,
  pubkey_size      => 256,
  serial           => {
                        dec  => "30779233835142701104683847010155075586",
                        hex  => "1727DD643E4236F87F79BB046BC19802",
                        long => -1,
                      },
  signature_alg    => "sha1WithRSAEncryption",
  subject          => {
                        altnames => [2, "www.twitter.com", 2, "twitter.com"],
                        count => 12,
                        entries => [
                          {
                            data => "US",
                            data_utf8_decoded => "US",
                            ln => undef,
                            nid => undef,
                            oid => "1.3.6.1.4.1.311.60.2.1.3",
                            sn => undef,
                          },
                          {
                            data => "Delaware",
                            data_utf8_decoded => "Delaware",
                            ln => undef,
                            nid => undef,
                            oid => "1.3.6.1.4.1.311.60.2.1.2",
                            sn => undef,
                          },
                          {
                            data => "Private Organization",
                            data_utf8_decoded => "Private Organization",
                            ln => "businessCategory",
                            nid => 860,
                            oid => "2.5.4.15",
                            sn => "businessCategory",
                          },
                          {
                            data => 4337446,
                            data_utf8_decoded => 4337446,
                            ln => "serialNumber",
                            nid => 105,
                            oid => "2.5.4.5",
                            sn => "serialNumber",
                          },
                          {
                            data => "US",
                            data_utf8_decoded => "US",
                            ln => "countryName",
                            nid => 14,
                            oid => "2.5.4.6",
                            sn => "C",
                          },
                          {
                            data => 94107,
                            data_utf8_decoded => 94107,
                            ln => "postalCode",
                            nid => 661,
                            oid => "2.5.4.17",
                            sn => "postalCode",
                          },
                          {
                            data => "California",
                            data_utf8_decoded => "California",
                            ln => "stateOrProvinceName",
                            nid => 16,
                            oid => "2.5.4.8",
                            sn => "ST",
                          },
                          {
                            data => "San Francisco",
                            data_utf8_decoded => "San Francisco",
                            ln => "localityName",
                            nid => 15,
                            oid => "2.5.4.7",
                            sn => "L",
                          },
                          {
                            data => "795 Folsom St, Suite 600",
                            data_utf8_decoded => "795 Folsom St, Suite 600",
                            ln => "streetAddress",
                            nid => 660,
                            oid => "2.5.4.9",
                            sn => "street",
                          },
                          {
                            data => "Twitter, Inc.",
                            data_utf8_decoded => "Twitter, Inc.",
                            ln => "organizationName",
                            nid => 17,
                            oid => "2.5.4.10",
                            sn => "O",
                          },
                          {
                            data => "Twitter Operations",
                            data_utf8_decoded => "Twitter Operations",
                            ln => "organizationalUnitName",
                            nid => 18,
                            oid => "2.5.4.11",
                            sn => "OU",
                          },
                          {
                            data => "twitter.com",
                            data_utf8_decoded => "twitter.com",
                            ln => "commonName",
                            nid => 13,
                            oid => "2.5.4.3",
                            sn => "CN",
                          },
                        ],
                        oneline => "/1.3.6.1.4.1.311.60.2.1.3=US/1.3.6.1.4.1.311.60.2.1.2=Delaware/businessCategory=Private Organization/serialNumber=4337446/C=US/postalCode=94107/ST=California/L=San Francisco/street=795 Folsom St, Suite 600/O=Twitter, Inc./OU=Twitter Operations/CN=twitter.com",
                        print_rfc2253 => "CN=twitter.com,OU=Twitter Operations,O=Twitter\\, Inc.,street=795 Folsom St\\, Suite 600,L=San Francisco,ST=California,postalCode=94107,C=US,serialNumber=4337446,businessCategory=Private Organization,1.3.6.1.4.1.311.60.2.1.2=#130844656C6177617265,1.3.6.1.4.1.311.60.2.1.3=#13025553",
                        print_rfc2253_utf8 => "CN=twitter.com,OU=Twitter Operations,O=Twitter\\, Inc.,street=795 Folsom St\\, Suite 600,L=San Francisco,ST=California,postalCode=94107,C=US,serialNumber=4337446,businessCategory=Private Organization,1.3.6.1.4.1.311.60.2.1.2=#130844656C6177617265,1.3.6.1.4.1.311.60.2.1.3=#13025553",
                        print_rfc2253_utf8_decoded => "CN=twitter.com,OU=Twitter Operations,O=Twitter\\, Inc.,street=795 Folsom St\\, Suite 600,L=San Francisco,ST=California,postalCode=94107,C=US,serialNumber=4337446,businessCategory=Private Organization,1.3.6.1.4.1.311.60.2.1.2=#130844656C6177617265,1.3.6.1.4.1.311.60.2.1.3=#13025553",
                      },
  version          => 2,
}