line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Crypt::Perl::PKCS8; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
#TODO: Rename this, and split up the public/private as appropriate. |
4
|
|
|
|
|
|
|
|
5
|
7
|
|
|
7
|
|
38
|
use strict; |
|
7
|
|
|
|
|
15
|
|
|
7
|
|
|
|
|
178
|
|
6
|
7
|
|
|
7
|
|
28
|
use warnings; |
|
7
|
|
|
|
|
12
|
|
|
7
|
|
|
|
|
275
|
|
7
|
|
|
|
|
|
|
|
8
|
7
|
|
|
7
|
|
41
|
use constant ASN1 => <
|
|
7
|
|
|
|
|
9
|
|
|
7
|
|
|
|
|
359
|
|
9
|
|
|
|
|
|
|
-- FG: simplified from RFC for Convert::ASN1 |
10
|
|
|
|
|
|
|
Version ::= INTEGER |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
-- cf. RFC 3280 4.1.1.2 |
13
|
|
|
|
|
|
|
AlgorithmIdentifier ::= SEQUENCE { |
14
|
|
|
|
|
|
|
algorithm OBJECT IDENTIFIER, |
15
|
|
|
|
|
|
|
parameters ANY DEFINED BY algorithm OPTIONAL |
16
|
|
|
|
|
|
|
} |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
-- cf. RFC 5208 appendix A |
19
|
|
|
|
|
|
|
PrivateKeyInfo ::= SEQUENCE { |
20
|
|
|
|
|
|
|
version Version, |
21
|
|
|
|
|
|
|
privateKeyAlgorithm AlgorithmIdentifier, |
22
|
|
|
|
|
|
|
privateKey PrivateKey |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
PrivateKey ::= OCTET STRING |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
-- cf. RFC 3280 4.1 |
28
|
|
|
|
|
|
|
SubjectPublicKeyInfo ::= SEQUENCE { |
29
|
|
|
|
|
|
|
algorithm AlgorithmIdentifier, |
30
|
|
|
|
|
|
|
subjectPublicKey BIT STRING |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
END |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
1; |