view release on metacpan or search on metacpan
lib/IO/Async/SSL.pm view on Meta::CPAN
use Carp;
use POSIX qw( EAGAIN EWOULDBLOCK );
use IO::Socket::SSL 2.003 qw( $SSL_ERROR SSL_WANT_READ SSL_WANT_WRITE ); # default_ca
# require >= 2.003 for bugfixes - see RT#125220
use Future 0.33; # ->catch_with_f
use IO::Async::Handle 0.29;
use IO::Async::Loop 0.61; # new Listen API
lib/IO/Async/SSL.pm view on Meta::CPAN
);
=head1 DESCRIPTION
This module extends existing L<IO::Async> classes with extra methods to allow
the use of SSL or TLS-based connections using L<IO::Socket::SSL>. It does not
directly provide any methods or functions of its own.
Primarily, it provides C<SSL_connect> and C<SSL_listen>, which yield
C<IO::Socket::SSL>-upgraded socket handles or L<IO::Async::Stream>
instances, and two forms of C<SSL_upgrade> to upgrade an existing TCP
connection to use SSL.
As an additional convenience, if the C<SSL_verify_mode> and C<SSL_ca_*>
options are omitted, the module will attempt to provide them by querying the
result of L<IO::Socket::SSL>'s C<default_ca> function. Otherwise, the module
will print a warning and set C<SSL_VERIFY_NONE> instead.
=cut
my %SSL_ca_args = IO::Socket::SSL::default_ca();
sub _SSL_args
{
my %args = @_;
# SSL clients (i.e. non-server) require a verify mode
if( !$args{SSL_server} and !defined $args{SSL_verify_mode} and
!defined $args{SSL_ca_file} and !defined $args{SSL_ca_path} ) {
unless( %SSL_ca_args ) {
carp "Unable to set SSL_VERIFY_PEER because IO::Socket::SSL::default_ca() gives nothing";
$SSL_ca_args{SSL_verify_mode} = IO::Socket::SSL::SSL_VERIFY_NONE();
}
%args = ( %SSL_ca_args, %args );
}
lib/IO/Async/SSL.pm view on Meta::CPAN
If true, indicates this is the server side of the connection.
=back
In addition, any parameter whose name starts C<SSL_> will be passed to the
C<IO::Socket::SSL> constructor.
The following legacy callback arguments are also supported, in case the
returned future is not used:
=over 8
=item on_upgraded => CODE
A continuation that is invoked when the socket has been successfully upgraded
to SSL. It will be passed an instance of an C<IO::Socket::SSL>, which will
have appropriate SSL-compatible reader/writer functions attached.
$on_upgraded->( $sslsocket )
=item on_error => CODE
A continuation that is invoked if C<IO::Socket::SSL> detects an error while
negotiating the upgrade.
$on_error->( $! )
=back
lib/IO/Async/SSL.pm view on Meta::CPAN
}
my %ssl_params = map { $_ => delete $params{$_} } grep m/^SSL_/, keys %params;
eval {
$socket = IO::Socket::SSL->start_SSL( $socket, _SSL_args
SSL_startHandshake => 0,
# Required to make IO::Socket::SSL not ->close before we have a chance to remove it from the loop
SSL_error_trap => sub { },
%ssl_params,
) or die IO::Socket::SSL->errstr;
} or do {
chomp( my $e = $@ );
return $f->fail( $e, "ssl" );
};
lib/IO/Async/SSL.pm view on Meta::CPAN
$f->done( $stream || $socket );
return;
}
if( $! != EAGAIN and $! != EWOULDBLOCK ) {
my $errstr = IO::Socket::SSL::errstr();
$loop->remove( $self );
$f->fail( $errstr, "ssl" );
return;
}
lib/IO/Async/SSL.pm view on Meta::CPAN
This method performs a non-blocking connection to a given address or set of
addresses, upgrades the socket to SSL, then yields a C<IO::Async::Stream>
object when the SSL handshake is complete.
It takes all the same arguments as C<IO::Async::Loop::connect()>. Any argument
whose name starts C<SSL_> will be passed on to the L<IO::Socket::SSL>
constructor rather than the Loop's C<connect> method. It is not required to
pass the C<socktype> option, as SSL implies this will be C<stream>.
This method can also upgrade an existing C<IO::Async::Stream> or subclass
instance given as the C<handle> argument, by setting the C<reader> and
lib/IO/Async/SSL.pm view on Meta::CPAN
=over 8
=item on_ssl_error => CODE
A continuation that is invoked if C<IO::Socket::SSL> detects an SSL-based
error once the actual stream socket is connected.
=back
If the C<on_connected> continuation is used, the socket handle it yields will
be a C<IO::Socket::SSL>, which must be wrapped in C<IO::Async::SSLStream> to
be used by C<IO::Async>. The C<on_stream> continuation will already yield such
an instance.
=cut
lib/IO/Async/SSL.pm view on Meta::CPAN
invoke the callback each time a new connection is accepted on the socket and
the SSL handshake has been completed. This can be either the C<on_accept> or
C<on_stream> continuation; C<on_socket> is not supported.
It takes all the same arguments as C<IO::Async::Loop::listen()>. Any argument
whose name starts C<SSL_> will be passed on to the L<IO::Socket::SSL>
constructor rather than the Loop's C<listen> method. It is not required to
pass the C<socktype> option, as SSL implies this will be C<stream>.
In addition, the following arguments are rquired:
=over 8
=item on_ssl_error => CODE
A continuation that is invoked if C<IO::Socket::SSL> detects an SSL-based
error once the actual stream socket is connected.
=back
The underlying L<IO::Socket::SSL> socket will also require the server key and
certificate for a server-mode socket. See its documentation for more details.
If the C<on_accept> continuation is used, the socket handle it yields will be
a C<IO::Socket::SSL>, which must be wrapped in C<IO::Async::SSLStream> to be
used by C<IO::Async>. The C<on_stream> continuation will already yield such an
instance.
=cut
view all matches for this distribution
view release on metacpan or search on metacpan
lib/IO/EPP.pm view on Meta::CPAN
=head1 DESCRIPTION
IO::EPP is a very light and fast interface of the access to EPP API from the client's side with minimum dependences.
It is independent of libxml and other heavy libraries.
It works over L<IO::Socket::SSL> without additional modules and demands only L<Digest::MD5> for generation of unique ID and L<Time::HiRes> for the purpose of logging.
L<LWP> is necessary for two registries and one reseller (TCI/RIPN, Taeping и HosterKZ), because EPP of these providers works over HTTPS.
In test mode IO::EPP can emulate the job of some registries.
Now the emulation of Verisign Core and CentralNic servers is supported at the level of 99% of answers.
The test environment for L<IO::EPP::Base> uses the emulation of CentralNic without extensions.
lib/IO/EPP.pm view on Meta::CPAN
An example of registration of a new nameserver
use IO::EPP::CNic;
use Data::Dumper;
# Parameters for IO::Socket::SSL
my %sock_params = (
PeerHost => 'epp.centralnic.com',
PeerPort => 700,
SSL_key_file => 'ssl_key_file.pem',
SSL_cert_file => 'ssl_cert_file.pem',
lib/IO/EPP.pm view on Meta::CPAN
unless ( $params->{conn} ) {
# need create new connection
state $config = Config::get('Providers.Verisign');
# Parameters for IO::Socket::SSL
my %sock_params = (
PeerPort => $config->{port},
Proto => 'tcp',
SSL_key_file => $config->{ssl_key_file},
SSL_cert_file => $config->{ssl_cert_file},
# SSL_verify_mode => SSL_VERIFY_NONE, -- for this parameter need use IO::Socket::SSL
Timeout => 30,
debug => 1,
);
if ( $params->{tld} =~ /^(com|net|edu)$/ ) {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/IO/Lambda.pm view on Meta::CPAN
L<IO::Lambda::Socket> - lambda versions of C<connect>, C<accept> etc.
=item *
L<IO::Lambda::HTTP> - implementation of HTTP and HTTPS protocols. HTTPS
requires L<IO::Socket::SSL>, NTLM/Negotiate authentication requires
L<Authen::NTLM> modules (not marked as dependencies).
=item *
L<IO::Lambda::DNS> - asynchronous domain name resolver.
view all matches for this distribution
view release on metacpan or search on metacpan
1.10 Mon Sep 15 2008
- Update Copyright and License.
- Buttwag around minor Windows deficiencies.
1.09 Sat Mar 03 2007
- Detect readability for special IO::Socket::SSL
handles more accurately.
- Avoid "freed value in iteration" crashing.
1.08 Fri Nov 11 2003
- Solaris/FreeBSD compatibility fixes.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/IO/Select/SSL.pm view on Meta::CPAN
1;
__END__
=head1 NAME
IO::Select::SSL - IO::Socket::SSL compatible IO::Select
=head1 SYNOPSIS
use IO::Select::SSL;
my $sel = new IO::Select::SSL;
=head1 DESCRIPTION
This module is intended to be a drop-in replacement for IO::Select.
However, the can_read method actually handles the very special IO::Socket::SSL
handles correctly by returning those handles that still have at least some
decrypted characters in the buffer.
Without this module, can_read will choke forever (or until timeout)
waiting for the socket to be ready to read even when there is still
something just sitting in the buffer ready to be immediately read.
lib/IO/Select/SSL.pm view on Meta::CPAN
Rob Brown E<lt>bbb@cpan.orgE<gt>
=head1 SEE ALSO
L<IO::Select>.
L<IO::Socket::SSL>.
=head1 COPYRIGHT AND LICENSE
Copyright (C) 2006-2025 by Rob Brown <bbb@cpan.org>
view all matches for this distribution
view release on metacpan or search on metacpan
lib/IO/Socket/CLI.pm view on Meta::CPAN
package IO::Socket::CLI;
$IO::Socket::CLI::VERSION = '0.041';
use 5.006;
use strict;
use warnings;
use IO::Socket::SSL;
use IO::Socket::INET6;
use Carp;
# defaults
my $DEBUG = 0; # boolean?
lib/IO/Socket/CLI.pm view on Meta::CPAN
$self->{_SOCKET} = IO::Socket::INET6->new(PeerAddr => $self->{_HOST},
PeerPort => $self->{_PORT},
Blocking => 0) ||
die "Can't bind : $@\n";
($self->{_SSL}) and IO::Socket::SSL->start_SSL($self->{_SOCKET});
$self->{_OPEN} = ($self->{_SOCKET}->connected()) ? 1 : 0;
$self->{_COMMAND} = '';
$self->{_SERVER_RESPONSE} = [];
bless ($self, $class);
lib/IO/Socket/CLI.pm view on Meta::CPAN
__END__
=head1 NAME
IO::Socket::CLI - CLI for IO::Socket::INET6 and IO::Socket::SSL
=head1 VERSION
version 0.041
lib/IO/Socket/CLI.pm view on Meta::CPAN
our @ISA = ("IO::Socket::CLI");
=head1 DESCRIPTION
C<IO::Socket::CLI> provides a command-line interface to L<IO::Socket::INET6> and
L<IO::Socket::SSL>.
=for comment
=head1 EXPORT
None by default.
lib/IO/Socket/CLI.pm view on Meta::CPAN
L<IO::Socket::INET6>
L<IO::Socket::INET>
L<IO::Socket::SSL>
L<IO::Socket>
view all matches for this distribution
view release on metacpan or search on metacpan
lib/IO/Socket/Forwarder.pm view on Meta::CPAN
$out =~ s/([^ -~])/sprintf("\\x%02x", ord $1)/ge;
warn sprintf("%02d:%02d:%02d.%03d: %s\n",
@date[2, 1, 0], 1000 * ($time - int $time), $out);
}
# lazy accessors to IO::Socket::SSL
# we use it but don't depend on it!
sub _ssl_error { $IO::Socket::SSL::SSL_ERROR }
sub _ssl_want_read { IO::Socket::SSL::SSL_WANT_READ() }
sub _ssl_want_write { IO::Socket::SSL::SSL_WANT_WRITE() }
sub _min { $_[0] < $_[1] ? $_[0] : $_[1] }
sub forward_sockets {
my ($s1, $s2, %opts) = @_;
lib/IO/Socket/Forwarder.pm view on Meta::CPAN
my $fn1 = fileno $s1;
defined $fn1 or croak "socket 1 is not a valid file handle";
my $fn2 = fileno $s2;
defined $fn1 or croak "socket 2 is not a valid file handle";
my $ssl1 = $s1->isa('IO::Socket::SSL');
my $ssl2 = $s2->isa('IO::Socket::SSL');
$debug and _debug "s1 fn=$fn1, ssl=$ssl1";
$debug and _debug "s2 fn=$fn2, ssl=$ssl2";
my $b1to2 = delete $opts{buffer_1to2} // '';
lib/IO/Socket/Forwarder.pm view on Meta::CPAN
=head1 DESCRIPTION
This module allows to forward data between two sockets bidirectionally.
IO::Socket::SSL sockets are also supported.
=head2 FUNCTIONS
=over 4
lib/IO/Socket/Forwarder.pm view on Meta::CPAN
Reads and writes data from both sockets simultaneously forwarding it.
On return both sockets will be closed.
This function automatically detects if any of the sockets is of type
L<IO::Socket::SSL> and doesn't require any extra configuration to
handle them.
The following options are accepted:
=over 4
lib/IO/Socket/Forwarder.pm view on Meta::CPAN
=back
=head1 SEE ALSO
L<IO::Socket>, L<IO::Socket::SSL>.
The samples directory contains a couple of scripts showing how to use
this module.
=head1 BUGS AND SUPPORT
view all matches for this distribution
view release on metacpan or search on metacpan
lib/IO/Socket/IP.pm view on Meta::CPAN
return 0;
}
# If connect failed but we have no system error there must be an error
# at the application layer, like a bad certificate with
# IO::Socket::SSL.
# In this case don't continue IP based multi-homing because the problem
# cannot be solved at the IP layer.
return 0 if ! $!;
${*$self}{io_socket_ip_errors}[0] = $!;
view all matches for this distribution
view release on metacpan or search on metacpan
example/async_https_server.pl view on Meta::CPAN
# request, send back as text/plain
##########################################################
use strict;
use IO::Socket;
use IO::Socket::SSL;
use Event::Lib;
use Errno ':POSIX';
#$Net::SSLeay::trace=3;
example/async_https_server.pl view on Meta::CPAN
sub _s_accept {
my $fds = shift->fh;
my $fdc = $fds->accept || return;
DEBUG( "new client" );
$fdc = IO::Socket::SSL->start_SSL( $fdc,
SSL_startHandshake => 0,
SSL_server => 1,
) || die $!;
$fdc->blocking(0);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/IO/Socket/SecureSocks.pm view on Meta::CPAN
use vars qw(@ISA $VERSION);
require Exporter;
require IO::Socket::Socks;
require IO::Socket::SSL;
@IO::Socket::Socks::ISA = qw(Exporter IO::Socket::SSL);
@ISA = qw(Exporter IO::Socket::Socks);
$VERSION = '0.2';
1;
lib/IO/Socket/SecureSocks.pm view on Meta::CPAN
IO::Socket::SecureSocks connects to a SOCKS v5 proxy over a secure line (SSL), tells it to open a connection to a remote host/port
when the object is created. The object you receive can be used directly as a socket for sending and receiving data from the remote host.
=head1 SEE ALSO
L<IO::Socket::Socks|IO::Socket::Socks>, L<IO::Socket::SSL|IO::Socket::SSL>
=head1 AUTHOR
Sascha Kiefer, C<esskar@cpan.org>
view all matches for this distribution
view release on metacpan or search on metacpan
- alot of tests added
- suppress warnings about prototype mismatch
- override IO::Socket::connect instead of IO::Socket::INET::connect if package inherits from IO::Socket,
makes available to wrap IO::Socket::INET package
- call package version of the connect if it has own, makes available to wrap packages like
IO::Socket::SSL
0.03 Mon Apr 18 23:32:42 2011
- added support for packages (even if package name != module name)
0.02 Mon Feb 15 18:22:17 2011
view all matches for this distribution
view release on metacpan or search on metacpan
lib/IOMux/HTTP/Client.pod view on Meta::CPAN
is a IOMux::Handler
=head1 SYNOPSIS
my $socket = IO::Socket::INET->new(@sock_params);
my $socket = IO::Socket::SSL->new(@sock_params);
my $client = IOMux::HTTP::Client->new(socket => $socket);
$mux->add($client);
# or in one go:
my $client = $mux->add(IOMux::HTTP::Client->new(@sock_params));
view all matches for this distribution
view release on metacpan or search on metacpan
examples/echo-daemon.pl view on Meta::CPAN
use IOMux::Service::TCP;
use Getopt::Long qw/GetOptions :config no_ignore_case bundling/;
use File::Basename qw/basename/;
#use IO::Socket::SSL; # when SSL is used anywhere
#
## get command-line options
#
view all matches for this distribution
view release on metacpan or search on metacpan
lib/IPCamera/Reolink.pm view on Meta::CPAN
use 5.006;
use strict;
use warnings;
use REST::Client;
use IO::Socket::SSL;
use JSON;
use Data::Dumper;
use Time::HiRes;
use String::Random;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/IPDR/Collection/Cisco.pm view on Meta::CPAN
use warnings;
use strict;
use IO::Select;
use IO::Socket;
use IO::Socket::SSL;
use POSIX;
use Time::HiRes qw( usleep ualarm gettimeofday tv_interval clock_gettime clock_getres );
$SIG{CHLD}="IGNORE";
lib/IPDR/Collection/Cisco.pm view on Meta::CPAN
if ( !$remotespeed )
{ $remotespeed=10; }
my $lsr;
if ( $self->{_GLOBAL}{'RemoteSecure'} )
{
$lsr = IO::Socket::SSL->new
(
PeerAddr => $remoteip,
PeerPort => $remoteport,
SSL_key_file => $self->{_GLOBAL}{'SSLKeyFile'},
ReuseAddr => 1,
lib/IPDR/Collection/Cisco.pm view on Meta::CPAN
else
{
my $lsr;
if ( $self->{_GLOBAL}{'RemoteSecure'} )
{
$lsr = IO::Socket::SSL->new
(
PeerAddr => $self->{_GLOBAL}{'RemoteIP'},
PeerPort => $self->{_GLOBAL}{'RemotePort'},
SSL_key_file => $self->{_GLOBAL}{'SSLKeyFile'},
ReuseAddr => 1,
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Installer/cpanm.pm view on Meta::CPAN
$fatpacked{"File/pushd.pm"} = '#line '.(1+__LINE__).' "'.__FILE__."\"\n".<<'FILE_PUSHD';
use strict;use warnings;package File::pushd;our$VERSION='1.009';our@EXPORT=qw(pushd tempd);our@ISA=qw(Exporter);use Exporter;use Carp;use Cwd qw(getcwd abs_path);use File::Path qw(rmtree);use File::Temp qw();use File::Spec;use overload q{""}=>sub {...
FILE_PUSHD
$fatpacked{"HTTP/Tiny.pm"} = '#line '.(1+__LINE__).' "'.__FILE__."\"\n".<<'HTTP_TINY';
package HTTP::Tiny;use strict;use warnings;our$VERSION='0.056';use Carp ();my@attributes;BEGIN {@attributes=qw(cookie_jar default_headers http_proxy https_proxy keep_alive local_address max_redirect max_size proxy no_proxy timeout SSL_options verif...
sub $sub_name {
my (\$self, \$url, \$args) = \@_;
\@_ == 2 || (\@_ == 3 && ref \$args eq 'HASH')
or Carp::croak(q/Usage: \$http->$sub_name(URL, [HASHREF])/ . "\n");
return \$self->request('$req_method', \$url, \$args || {});
view all matches for this distribution
view release on metacpan or search on metacpan
lib/IxNetwork/IxNetworkSecure.pm view on Meta::CPAN
$libraryFilePath = File::Spec->rel2abs($directory);
$directory = File::Spec->catdir( (File::Spec->rel2abs($directory), 'dependencies') );
$dependenciespath = $directory;
}
use lib $dependenciespath;
use IO::Socket::SSL;
use LWP::UserAgent;
use Protocol::WebSocket::Client;
use JSON::PP;
use URI::Escape;
use constant NL => "\r\n";
lib/IxNetwork/IxNetworkSecure.pm view on Meta::CPAN
if ($self->_parseAsBool($connectArgs->{-allowOnlyOneConnection})) {
$self->_isSessionAvailable($session, 1);
}
if ($self->{_connectionInfo}->{wsVerb} eq 'wss') {
$self->{_websocket} = new IO::Socket::SSL(
PeerHost => $self->{_connectionInfo}->{hostname}.':'.$self->{_connectionInfo}->{port},
PeerPort => $self->{_connectionInfo}->{verb},
SSL_verify_mode => IO::Socket::SSL::SSL_VERIFY_NONE
) or die "IO::Socket::SSL reported: $! (ssl_error=$SSL_ERROR)";
} else {
$self->{_websocket} = new IO::Socket::INET(
PeerAddr => $self->{_connectionInfo}->{hostname}.':'.$self->{_connectionInfo}->{port},
PeerPort => $self->{_connectionInfo}->{verb},
) or die "IO::Socket::INET reported: $!";
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Jabber/Lite.pm view on Meta::CPAN
Defaults to 0. This is used internally to redo the connection.
=item UseTLS
Negotiate a TLS connection if <starttls> is listed as one of the connection
features, and IO::Socket::SSL is available. Defaults to 1, as everyone likes
encryption.
=item MustEncrypt
The connection must be encrypted before considering the connection to be
opened. This defaults to 0. If this is set to 1, and IO::Socket::SSL is not
available, the connection will fail.
=item JustConnect
This simply opens a connection and returns without having sent any packets,
lib/Jabber/Lite.pm view on Meta::CPAN
The version to declare to the remote Jabber server. The default, '1.0',
attempts to steer the conversation along the lines of RFC3920, xmpp-core.
=item SSL*
Any option beginning with 'SSL' will be passed to IO::Socket::SSL as-is,
which may be useful if you are expecting to exchange certificate
information. No values are set up by default.
=item OwnSocket
lib/Jabber/Lite.pm view on Meta::CPAN
# Start SSL.
my $gotssl = $self->_got_IO_Socket_SSL();
if( $gotssl ){
# We have to hand over the socket to the
# IO::Socket::SSL library for conversion.
$gotssl = 0;
my %SSLHash = ();
foreach my $kkey( keys %args ){
next unless( $kkey =~ /^SSL/ );
$SSLHash{"$kkey"} = $args{"$kkey"};
}
$self->debug( "connect: Starting up SSL\n" );
my $newsock = IO::Socket::SSL->start_SSL( $self->socket,
%SSLHash,
);
if( defined( $newsock ) ){
$self->socket( $newsock );
$gotssl = 1;
lib/Jabber/Lite.pm view on Meta::CPAN
my $amconnected = 0;
if( defined( $self->socket->connected ) ){
$amconnected = 1;
}
# IO::Socket::SSL does not have send; I missed this when
# changed from syswrite.
my $usesend = 1;
if( ! defined( $self->{'_checked_send_ability'} ) ){
my $tsock = $self->socket();
lib/Jabber/Lite.pm view on Meta::CPAN
}
my $tref = ref( $self->socket );
if( $tref ){
if( $tref =~ /SSL/ ){
# IO::Socket::SSL says that it has the
# possibility of blocking unless the
# SSL_no_shutdown argument is specified.
# Some servers may not like this behaviour.
$self->socket->close( SSL_no_shutdown => 1 );
}else{
lib/Jabber/Lite.pm view on Meta::CPAN
return( $retval );
}
=head2 _got_IO_Socket_SSL
Helper function to load IO::Socket::SSL into the current namespace.
=cut
sub _got_IO_Socket_SSL {
my $self = shift;
my $retval = 0;
eval {
require IO::Socket::SSL;
$retval++;
};
$self->debug( " returning $retval\n" );
return( $retval );
lib/Jabber/Lite.pm view on Meta::CPAN
on your connection, SASL support or reasonable garbage collection in various
versions of perl, there are soft dependencies on:
=over 4
=item IO::Socket::SSL
Library for handling SSL/TLS encryption.
=item MIME::Base64
view all matches for this distribution
view release on metacpan or search on metacpan
"Config" : "0",
"Data::Cmp" : "0",
"Data::UUID" : "0",
"DateTime" : "0",
"FFI::Platypus" : "0",
"IO::Socket::SSL" : "0",
"JSON" : "0",
"LWP::UserAgent" : "0",
"Moose" : "0",
"Nice::Try" : "0",
"Path::Tiny" : "0",
view all matches for this distribution
view release on metacpan or search on metacpan
DDP: '0'
ExtUtils::MakeMaker: '0'
File::Spec: '0'
FindBin: '0'
IO::Handle: '0'
IO::Socket::SSL: '0'
IPC::Open3: '0'
Pod::Elemental::Transformer::List: '0'
Pod::Weaver::Plugin::Encoding: '0'
Pod::Weaver::Section::SeeAlso: '0'
Test::Compile: '0'
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Kubernetes/REST/HTTPTinyIO.pm view on Meta::CPAN
package Kubernetes::REST::HTTPTinyIO;
use Moo;
use HTTP::Tiny;
use IO::Socket::SSL;
use Kubernetes::REST::HTTPResponse;
use Types::Standard qw/Bool/;
has ssl_verify_server => (is => 'ro', isa => Bool, default => 1);
has ssl_cert_file => (is => 'ro');
view all matches for this distribution
view release on metacpan or search on metacpan
- add a new API for setting webhook endpoint (issue #159)
- add a new API for getting webhook endpoint information (issue #159)
- add a new API for testing webhook endpoint (issue #159)
1.19 2021-01-22 17:01:55 JST
- requires IO::Socket::SSL at least 2.060 for the support of TLS 1.3 (PR #165)
- See also: https://developers.line.biz/ja/news/2020/10/06/update-webhook-client-and-root-certificate/
- Minor documentation updates and warning fixes.
- Update examples of Flex Messages. See eg/push-flex-message-showcases.pl (PR #155)
- Update test case for creating audience data with uploading user id (PR #157)
view all matches for this distribution
view release on metacpan or search on metacpan
lib/LWP/Protocol/connect.pm view on Meta::CPAN
The LWP::Protocol::connect module provides support for using https over
a proxy via the HTTP/CONNECT method.
=head1 SEE ALSO
L<IO::Socket::SSL>, L<LWP::Protocol::https>
=head1 COPYRIGHT
Copyright 2013 Markus Benning <me@w3r3wolf.de>
view all matches for this distribution
view release on metacpan or search on metacpan
SocksChain.pm view on Meta::CPAN
#-----------------------------------------------------------
package LWP::Protocol::https::SocksChain::Socket;
use Net::SC;
use IO::Socket::SSL;
use Net::HTTPS;
use vars qw( @ISA );
@ISA = (
'LWP::Protocol::http::SocketMethods',
'Net::HTTPS'
);
sub IO::Socket::SSL::SSL_HANDLE::READ { ${shift()}->read (@_) }
sub new {
my ( $self, %cfg ) = @_;
my $host = $cfg{ PeerHost };
SocksChain.pm view on Meta::CPAN
my $obj = bless $sc->sh, $self;
$obj->http_configure(\%cfg);
if ( $IO::Socket::SSL::VERSION > 0.97 ) {
$obj->configure_SSL( \%cfg ) && $obj->connect_SSL();
} else {
$obj->configure_SSL( \%cfg ) && $obj->connect_SSL($sc->sh);
}
}
view all matches for this distribution
view release on metacpan or search on metacpan
SocksChain10.pm view on Meta::CPAN
use Net::SC;
use HTTP::Response;
use HTTP::Status;
use IO::Select;
use IO::Socket::SSL;
use LWP::Protocol;
($VERSION='$Revision: 1.7 $')=~s/^\S+\s+(\S+)\s+.*/$1/;
local $^W = 1;
@ISA = qw(
LWP::Protocol
IO::Socket::SSL
);
sub IO::Socket::SSL::SSL_HANDLE::READ { ${shift()}->read (@_) }
my $CRLF = "\015\012";
sub _new_socket
{
SocksChain10.pm view on Meta::CPAN
die socks_error($rc) . "\n";
}
my $obj = bless $sc->sh;
if ( $IO::Socket::SSL::VERSION > 0.97 ) {
$obj->configure_SSL( \%cfg ) && $obj->connect_SSL();
} else {
$obj->configure_SSL( \%cfg ) && $obj->connect_SSL($sc->sh);
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/LWP/Protocol/https.pm view on Meta::CPAN
$ssl_opts{SSL_verifycn_scheme} = 'none';
}
}
if ($ssl_opts{SSL_verify_mode}) {
unless (exists $ssl_opts{SSL_ca_file} || exists $ssl_opts{SSL_ca_path}) {
if ($Net::HTTPS::SSL_SOCKET_CLASS eq 'IO::Socket::SSL'
&& defined &IO::Socket::SSL::default_ca
&& IO::Socket::SSL::default_ca() ) {
# IO::Socket::SSL has a usable default CA
} elsif ( my $cafile = eval {
require Mozilla::CA;
Mozilla::CA::SSL_ca_file()
}) {
# use Mozilla::CA
lib/LWP/Protocol/https.pm view on Meta::CPAN
$res->header("Client-SSL-Socket-Class" => $Net::HTTPS::SSL_SOCKET_CLASS);
}
# upgrade plain socket to SSL, used for CONNECT tunnel when proxying https
# will only work if the underlying socket class of Net::HTTPS is
# IO::Socket::SSL, but code will only be called in this case
if ( $Net::HTTPS::SSL_SOCKET_CLASS->can('start_SSL')) {
*_upgrade_sock = sub {
my ($self,$sock,$url) = @_;
# SNI should be passed there only if it is not an IP address.
# Details: https://github.com/libwww-perl/libwww-perl/issues/449#issuecomment-1896175509
lib/LWP/Protocol/https.pm view on Meta::CPAN
dependency on LWP::Protocol::https and will no longer need to know what
underlying modules to install.
=head1 SEE ALSO
L<IO::Socket::SSL>, L<Crypt::SSLeay>, L<Mozilla::CA>
=head1 COPYRIGHT & LICENSE
Copyright (c) 1997-2011 Gisle Aas.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/LWP/Protocol/socks.pm view on Meta::CPAN
##############################
package LWP::Protocol::https::socks::Socket;
require LWP::Protocol::https;
require IO::Socket::Socks;
use IO::Socket::SSL;
require Net::HTTPS;
our @ISA = qw(IO::Socket::SSL LWP::Protocol::https::Socket);
sub new {
my $class = shift;
my %args = @_;
my $connectAddr = $args{ConnectAddr} = delete $args{PeerAddr};
view all matches for this distribution
view release on metacpan or search on metacpan
t/11_https.t view on Meta::CPAN
# server
plan skip_all => "disable SSL" unless Test::Fake::HTTPD::enable_ssl();
# client
for my $module (qw/ LWP::Protocol::https IO::Socket::SSL /) {
plan skip_all => "$module required" unless eval "use $module; 1";
}
sub _uri {
my ($uri, $httpd) = @_;
view all matches for this distribution
view release on metacpan or search on metacpan
t/10-simple.t view on Meta::CPAN
# SSL should still work, assuming it would work before.
SKIP:
{
my $has_ssleay = eval { require Crypt::SSLeay; 1; };
my $has_iossl = eval { require IO::Socket::SSL; 1; };
skip "Crypt::SSLeay or IO::Socket::SSL not installed", 1 unless $has_ssleay || $has_iossl;
$res = $ua->get("https://pause.perl.org/pause/query");
ok( $res->is_success && $res->content =~ /Login|PAUSE|Edit/);
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/LabKey/Query.pm view on Meta::CPAN
#
# Credit to @chrisrth on stackoverflow (http://stackoverflow.com/a/20305596)
# See https://www.labkey.org/issues/home/Developer/issues/details.view?issueId=22146
# for more information.
#
use IO::Socket::SSL;
my $context = new IO::Socket::SSL::SSL_Context(
SSL_version => 'tlsv1'
);
IO::Socket::SSL::set_default_context($context);
use LWP::UserAgent;
use HTTP::Cookies;
use HTTP::Request::Common;
use URI;
view all matches for this distribution