line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package FusionInventory::Agent::HTTP::Protocol::https; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
23387137
|
use strict; |
|
1
|
|
|
|
|
8
|
|
|
1
|
|
|
|
|
74
|
|
4
|
1
|
|
|
1
|
|
6
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
65
|
|
5
|
1
|
|
|
1
|
|
8
|
use base qw(LWP::Protocol::https); |
|
1
|
|
|
|
|
44
|
|
|
1
|
|
|
|
|
698
|
|
6
|
|
|
|
|
|
|
|
7
|
1
|
|
|
1
|
|
118544
|
use IO::Socket::SSL qw(SSL_VERIFY_NONE SSL_VERIFY_PEER); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
4
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub import { |
10
|
0
|
|
|
0
|
|
|
my ($class, %params) = @_; |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
# set default context |
13
|
0
|
0
|
|
|
|
|
IO::Socket::SSL::set_ctx_defaults(ca_file => $params{ca_cert_file}) |
14
|
|
|
|
|
|
|
if $params{ca_cert_file}; |
15
|
0
|
0
|
|
|
|
|
IO::Socket::SSL::set_ctx_defaults(ca_path => $params{ca_cert_dir}) |
16
|
|
|
|
|
|
|
if $params{ca_cert_dir}; |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub _extra_sock_opts { |
20
|
0
|
|
|
0
|
|
|
my ($self, $host) = @_; |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
return ( |
23
|
0
|
0
|
|
|
|
|
SSL_verify_mode => $self->{ua}->{ssl_check} ? |
24
|
|
|
|
|
|
|
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
|
|
191
|
use base qw(Net::HTTPS LWP::Protocol::http::SocketMethods); |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
333
|
|
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
1; |
36
|
|
|
|
|
|
|
__END__ |