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
view release on metacpan or search on metacpan
bin/ledgersmb-installer view on Meta::CPAN
say $failed_validate_msg;
die "Aborting installation...\n";
}
unless (eval "require IO::Socket::SSL") {
say <<~'EOF';
The installer depends on IO::Socket::SSL, which isn't loadable. Please
install it; the library name on the various distributions is:
- libio-socket-ssl-perl (Debian, Ubuntu, Mint and derivatives)
- perl-IO-Socket-SSL (Fedora, RedHat, and derivatives)
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Lemonldap/NG/Common/Conf/Backends/LDAP.pm view on Meta::CPAN
$Lemonldap::NG::Common::Conf::msg .= "$@\n";
return;
}
elsif ( $Net::LDAP::VERSION < '0.64' ) {
# CentOS7 has a bug in which IO::Socket::SSL will return a broken
# socket when certificate validation fails. Net::LDAP does not catch
# it, and the process ends up crashing.
# As a precaution, make sure the underlying socket is doing fine:
if ( $ldap->socket->isa('IO::Socket::SSL')
and $ldap->socket->errstr < 0 )
{
$Lemonldap::NG::Common::Conf::msg .=
"SSL connection error: " . $ldap->socket->errstr;
return;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Lemonldap/NG/Manager/Conf.pm view on Meta::CPAN
my $keys = Lemonldap::NG::Common::Util::Crypto::genEcKey('secp256r1');
return $self->sendJSONresponse( $req, $keys );
}
# This function does the dirty X509 work,
# mostly copied from IO::Socket::SSL::Utils
# and adapter to work on old platforms (CentOS7)
sub _generateX509 {
my ( $self, $password ) = @_;
my $conf = $self->confAcc->getConf();
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Lemonldap/NG/Portal/Lib/Net/LDAP.pm view on Meta::CPAN
$portal->logger->error( "LDAP initialization error: " . $@ );
return 0;
}
elsif ( $Net::LDAP::VERSION < '0.64' ) {
# CentOS7 has a bug in which IO::Socket::SSL will return a broken
# socket when certificate validation fails. Net::LDAP does not catch
# it, and the process ends up crashing.
# As a precaution, make sure the underlying socket is doing fine:
if ( $self->socket->isa('IO::Socket::SSL')
and $self->socket->errstr < 0 )
{
$portal->logger->error(
"LDAP SSL connection failed: " . $self->socket->errstr );
return 0;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/LinkEmbedder.pm view on Meta::CPAN
use Mojo::JSON;
use Mojo::Loader 'load_class';
use Mojo::Promise;
use Mojo::UserAgent;
use constant TLS => eval { require IO::Socket::SSL; IO::Socket::SSL->VERSION('2.009'); 1 };
use constant DEBUG => $ENV{LINK_EMBEDDER_DEBUG} || 0;
our $VERSION = '1.20';
view all matches for this distribution
view release on metacpan or search on metacpan
}
},
"runtime" : {
"requires" : {
"Capture::Tiny" : "== 0.40",
"IO::Socket::SSL" : "== 2.024",
"JSON::XS" : "== 3.01",
"Parallel::ForkManager" : "== 1.17",
"Path::Tiny" : "== 0.094",
"Time::Piece::MySQL" : "== 0.06",
"WebService::Mackerel" : "== 0.03",
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Log/Log4perl/Appender/Lumberjack.pm view on Meta::CPAN
Use a non-default SSL protocol version string.
Otherwise the system wide default will be used.
Check L<IO::Socket::SSL> for string format.
=head2 ssl_hostname (default: emtpy)
Use a hostname other than the hostname give in 'host' for
SSL certificate verification.
view all matches for this distribution