line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Crypt::OpenSSL::PKCS10; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
70591
|
use 5.008000; |
|
1
|
|
|
|
|
11
|
|
4
|
1
|
|
|
1
|
|
6
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
31
|
|
5
|
1
|
|
|
1
|
|
6
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
230
|
|
6
|
|
|
|
|
|
|
require Exporter; |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
our @ISA = qw(Exporter); |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
# Items to export into callers namespace by default. Note: do not export |
11
|
|
|
|
|
|
|
# names by default without a very good reason. Use EXPORT_OK instead. |
12
|
|
|
|
|
|
|
# Do not simply export all your public functions/methods/constants. |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
# This allows declaration use Crypt::OpenSSL::PKCS10 ':all'; |
15
|
|
|
|
|
|
|
# If you do not need this, moving things directly into @EXPORT or @EXPORT_OK |
16
|
|
|
|
|
|
|
# will save memory. |
17
|
|
|
|
|
|
|
our @NIDS = qw( |
18
|
|
|
|
|
|
|
NID_key_usage NID_subject_alt_name NID_netscape_cert_type NID_netscape_comment |
19
|
|
|
|
|
|
|
NID_ext_key_usage |
20
|
|
|
|
|
|
|
); |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
our %EXPORT_TAGS = ( |
23
|
|
|
|
|
|
|
'all' => [ @NIDS ], |
24
|
|
|
|
|
|
|
'const' => [ @NIDS ], |
25
|
|
|
|
|
|
|
); |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } ); |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
#our @EXPORT = qw( |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
#); |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
our $VERSION = '0.23'; |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
require XSLoader; |
36
|
|
|
|
|
|
|
XSLoader::load('Crypt::OpenSSL::PKCS10', $VERSION); |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
# Preloaded methods go here. |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
sub new_from_rsa { |
41
|
1
|
|
|
1
|
1
|
110234
|
my $self = shift; |
42
|
1
|
|
|
|
|
4
|
my $rsa = shift; |
43
|
|
|
|
|
|
|
|
44
|
1
|
|
|
|
|
60
|
my $priv = $rsa->get_private_key_string(); |
45
|
1
|
|
|
|
|
724
|
$self->_new_from_rsa($rsa, $priv); |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
} |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
1; |
50
|
|
|
|
|
|
|
__END__ |