man-pages/man3/LWP::Protocol::https.3pm.html
2021-03-31 01:06:50 +01:00

99 lines
2.8 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML><HEAD><TITLE>Man page of LWP::Protocol::https</TITLE>
</HEAD><BODY>
<H1>LWP::Protocol::https</H1>
Section: User Contributed Perl Documentation (3pm)<BR>Updated: 2019-05-20<BR><A HREF="#index">Index</A>
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
<A NAME="lbAB">&nbsp;</A>
<H2>NAME</H2>
LWP::Protocol::https - Provide https support for LWP::UserAgent
<A NAME="lbAC">&nbsp;</A>
<H2>SYNOPSIS</H2>
<PRE>
use LWP::UserAgent;
$ua = LWP::UserAgent-&gt;new(ssl_opts =&gt; { verify_hostname =&gt; 1 });
$res = $ua-&gt;get(&quot;<A HREF="https://www.example.com">https://www.example.com</A>&quot;);
# specify a CA path
$ua = LWP::UserAgent-&gt;new(
ssl_opts =&gt; {
SSL_ca_path =&gt; '/etc/ssl/certs',
verify_hostname =&gt; 1,
}
);
</PRE>
<A NAME="lbAD">&nbsp;</A>
<H2>DESCRIPTION</H2>
The LWP::Protocol::https module provides support for using https schemed
URLs with <FONT SIZE="-1">LWP.</FONT> This module is a plug-in to the <FONT SIZE="-1">LWP</FONT> protocol handling, so
you don't use it directly. Once the module is installed <FONT SIZE="-1">LWP</FONT> is able
to access sites using <FONT SIZE="-1">HTTP</FONT> over <FONT SIZE="-1">SSL/TLS.</FONT>
<P>
If hostname verification is requested by LWP::UserAgent's <TT>&quot;ssl_opts&quot;</TT>, and
neither <TT>&quot;SSL_ca_file&quot;</TT> nor <TT>&quot;SSL_ca_path&quot;</TT> is set, then <TT>&quot;SSL_ca_file&quot;</TT> is
implied to be the one provided by Mozilla::CA. If the Mozilla::CA module
isn't available <FONT SIZE="-1">SSL</FONT> requests will fail. Either install this module, set up an
alternative <TT>&quot;SSL_ca_file&quot;</TT> or disable hostname verification.
<P>
This module used to be bundled with the libwww-perl, but it was unbundled in
v6.02 in order to be able to declare its dependencies properly for the <FONT SIZE="-1">CPAN</FONT>
tool-chain. Applications that need https support can just declare their
dependency on LWP::Protocol::https and will no longer need to know what
underlying modules to install.
<A NAME="lbAE">&nbsp;</A>
<H2>SEE ALSO</H2>
IO::Socket::SSL, Crypt::SSLeay, Mozilla::CA
<A NAME="lbAF">&nbsp;</A>
<H2>COPYRIGHT</H2>
Copyright 1997-2011 Gisle Aas.
<P>
This library is free software; you can redistribute it and/or
modify it under the same terms as Perl itself.
<P>
<HR>
<A NAME="index">&nbsp;</A><H2>Index</H2>
<DL>
<DT id="1"><A HREF="#lbAB">NAME</A><DD>
<DT id="2"><A HREF="#lbAC">SYNOPSIS</A><DD>
<DT id="3"><A HREF="#lbAD">DESCRIPTION</A><DD>
<DT id="4"><A HREF="#lbAE">SEE ALSO</A><DD>
<DT id="5"><A HREF="#lbAF">COPYRIGHT</A><DD>
</DL>
<HR>
This document was created by
<A HREF="/cgi-bin/man/man2html">man2html</A>,
using the manual pages.<BR>
Time: 00:05:47 GMT, March 31, 2021
</BODY>
</HTML>