line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package FusionInventory::Agent::HTTP::Protocol::https; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
30691436
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
52
|
|
4
|
1
|
|
|
1
|
|
6
|
use warnings; |
|
1
|
|
|
|
|
8
|
|
|
1
|
|
|
|
|
99
|
|
5
|
1
|
|
|
1
|
|
8
|
use base qw(LWP::Protocol::https); |
|
1
|
|
|
|
|
85
|
|
|
1
|
|
|
|
|
993
|
|
6
|
|
|
|
|
|
|
|
7
|
1
|
|
|
1
|
|
156136
|
use IO::Socket::SSL qw(SSL_VERIFY_NONE SSL_VERIFY_PEER); |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
5
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub import { |
10
|
0
|
|
|
0
|
|
|
my ($class, %params) = @_; |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
# set default context |
13
|
|
|
|
|
|
|
IO::Socket::SSL::set_ctx_defaults(ca_file => $params{ca_cert_file}) |
14
|
0
|
0
|
|
|
|
|
if $params{ca_cert_file}; |
15
|
|
|
|
|
|
|
IO::Socket::SSL::set_ctx_defaults(ca_path => $params{ca_cert_dir}) |
16
|
0
|
0
|
|
|
|
|
if $params{ca_cert_dir}; |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub _extra_sock_opts { |
20
|
0
|
|
|
0
|
|
|
my ($self, $host) = @_; |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
return ( |
23
|
|
|
|
|
|
|
SSL_verify_mode => $self->{ua}->{ssl_check} ? |
24
|
0
|
0
|
|
|
|
|
SSL_VERIFY_PEER : SSL_VERIFY_NONE, |
25
|
|
|
|
|
|
|
SSL_verifycn_scheme => 'http', |
26
|
|
|
|
|
|
|
SSL_verifycn_name => $host |
27
|
|
|
|
|
|
|
); |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
## no critic (ProhibitMultiplePackages) |
31
|
|
|
|
|
|
|
package FusionInventory::Agent::HTTP::Protocol::https::Socket; |
32
|
|
|
|
|
|
|
|
33
|
1
|
|
|
1
|
|
230
|
use base qw(Net::HTTPS LWP::Protocol::http::SocketMethods); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
671
|
|
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
1; |
36
|
|
|
|
|
|
|
__END__ |