lib/Crypt/Perl/ToDER.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
statement | 12 | 12 | 100.0 |
branch | 2 | 2 | 100.0 |
condition | n/a | ||
subroutine | 4 | 4 | 100.0 |
pod | 0 | 1 | 0.0 |
total | 18 | 19 | 94.7 |
line | stmt | bran | cond | sub | pod | time | code |
---|---|---|---|---|---|---|---|
1 | package Crypt::Perl::ToDER; | ||||||
2 | |||||||
3 | 10 | 10 | 74 | use strict; | |||
10 | 23 | ||||||
10 | 299 | ||||||
4 | 10 | 10 | 58 | use warnings; | |||
10 | 20 | ||||||
10 | 250 | ||||||
5 | |||||||
6 | 10 | 10 | 502 | use Crypt::Format (); | |||
10 | 651 | ||||||
10 | 1361 | ||||||
7 | |||||||
8 | #Modifies in-place. | ||||||
9 | sub ensure_der { | ||||||
10 | 546 | 100 | 546 | 0 | 7130 | if ( $_[0] =~ m<\A-> ) { | |
11 | 544 | 7359 | $_[0] = Crypt::Format::pem2der($_[0]); | ||||
12 | } | ||||||
13 | |||||||
14 | 546 | 53871 | return; | ||||
15 | } | ||||||
16 | |||||||
17 | 1; |