OO/X509/Context.pm

filter: Statementstmt 57.1% 8 / 14 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 66.6% 2 / 3 Podpod 0.0% 0 / 1 totaltotal 50.0% 10 / 20 CC 2 SCAR 12.5
CC
2
Cov
50%
get_current_cert
6.0
BEGIN
1.0
BEGIN
1.0
CRAP 3.5
« OO/Constants.pm ↑ Summary OO/Session.pm »
1  
2 package Net::SSLeay::OO::X509::Context;
3  
4 # wrapper for X509_STORE_CTX* functions
5 #
6 # Copyright (C) 2009 NZ Registry Services
7 #
8 # This program is free software: you can redistribute it and/or modify
9 # it under the terms of the Artistic License 2.0 or later. You should
10 # have received a copy of the Artistic License the file COPYING.txt.
11 # If not, see <http://www.perlfoundation.org/artistic_license_2_0>
12  
13 1 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
14  
15 1 has 'x509_store_ctx' => isa => 'Int',
16 is => "ro",
17 required => 1,
18 ;
19  
20 0 ▶sub get_current_cert {
Subroutine get_current_cert: not called CC=2 SCAR=17.9
Pod undocumented
21 0 my $self = shift;
22 0 my $x509 = Net::SSLeay::X509_STORE_CTX_get_current_cert(
23 $self->x509_store_ctx, );
24 0 &Net::SSLeay::OO::Error::die_if_ssl_error("get_current_cert");
25 0 ▶ if ($x509) {
Branch: 1 branch
BranchTrueFalseTotal
if ($x509) 0 0 0
26 0 require Net::SSLeay::OO::X509;
27 0 Net::SSLeay::OO::X509->new( x509 => $x509, no_rvinc => 1 );
28 }
29 }
30  
31 # getting all these right is made harder by the lack of OpenSSL docs
32 # for these methods...
33  
34 1 ▶use Net::SSLeay::OO::Functions 'x509_store_ctx';
Subroutine BEGIN: called CC=1 SCAR=0.0
35  
36 # un-triaged:
37 # get_error()
38 # get_error_depth()
39 # get_ex_data()
40 # set_cert()
41 # set_error()
42 # set_ex_data()
43 # set_flags()
44  
45 1 1;
46  
47 __END__
« OO/Constants.pm ↑ Summary OO/Session.pm »