| 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
| |||||||||||
| 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__ | ||||||||||