« blib/lib/Crypt/Perl/PKCS10/Attribute/challengePassword.pm
↑ Summary
blib/lib/Crypt/Perl/PKCS8.pm »
| 1 | package Crypt::Perl::PKCS10::Attribute::extensionRequest; | ||
| 2 | |||
| 3 | use strict; | ||
| 4 | use warnings; | ||
| 5 | |||
| 6 | =encoding utf-8 | ||
| 7 | |||
| 8 | =head1 NAME | ||
| 9 | |||
| 10 | Crypt::Perl::PKCS10::Attribute::extensionRequest - CSR “extensionRequest” attribute | ||
| 11 | |||
| 12 | =head1 SYNOPSIS | ||
| 13 | |||
| 14 | #Each object passed should be an instance of a subclass of | ||
| 15 | #Crypt::Perl::X509::Extension | ||
| 16 | my $exreq = Crypt::Perl::PKCS10::Attribute::extensionRequest->new( @EXTN_OBJS ); | ||
| 17 | |||
| 18 | #...or: | ||
| 19 | |||
| 20 | my $exreq = Crypt::Perl::PKCS10::Attribute::extensionRequest->new( | ||
| 21 | [ $extn_type1 => @args1 ], | ||
| 22 | [ $extn_type2 => @args2 ], | ||
| 23 | ); | ||
| 24 | |||
| 25 | #...for example: | ||
| 26 | |||
| 27 | my $exreq = Crypt::Perl::PKCS10::Attribute::extensionRequest->new( | ||
| 28 | [ 'subjectAltName', | ||
| 29 | [ dNSName => 'foo.com' ], | ||
| 30 | [ dNSName => 'haha.tld' ], | ||
| 31 | ], | ||
| 32 | ); | ||
| 33 | |||
| 34 | =head1 DESCRIPTION | ||
| 35 | |||
| 36 | Instances of this class represent an C<extensionRequest> attribute of a | ||
| 37 | PKCS #10 Certificate Signing Request (CSR). | ||
| 38 | |||
| 39 | You probably don’t need to | ||
| 40 | instantiate this class directly; instead, you can instantiate it | ||
| 41 | implicitly by listing out arguments to | ||
| 42 | L<Crypt::Perl::PKCS10>’s constructor. See that module’s | ||
| 43 | L<SYNOPSIS|Crypt::Perl::PKCS10/SYNOPSIS> for an example. | ||
| 44 | |||
| 45 | Look in the L<Crypt::Perl> distribution’s | ||
| 46 | C<Crypt::Perl::X509::Extension> namespace for supported extensions. | ||
| 47 | |||
| 48 | =cut | ||
| 49 | |||
| 50 | use parent qw( | ||
| 51 | Crypt::Perl::PKCS10::Attribute | ||
| 52 | Crypt::Perl::X509::Extensions | ||
| 53 | ); | ||
| 54 | |||
| 55 | use constant OID => '1.2.840.113549.1.9.14'; | ||
| 56 | |||
| 57 | use constant asn1_macro => 'Extensions'; | ||
| 58 | |||
| 59 | 1; |