line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::ACME::Challenge::Pending; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
=encoding utf-8 |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
=head1 NAME |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
Net::ACME::Challenge::Pending - base class for an unhandled challenge |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
=head1 DESCRIPTION |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
This base class encapsulates behavior to respond to unhandled challenges. |
12
|
|
|
|
|
|
|
To work with challenges that have been handled (successfully or not), |
13
|
|
|
|
|
|
|
see C. |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
Note that HTTP requests have some “helper” logic in the subclass |
16
|
|
|
|
|
|
|
C. |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
=cut |
19
|
|
|
|
|
|
|
|
20
|
3
|
|
|
3
|
|
1003
|
use strict; |
|
3
|
|
|
|
|
3
|
|
|
3
|
|
|
|
|
64
|
|
21
|
3
|
|
|
3
|
|
9
|
use warnings; |
|
3
|
|
|
|
|
3
|
|
|
3
|
|
|
|
|
50
|
|
22
|
|
|
|
|
|
|
|
23
|
3
|
|
|
3
|
|
880
|
use Net::ACME::Utils (); |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
sub new { |
26
|
|
|
|
|
|
|
my ( $class, %opts ) = @_; |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
Net::ACME::Utils::verify_token( $opts{'token'} ); |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
return bless { map { ( "_$_" => $opts{$_} ) } qw(type token uri) }, $class; |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
sub token { |
34
|
|
|
|
|
|
|
my ($self) = @_; |
35
|
|
|
|
|
|
|
return $self->{'_token'}; |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
sub uri { |
39
|
|
|
|
|
|
|
my ($self) = @_; |
40
|
|
|
|
|
|
|
return $self->{'_uri'}; |
41
|
|
|
|
|
|
|
} |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
sub type { |
44
|
|
|
|
|
|
|
my ($self) = @_; |
45
|
|
|
|
|
|
|
return $self->{'_type'}; |
46
|
|
|
|
|
|
|
} |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
sub make_key_authz { |
49
|
|
|
|
|
|
|
my ( $self, $jwk ) = @_; |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
my $jwk_thumbprint = Net::ACME::Utils::get_jwk_thumbprint($jwk); |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
return "$self->{'_token'}.$jwk_thumbprint"; |
54
|
|
|
|
|
|
|
} |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
1; |