1Net::SSLGlue::LWP(3) User Contributed Perl Documentation Net::SSLGlue::LWP(3)
2
3
4
6 Net::SSLGlue::LWP - proper certificate checking for https in LWP
7
9 'https://www....' );
10 {
11 local %Net::SSLGlue::LWP::SSLopts = %Net::SSLGlue::LWP::SSLopts;
12
13 # switch off verification
14 $Net::SSLGlue::LWP::SSLopts{SSL_verify_mode} = 0;
15
16 # or: set different verification policy, because cert does
17 # not conform to RFC (wildcards in CN are not allowed for https,
18 # but some servers do it anyway)
19 $Net::SSLGlue::LWP::SSLopts{SSL_verifycn_scheme} = {
20 wildcards_in_cn => 'anywhere',
21 check_cn => 'always',
22 };
23 }
24
26 Net::SSLGlue::LWP modifies Net::HTTPS and LWP::Protocol::https so that
27 Net::HTTPS is forced to use IO::Socket::SSL instead of Crypt::SSLeay,
28 and that LWP::Protocol::https does proper certificate checking using
29 the "http" SSL_verify_scheme from IO::Socket::SSL.
30
31 This module should only be used for older LWP version, see Supported
32 LWP versions below.
33
34 Because LWP does not have a mechanism to forward arbitrary parameters
35 for the construction of the underlying socket these parameters can be
36 set globally when including the package, or with local settings of the
37 %Net::SSLGlue::LWP::SSLopts variable.
38
39 All of the "SSL_*" parameter from IO::Socket::SSL can be used; the
40 following parameters are especially useful:
41
42 SSL_ca_path, SSL_ca_file
43 Specifies the path or a file where the CAs used for checking the
44 certificates are located. This is typically "etc/ssl/certs" on UNIX
45 systems.
46
47 SSL_verify_mode
48 If set to 0, verification of the certificate will be disabled. By
49 default it is set to 1 which means that the peer certificate is
50 checked.
51
52 SSL_verifycn_name
53 Usually the name given as the hostname in the constructor is used
54 to verify the identity of the certificate. If you want to check the
55 certificate against another name you can specify it with this
56 parameter.
57
59 This module should be used for older LWP version only. Starting with
60 version 6.06 it is recommended to use LWP directly. If a recent version
61 is found Net::SSLGlue::LWP will print out a warning and not monkey
62 patch too much into LWP (only as much as necessary to still support
63 %Net::SSLGlue::LWP::SSLopts).
64
66 IO::Socket::SSL, LWP, Net::HTTPS, LWP::Protocol::https
67
69 This module is copyright (c) 2008..2015, Steffen Ullrich. All Rights
70 Reserved. This module is free software. It may be used, redistributed
71 and/or modified under the same terms as Perl itself.
72
73
74
75perl v5.28.0 2016-04-04 Net::SSLGlue::LWP(3)