line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::ACME2::JWTMaker::RSA; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
1214
|
use strict; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
58
|
|
4
|
2
|
|
|
2
|
|
10
|
use warnings; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
75
|
|
5
|
|
|
|
|
|
|
|
6
|
2
|
|
|
2
|
|
11
|
use parent qw( Net::ACME2::JWTMaker ); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
26
|
|
7
|
|
|
|
|
|
|
|
8
|
2
|
|
|
2
|
|
111
|
use constant _ALG => 'RS256'; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
257
|
|
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
|
8
|
|
|
8
|
|
17
|
my ( $self ) = @_; |
16
|
|
|
|
|
|
|
|
17
|
8
|
|
|
|
|
16
|
my $method_name = 'sign_' . _ALG(); |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
return sub { |
20
|
8
|
|
|
8
|
|
46
|
return $self->{'key'}->$method_name(@_); |
21
|
8
|
|
|
|
|
46
|
}; |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
1; |