1Net::SSLGlue::LWP(3)  User Contributed Perl Documentation Net::SSLGlue::LWP(3)
2
3
4

NAME

6       Net::SSLGlue::LWP - proper certificate checking for https in LWP
7

SYNOPSIS

9               use Net::SSLGlue::LWP SSL_ca_path => ...;
10               use LWP::Simple;
11               get( 'https://www....' );
12
13               {
14                       local %Net::SSLGlue::LWP::SSLopts = %Net::SSLGlue::LWP::SSLopts;
15
16                       # switch off verification
17                       $Net::SSLGlue::LWP::SSLopts{SSL_verify_mode} = 0;
18
19                       # or: set different verification policy, because cert does
20                       # not conform to RFC (wildcards in CN are not allowed for https,
21                       # but some servers do it anyway)
22                       $Net::SSLGlue::LWP::SSLopts{SSL_verifycn_scheme} = {
23                               wildcards_in_cn => 'anywhere',
24                               check_cn => 'always',
25                       };
26               }
27

DESCRIPTION

29       Net::SSLGlue::LWP modifies Net::HTTPS and LWP::Protocol::https so that
30       Net::HTTPS is forced to use IO::Socket::SSL instead of Crypt::SSLeay,
31       and that LWP::Protocol::https does proper certificate checking using
32       the "http" SSL_verify_scheme from IO::Socket::SSL.
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

SEE ALSO

59       IO::Socket::SSL, LWP, Net::HTTPS, LWP::Protocol::https
60
62       This module is copyright (c) 2008, Steffen Ullrich.  All Rights
63       Reserved.  This module is free software. It may be used, redistributed
64       and/or modified under the same terms as Perl itself.
65
66
67
68perl v5.12.3                      2011-07-17              Net::SSLGlue::LWP(3)
Impressum