« blib/lib/Crypt/Perl/Ed25519/PublicKey.pm
↑ Summary
lib/Crypt/Perl/X509/Extension/ct_precert_poison.pm »
| 1 | package Crypt::Perl::PKCS10::Attribute::challengePassword; | ||
| 2 | |||
| 3 | =encoding utf-8 | ||
| 4 | |||
| 5 | =head1 NAME | ||
| 6 | |||
| 7 | Crypt::Perl::PKCS10::Attribute::challengePassword | ||
| 8 | |||
| 9 | =head1 SYNOPSIS | ||
| 10 | |||
| 11 | my $chpw = Crypt::Perl::PKCS10::Attribute::challengePassword->new($passwd); | ||
| 12 | |||
| 13 | =head1 SECURITY | ||
| 14 | |||
| 15 | This attribute stores a phrase B<UNENCRYPTED> in the CSR. Don’t put | ||
| 16 | anything in here that you consider sensitive! | ||
| 17 | |||
| 18 | It’s likely that you don’t need this attribute. | ||
| 19 | Check with your Certificate Authority to find out for sure sure if | ||
| 20 | you need to include this in your CSR. | ||
| 21 | |||
| 22 | =head1 DESCRIPTION | ||
| 23 | |||
| 24 | Instances of this class represent a C<challengePassword> attribute of a | ||
| 25 | PKCS #10 Certificate Signing Request (CSR). | ||
| 26 | |||
| 27 | You probably don’t need to | ||
| 28 | instantiate this class directly; instead, you can instantiate it | ||
| 29 | implicitly by listing out arguments to | ||
| 30 | L<Crypt::Perl::PKCS10>’s constructor. See that module’s | ||
| 31 | L<SYNOPSIS|Crypt::Perl::PKCS10/SYNOPSIS> for an example. | ||
| 32 | |||
| 33 | =cut | ||
| 34 | |||
| 35 | 1 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 36 | 1 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 37 | |||
| 38 | 1 | ▶ | use parent qw( Crypt::Perl::PKCS10::Attribute ); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 39 | |||
| 40 | 1 | ▶ | use constant OID => '1.2.840.113549.1.9.7'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 41 | |||
| 42 | 1 | ▶ | use constant ASN1 => <<END; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 43 | challengePassword ::= CHOICE { | ||
| 44 | password UTF8String | ||
| 45 | } | ||
| 46 | END | ||
| 47 | |||
| 48 | sub new { | ||
| 49 | 9 | ▶ | my ($class, $passwd) = @_; |
|
Subroutine
new: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 50 | |||
| 51 | 9 | return bless \$passwd, $class; | |
| 52 | } | ||
| 53 | |||
| 54 | sub _encode_params { | ||
| 55 | 9 | ▶ | my ($self) = @_; |
|
Subroutine
_encode_params: called CC=1 SCAR=0.0
| |||
| 56 | |||
| 57 | return { | ||
| 58 | 9 | password => "$$self", | |
| 59 | }; | ||
| 60 | } | ||
| 61 | |||
| 62 | 1 | 1; | |