« lib/Crypt/Perl/X509/Extension/issuerAltName.pm
↑ Summary
lib/Crypt/Perl/X509/Extension/subjectInfoAccess.pm »
| 1 | package Crypt::Perl::X509::Extension::subjectAltName; | ||
| 2 | |||
| 3 | 4 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 4 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 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 | 4 | use parent qw( | |
| 43 | Crypt::Perl::X509::Extension | ||
| 44 | Crypt::Perl::X509::GeneralNames | ||
| 45 | 4 | ▶ | ); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 46 | |||
| 47 | 4 | ▶ | use Crypt::Perl::X509::GeneralNames (); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 48 | |||
| 49 | 4 | ▶ | use constant OID => '2.5.29.17'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 50 | |||
| 51 | 4 | ▶ | use constant ASN1 => Crypt::Perl::X509::GeneralNames::ASN1() . <<END; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 52 | subjectAltName ::= GeneralNames | ||
| 53 | END | ||
| 54 | |||
| 55 | 4 | 1; | |