blib/lib/Crypt/Perl/X509/Extension/subjectAltName.pm untested

filter: Statementstmt 0.0% 0 / 18 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 6 Podpod n/a totaltotal 0.0% 0 / 24 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1 package Crypt::Perl::X509::Extension::subjectAltName;
2  
3 use strict;
4 use warnings;
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<subjectAltName> 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<Crypt::Perl::PKCS10>’s constructor. See that module’s
29 L<SYNOPSIS|Crypt::Perl::PKCS10/SYNOPSIS> for an example.
30  
31 You can also use instances of this class as arguments to
32 L<Crypt::Perl::PKCS10::Attribute::extensionRequest>’s constructor
33 to include a request for a C<subjectAltName> extension in a PKCS #10
34 Certificate Signing Request.
35  
36 =head1 SEE ALSO
37  
38 L<https://tools.ietf.org/html/rfc5280#section-4.2.1.6>
39  
40 =cut
41  
42 use parent qw(
43 Crypt::Perl::X509::Extension
44 Crypt::Perl::X509::GeneralNames
45 );
46  
47 use Crypt::Perl::X509::GeneralNames ();
48  
49 use constant OID => '2.5.29.17';
50  
51 use constant ASN1 => Crypt::Perl::X509::GeneralNames::ASN1() . <<END;
52 subjectAltName ::= GeneralNames
53 END
54  
55 1;