ACME2/JWTMaker/RSA.pm untested

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