line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::ACME2::JWTMaker::RSA; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
485
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
22
|
|
4
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
20
|
|
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
3
|
use parent qw( Net::ACME2::JWTMaker ); |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
4
|
|
7
|
|
|
|
|
|
|
|
8
|
1
|
|
|
1
|
|
43
|
use constant _ALG => 'RS256'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
96
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
#Based on Crypt::JWT::encode_jwt(), but focused on this particular |
11
|
|
|
|
|
|
|
#protocol’s needs. Note that UTF-8 might get mangled in here, |
12
|
|
|
|
|
|
|
#but that’s not a problem since ACME shouldn’t require sending raw UTF-8. |
13
|
|
|
|
|
|
|
#(Maybe with registration??) |
14
|
|
|
|
|
|
|
sub _get_signer { |
15
|
4
|
|
|
4
|
|
9
|
my ( $self ) = @_; |
16
|
|
|
|
|
|
|
|
17
|
4
|
|
|
|
|
8
|
my $method_name = 'sign_' . _ALG(); |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
return sub { |
20
|
4
|
|
|
4
|
|
22
|
return $self->{'key'}->$method_name(@_); |
21
|
4
|
|
|
|
|
20
|
}; |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
1; |