ACME2/JWTMaker/RSA.pm

filter: Statementstmt 100% 17 / 17 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 6 / 6 Podpod n/a totaltotal 100% 23 / 23 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« ACME2/JWTMaker/ECC.pm ↑ Summary ACME2/X.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 4 ▶ my ( $self ) = @_;
Subroutine _get_signer: called CC=1 SCAR=0.0
16  
17 4 my $method_name = 'sign_' . _ALG();
18  
19 return sub {
20 4 ▶ return $self->{'key'}->$method_name(@_);
Subroutine __ANON__: called CC=1 SCAR=0.0
21 4 };
22 }
23  
24 1 1;
« ACME2/JWTMaker/ECC.pm ↑ Summary ACME2/X.pm »