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 | 8 | 8 | 45 | use strict; | |||
8 | 14 | ||||||
8 | 188 | ||||||
4 | 8 | 8 | 31 | use warnings; | |||
8 | 16 | ||||||
8 | 164 | ||||||
5 | |||||||
6 | 8 | 8 | 355 | use Crypt::Format (); | |||
8 | 393 | ||||||
8 | 562 | ||||||
7 | |||||||
8 | #Modifies in-place. | ||||||
9 | sub ensure_der { | ||||||
10 | 508 | 100 | 508 | 0 | 4805 | if ( $_[0] =~ m<\A-> ) { | |
11 | 507 | 4579 | $_[0] = Crypt::Format::pem2der($_[0]); | ||||
12 | } | ||||||
13 | |||||||
14 | 508 | 32591 | return; | ||||
15 | } | ||||||
16 | |||||||
17 | 1; |