ACME2/JWTMaker/RSA.pm

filter: Statementstmt 100% 16 / 16 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 6 / 6 Podpod n/a totaltotal 100% 22 / 22 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« ACME2/Challenge.pm ↑ Summary ACME2/LetsEncrypt.pm »
1 package Net::ACME2::JWTMaker::RSA;
2  
3 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 1 ▶use parent qw( Net::ACME2::JWTMaker );
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 1 ▶use constant _ALG => 'RS256';
Subroutine BEGIN: called CC=1 SCAR=0.0
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 2 ▶ my ( $self ) = @_;
Subroutine _get_signer: called CC=1 SCAR=0.0
16  
17 return sub {
18 2 ▶ return $self->{'key'}->can('sign_' . _ALG())->($self->{'key'}, @_);
Subroutine __ANON__: called CC=1 SCAR=0.0
19 2 };
20 }
21  
22 1 1;
« ACME2/Challenge.pm ↑ Summary ACME2/LetsEncrypt.pm »