Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

net::sslglue::lwp(3pm) [debian man page]

Net::SSLGlue::LWP(3pm)					User Contributed Perl Documentation				    Net::SSLGlue::LWP(3pm)

NAME
Net::SSLGlue::LWP - proper certificate checking for https in LWP SYNOPSIS
use Net::SSLGlue::LWP SSL_ca_path => ...; use LWP::Simple; get( 'https://www....' ); { 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 => 'anywhere', check_cn => 'always', }; } 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 "http" SSL_verify_scheme from IO::Socket::SSL. Because LWP 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 %Net::SSLGlue::LWP::SSLopts variable. All of the "SSL_*" parameter from IO::Socket::SSL can be used; the following parameters are especially useful: 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 "etc/ssl/certs" on UNIX systems. 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. 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. SEE ALSO
IO::Socket::SSL, LWP, Net::HTTPS, LWP::Protocol::https COPYRIGHT
This module is copyright (c) 2008, 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. perl v5.14.2 2011-08-29 Net::SSLGlue::LWP(3pm)

Check Out this Related Man Page

LWP::DebugFile(3)					User Contributed Perl Documentation					 LWP::DebugFile(3)

NAME
LWP::DebugFile - routines for tracing/debugging LWP SYNOPSIS
If you want to see just what LWP is doing when your program calls it, add this to the beginning of your program's source: use LWP::DebugFile; For even more verbose debug output, do this instead: use LWP::DebugFile ('+'); DESCRIPTION
This module is like LWP::Debug in that it allows you to see what your calls to LWP are doing behind the scenes. But it is unlike LWP::Debug in that it sends the output to a file, instead of to STDERR (as LWP::Debug does). OPTIONS
The options you can use in "use LWP::DebugFile (options)" are the same as the non-exporting options available from "use LWP::Debug (options)". That is, you can do things like this: use LWP::DebugFile qw(+); use LWP::Debug qw(+ -conns); use LWP::Debug qw(trace); The meanings of these are explained in the documentation for LWP::Debug. The only differences are that by default, LWP::DebugFile has "cons" debugging on, ad that (as mentioned earlier), only "non-exporting" options are available. That is, you can't do this: use LWP::DebugFile qw(trace); # wrong You might expect that to export LWP::Debug's "trace()" function, but it doesn't work -- it's a compile-time error. OUTPUT FILE NAMING
If you don't do anything, the output file (where all the LWP debug/trace output goes) will be in the current directory, and will be named like lwp_3db7aede_b93.log, where 3db7aede is $^T expressed in hex, and "b93" is $$ expressed in hex. Presumably this is a unique-for-all- time filename! If you don't want the files to go in the current directory, you can set $LWP::DebugFile::outpath before you load the LWP::DebugFile module: BEGIN { $LWP::DebugFile::outpath = '/tmp/crunk/' } use LWP::DebugFile; Note that you must end the value with a path separator ("/" in this case -- under MacPerl it would be ":"). With that set, you will have output files named like /tmp/crunk/lwp_3db7aede_b93.log. If you want the LWP::DebugFile output to go a specific filespec (instead of just a uniquely named file, in whatever directory), instead set the variable $LWP::DebugFile::outname, like so: BEGIN { $LWP::DebugFile::outname = '/home/mojojojo/lwp.log' } use LWP::DebugFile; In that case, $LWP::DebugFile::outpath isn't consulted at all, and output is always written to the file /home/mojojojo/lwp.log. Note that the value of $LWP::DebugFile::outname doesn't need to be an absolute filespec. You can do this: BEGIN { $LWP::DebugFile::outname = 'lwp.log' } use LWP::DebugFile; In that case, output goes to a file named lwp.log in the current directory -- specifically, whatever directory is current when LWP::DebugFile is first loaded. $LWP::DebugFile::outpath is still not consulted -- its value is used only if $LWP::DebugFile::outname isn't set. ENVIRONMENT
If you set the environment variables "LWPDEBUGPATH" or "LWPDEBUGFILE", their values will be used in initializing the values of $LWP::DebugFile::outpath and $LWP::DebugFile::outname. That is, if you have "LWPDEBUGFILE" set to /home/mojojojo/lwp.log, then you can just start out your program with: use LWP::DebugFile; and it will act as if you had started it like this: BEGIN { $LWP::DebugFile::outname = '/home/mojojojo/lwp.log' } use LWP::DebugFile; IMPLEMENTATION NOTES
This module works by subclassing "LWP::Debug", (notably inheriting its "import"). It also redefines &LWP::Debug::conns and &LWP::Debug::_log to make for output that is a little more verbose, and friendlier for when you're looking at it later in a log file. SEE ALSO
LWP::Debug COPYRIGHT AND DISCLAIMERS
Copyright (c) 2002 Sean M. Burke. This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. This program is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose. AUTHOR
Sean M. Burke "sburke@cpan.org" perl v5.10.0 2008-04-07 LWP::DebugFile(3)
Man Page