File Coverage

lib/Crypt/Perl/X509/Extension/subjectAltName.pm
Criterion Covered Total %
statement 18 18 100.0
branch n/a
condition n/a
subroutine 6 6 100.0
pod n/a
total 24 24 100.0


line stmt bran cond sub pod time code
1             package Crypt::Perl::X509::Extension::subjectAltName;
2              
3 4     4   191239 use strict;
  4         16  
  4         102  
4 4     4   20 use warnings;
  4         7  
  4         129  
5              
6             =encoding utf-8
7              
8             =head1 NAME
9              
10             Crypt::Perl::X509::Extension::subjectAltName - X.509 subjectAltName extension
11              
12             =head1 SYNOPSIS
13              
14             my $san = Crypt::Perl::X509::Extension::subjectAltName->new(
15             [ dNSName => 'foo.com' ],
16             [ dNSName => 'bar.com' ],
17             [ rfc822Name => 'haha@tld.com' ],
18             );
19              
20             =head1 DESCRIPTION
21              
22             Instances of this class represent a C extension
23             of an X.509 (SSL) certificate.
24              
25             You probably don’t need to
26             instantiate this class directly; instead, you can instantiate it
27             implicitly by listing out arguments to
28             L’s constructor. See that module’s
29             L for an example.
30              
31             You can also use instances of this class as arguments to
32             L’s constructor
33             to include a request for a C extension in a PKCS #10
34             Certificate Signing Request.
35              
36             =head1 SEE ALSO
37              
38             L
39              
40             =cut
41              
42 4         22 use parent qw(
43             Crypt::Perl::X509::Extension
44             Crypt::Perl::X509::GeneralNames
45 4     4   17 );
  4         8  
46              
47 4     4   178 use Crypt::Perl::X509::GeneralNames ();
  4         6  
  4         78  
48              
49 4     4   16 use constant OID => '2.5.29.17';
  4         8  
  4         269  
50              
51 4     4   21 use constant ASN1 => Crypt::Perl::X509::GeneralNames::ASN1() . <
  4         7  
  4         204  
52             subjectAltName ::= GeneralNames
53             END
54              
55             1;