.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Net::SSLGlue::LWP 3pm" .TH Net::SSLGlue::LWP 3pm "2022-12-06" "perl v5.36.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Net::SSLGlue::LWP \- proper certificate checking for https in LWP .SH "SYNOPSIS u use Net::SSLGlue::LWP SSL_ca_path => ...; use LWP::Simple; get( 'https://www....' );" .IX Header "SYNOPSIS u use Net::SSLGlue::LWP SSL_ca_path => ...; use LWP::Simple; get( 'https://www....' );" .Vb 2 \& { \& local %Net::SSLGlue::LWP::SSLopts = %Net::SSLGlue::LWP::SSLopts; \& \& # switch off verification \& $Net::SSLGlue::LWP::SSLopts{SSL_verify_mode} = 0; \& \& # or: set different verification policy, because cert does \& # not conform to RFC (wildcards in CN are not allowed for https, \& # but some servers do it anyway) \& $Net::SSLGlue::LWP::SSLopts{SSL_verifycn_scheme} = { \& wildcards_in_cn => \*(Aqanywhere\*(Aq, \& check_cn => \*(Aqalways\*(Aq, \& }; \& } .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" Net::SSLGlue::LWP modifies Net::HTTPS and LWP::Protocol::https so that Net::HTTPS is forced to use IO::Socket::SSL instead of Crypt::SSLeay, and that LWP::Protocol::https does proper certificate checking using the \&\f(CW\*(C`http\*(C'\fR SSL_verify_scheme from IO::Socket::SSL. .PP This module should only be used for older \s-1LWP\s0 version, see \fBSupported \s-1LWP\s0 versions\fR below. .PP Because \s-1LWP\s0 does not have a mechanism to forward arbitrary parameters for the construction of the underlying socket these parameters can be set globally when including the package, or with local settings of the \&\f(CW%Net::SSLGlue::LWP::SSLopts\fR variable. .PP All of the \f(CW\*(C`SSL_*\*(C'\fR parameter from IO::Socket::SSL can be used; the following parameters are especially useful: .IP "SSL_ca_path, SSL_ca_file" 4 .IX Item "SSL_ca_path, SSL_ca_file" Specifies the path or a file where the CAs used for checking the certificates are located. This is typically \*(L"etc/ssl/certs\*(R" on \s-1UNIX\s0 systems. .IP "SSL_verify_mode" 4 .IX Item "SSL_verify_mode" If set to 0, verification of the certificate will be disabled. By default it is set to 1 which means that the peer certificate is checked. .IP "SSL_verifycn_name" 4 .IX Item "SSL_verifycn_name" Usually the name given as the hostname in the constructor is used to verify the identity of the certificate. If you want to check the certificate against another name you can specify it with this parameter. .SH "Supported LWP versions" .IX Header "Supported LWP versions" This module should be used for older \s-1LWP\s0 version only. Starting with version 6.06 it is recommended to use \s-1LWP\s0 directly. If a recent version is found Net::SSLGlue::LWP will print out a warning and not monkey patch too much into \&\s-1LWP\s0 (only as much as necessary to still support \f(CW%Net::SSLGlue::LWP::SSLopts\fR). .SH "SEE ALSO" .IX Header "SEE ALSO" IO::Socket::SSL, \s-1LWP,\s0 Net::HTTPS, LWP::Protocol::https .SH "COPYRIGHT" .IX Header "COPYRIGHT" This module is copyright (c) 2008..2015, Steffen Ullrich. All Rights Reserved. This module is free software. It may be used, redistributed and/or modified under the same terms as Perl itself.