view release on metacpan or search on metacpan
lib/Apache/Session/Browseable/Store/LDAP.pm view on Meta::CPAN
) or die( 'Unable to connect to ' . join( ' ', @servers ) . ": " . $@ );
# Check SSL error for old Net::LDAP versions
if ( $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 )
{
die( "SSL connection error: " . $ldap->socket->errstr );
}
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache/Session/Store/LDAP.pm view on Meta::CPAN
) or die( 'Unable to connect to ' . join( ' ', @servers ) . ': ' . $@ );
# Check SSL error for old Net::LDAP versions
if ( $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 )
{
die( "SSL connection error: " . $ldap->socket->errstr );
}
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache/Test.pm view on Meta::CPAN
}
}
sub need_ssl {
my $vars = vars();
need_module([$vars->{ssl_module_name}, 'IO::Socket::SSL']);
}
sub need_lwp {
require Apache::TestRequest;
if (Apache::TestRequest::has_lwp()) {
view all matches for this distribution
view release on metacpan or search on metacpan
Wyrd/Services/Auth.pm view on Meta::CPAN
my ($key, $ticket) = $self->generate_ticket;
#Send that pair to the Login Server
$key_url = 'https://' . $req->hostname . $key_url unless ($key_url =~ /^https?:\/\//i);
if ($key_url =~ /^https:\/\//i) {
eval('use IO::Socket::SSL');
die "LWP::UserAgent needs to support SSL to use a login server over https. Install IO::Socket::SSL and make sure it works."
if ($@);
}
my $ua = LWP::UserAgent->new;
$ua->timeout(60);
my $response = $ua->request(POST $key_url,
Wyrd/Services/Auth.pm view on Meta::CPAN
my $status = $response->status_line;
#If the key can't be saved on the login server, send regrets and close
if ($status !~ /200|OK/) {
if ($status =~ /Invalid argument/i) {
$debug && warn ("You may need to Update IO::Socket::SSL");
} else {
$debug && warn ("Login Server status was $status");
}
my $failed_url = $req->dir_config('LSDownURL');
$failed_url = $scheme . '://' . $req->hostname . $port . $failed_url unless ($failed_url =~ /^http/i);
view all matches for this distribution
view release on metacpan or search on metacpan
t/lib/Test/Apache2/API.pm view on Meta::CPAN
Apache::TestRequest::user_agent(reset => 1, keep_alive => 1 );
my $ua = Apache::TestRequest->new;
# To get the fingerprint for the certificate in ./t/server.crt, do:
# echo "sha1\$$(openssl x509 -noout -in ./t/server.crt -fingerprint -sha1|perl -pE 's/^.*Fingerprint=|(\w{2})(?:\:?|$)/$1/g')"
$ua->ssl_opts(
# SSL_verify_mode => IO::Socket::SSL::SSL_VERIFY_NONE,
# SSL_verify_mode => 0x00
# verify_hostname => 0,
SSL_fingerprint => 'sha1$DEE8650E44870896E821AAE4A5A24382174D100E',
# SSL_version => 'SSLv3',
# SSL_verfifycn_name => 'localhost',
view all matches for this distribution
view release on metacpan or search on metacpan
AuthNetLDAP.pm view on Meta::CPAN
=item PerlSetVar UseStartTLS
Optional; can be yes or no. If yes, will fail unless can start a TLS
encrypted connection to the LDAP server before sending passwords over
the network. Note that this requires that the optional module
IO::Socket::SSL is installed; this depends on Net::SSLeay, which
depends on openssl. Of course, the LDAP server must support Start TLS
also.
=back
AuthNetLDAP.pm view on Meta::CPAN
#PerlSetVar BindPWD "password" #optional
PerlSetVar BaseDN "ou=people,o=acme.com"
PerlSetVar LDAPServer ldap.acme.com
PerlSetVar LDAPPort 389
PerlSetVar UIDAttr uid
PerlSetVar UseStartTLS yes # Assuming you installed IO::Socket::SSL, etc.
# Set if you want base or one level scope for search:
PerlSetVar SearchScope one # default is sub
# Set if you want to limit access to a subset of users:
view all matches for this distribution
view release on metacpan or search on metacpan
[Patch]
* Fixing work with perl 5.14
1.0.2 2014-11-15
[Patch]
* Added dependency IO::Socket::SSL
1.0.3 2015-02-28
[Patch]
* Fixing dependencies
* Using lowercase namespace and name in `get_github_favorites`
view all matches for this distribution
view release on metacpan or search on metacpan
'Future::AsyncAwait' => '0',
'Getopt::Long' => '0',
'HTTP::Tinyish' => '0',
'IO::Async' => '0',
'IO::Async::SSL' => '0',
'IO::Socket::SSL' => '0',
'IPC::Run3' => '0',
'Inline' => '0',
'Inline::C' => '0',
'JSON::MaybeXS' => '0',
'List::AllUtils' => '0',
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/CLI/Plugin/Net/SMTP.pm view on Meta::CPAN
}
if( (exists $ENV{APPCLI_SMTP_STARTTLS} && defined $ENV{APPCLI_SMTP_STARTTLS}) ||
(exists $smtp_option->{StartTLS} && defined $smtp_option->{StartTLS}) ||
(exists $self->{starttls} && defined $self->{starttls}) ){
require IO::Socket::SSL;
unshift @Net::SMTP::ISA, "IO::Socket::SSL";
}
$self->smtp(Net::SMTP->new(%{$smtp_option}) or die $!);
}
=head2 smtp
return Net::SMTP object. Environment variable APPCLI_SMTP_STARTTLS, net_smtp to StartTLS, the script runs starttls option, you specify one, IO::Socket::SSL If you have installed on your system, SMTPS can make a connection with.
But even then one way, net_smtp option of the Port is defined as SMTPS to specify the port number
Example1 APPCLI_SMTP_STARTTLS:
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/CamelPKI/SysV/Apache.pm view on Meta::CPAN
my $phpinfo = LWP::Simple::get
("https://localhost:12345/t/php/phpinfo.php");
like($phpinfo, qr/www\.php\.net/);
};
use IO::Socket::SSL;
use LWP::UserAgent;
use App::CamelPKI::Test qw(http_request_prepare http_request_execute);
test "SSL client w/ certificate" => sub {
my $webserver = App::CamelPKI::SysV::Apache->load($directory);
unless ($webserver->test_php_directory) {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/DubiousHTTP/TestServer.pm view on Meta::CPAN
sub run {
shift;
my ($addr,$sslargs,$response) = @_;
if ($sslargs) {
# XXX do we need a specific minimal version?
eval { require IO::Socket::SSL } or
die "need IO::Socket::SSL for SSL support";
$sslargs = eval { IO::Socket::SSL::SSL_Context->new( SSL_server => 1, %$sslargs) }
or die "creating SSL context: $@";
}
my $srv = $IOCLASS->new( LocalAddr => $addr, Listen => 10, ReuseAddr => 1 )
or die "listen failed: $!";
$srv->blocking(0);
lib/App/DubiousHTTP/TestServer.pm view on Meta::CPAN
}
# assume GET|POST if only uppercase word characters
return _install_http($cl,$response) if $buf =~m{^[A-Z]+$};
# initiate TLS handshake
if (!IO::Socket::SSL->start_SSL($cl,
SSL_startHandshake => 0,
SSL_server => 1,
SSL_reuse_ctx => $sslctx
)) {
warn "sslify failed: $IO::Socket::SSL::SSL_ERROR";
delete_client($cl);
return;
}
return _install_https($cl,$response);
});
lib/App/DubiousHTTP/TestServer.pm view on Meta::CPAN
my $cl = shift;
if ($cl->accept_SSL) {
# handshake finally done
return _install_http($cl,$response,'https');
}
if ($IO::Socket::SSL::SSL_ERROR == IO::Socket::SSL::SSL_WANT_READ()) {
$SELECT->mask($cl, 0 => 1, 1 => 0);
} elsif ($IO::Socket::SSL::SSL_ERROR == IO::Socket::SSL::SSL_WANT_WRITE()) {
$SELECT->mask($cl, 0 => 0, 1 => 1);
} else {
warn "sslify failed: $IO::Socket::SSL::SSL_ERROR";
delete_client($cl);
return;
}
};
$SELECT->handler($cl, 0 => $handler, 1 => $handler);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/EC2Cssh.pm view on Meta::CPAN
=cut
use autodie qw/:all/;
use Cwd;
use File::Spec;
use IO::Socket::SSL;
use Net::Amazon::EC2;
use Safe;
use Text::Template;
use IO::Pipe;
lib/App/EC2Cssh.pm view on Meta::CPAN
sub _build_ec2{
my ($self) = @_;
# Hack so we never verify Amazon's host. Whilst still keeping HTTPS
IO::Socket::SSL::set_defaults( SSL_verify_callback => sub{ return 1; } );
my $ec2 = Net::Amazon::EC2->new({ %{ $self->config()->{ec2_config} || die "No ec2_config in config\n" } , ssl => 1 } );
return $ec2;
}
sub main{
view all matches for this distribution
view release on metacpan or search on metacpan
Thanks to cpanm, this is quite easier these days: it can actually do
what's needed with a single command:
# on the machine connected to the Internet or to a minicpan
$ cpanm -L xxx --scandeps --save-dists dists \
Mojolicious Mojolicious::Plugin::Authentication IO::Socket::SSL ...
which places all the modules in subdirectory dists (thanks to option
--save-dists) with an arrangement similar to what you would expect from
a CPAN mirror.
you with a subdirectory that is ready for deployment, with all the bits
in place to push automation as much as possible. So you can do this:
# on the machine connected to the Internet or to a minicpan
$ epan create Mojolicious Mojolicious::Plugin::Authentication \
IO::Socket::SSL ...
$ tar cvzf epan.tar.gz epan
transfer dists.tar.gz to the target machine and...
# on the target machine
view all matches for this distribution
view release on metacpan or search on metacpan
cpanfile.snapshot view on Meta::CPAN
ExtUtils::MakeMaker 0
perl 5.008
IO-Socket-SSL-2.085
pathname: S/SU/SULLR/IO-Socket-SSL-2.085.tar.gz
provides:
IO::Socket::SSL 2.085
IO::Socket::SSL::Intercept 2.056
IO::Socket::SSL::OCSP_Cache 2.085
IO::Socket::SSL::OCSP_Resolver 2.085
IO::Socket::SSL::PublicSuffix undef
IO::Socket::SSL::SSL_Context 2.085
IO::Socket::SSL::SSL_HANDLE 2.085
IO::Socket::SSL::Session_Cache 2.085
IO::Socket::SSL::Trace 2.085
IO::Socket::SSL::Utils 2.015
requirements:
ExtUtils::MakeMaker 0
Mozilla::CA 0
Net::SSLeay 1.46
Scalar::Util 0
cpanfile.snapshot view on Meta::CPAN
provides:
LWP::Protocol::https 6.13
LWP::Protocol::https::Socket 6.13
requirements:
ExtUtils::MakeMaker 0
IO::Socket::SSL 1.970
LWP::Protocol::http 0
LWP::UserAgent 6.06
Net::HTTPS 6
base 0
perl 5.008001
view all matches for this distribution
view release on metacpan or search on metacpan
- fixed disabling testing for Windows platform
0.1.14 2022-07-21 15:25
- added IO::Socket::SSL as requirement
0.1.13 2022-07-21 14:12
- fixed finding module listed on cli between recent and real repositories
- fixed tests - checking is repository cloned and where it is clone
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/HTTP_Proxy_IMP.pm view on Meta::CPAN
use App::HTTP_Proxy_IMP::Relay;
use AnyEvent;
use Getopt::Long qw(:config posix_default bundling);
use App::HTTP_Proxy_IMP::Debug qw(debug $DEBUG $DEBUG_RX);
use Net::Inspect::Debug qw(%TRACE);
use IO::Socket::SSL::Intercept;
use IO::Socket::SSL::Utils;
use Carp 'croak';
use POSIX '_exit';
# try IPv6 using IO::Socket::IP or IO::Socket::INET6
lib/App/HTTP_Proxy_IMP.pm view on Meta::CPAN
$e->{atime} = time();
return ($e->{cert},$e->{key});
};
}
$mitm = IO::Socket::SSL::Intercept->new(
proxy_cert_file => $f,
proxy_key_file => $f,
cache => $cache,
serial => $serial,
);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/MechaCPAN.pm view on Meta::CPAN
sub _https_blacklist
{
require Module::Load::Conditional;
state $can_https
= Module::Load::Conditional::can_load( modules => 'IO::Socket::SSL' );
if ( !$can_https )
{
return qw/lwp httptiny httplite/;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Midgen/Role/Eval.pm view on Meta::CPAN
# PPI::Structure::Block { ... }
# PPI::Token::Whitespace ' '
# PPI::Statement::Include
# PPI::Token::Word 'require'
# PPI::Token::Whitespace ' '
# PPI::Token::Word 'IO::Socket::SSL'
# PPI::Token::Structure ';'
# PPI::Token::Whitespace ' '
# PPI::Statement
# PPI::Token::Word 'IO::Socket::SSL'
# PPI::Token::Operator '->'
# PPI::Token::Word 'VERSION'
# PPI::Structure::List ( ... )
# PPI::Statement::Expression
# PPI::Token::Number::Float '1.44'
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/MtAws/ConfigDefinition.pm view on Meta::CPAN
# to get LWP version, use LWP->VERSION instead of LWP::UserAgent->VERSION
error('LWP::UserAgent 6.x required to use HTTPS') unless LWP->VERSION() ge '6';
require LWP::Protocol::https;
error('LWP::Protocol::https 6.x required to use HTTPS') unless LWP::Protocol::https->VERSION && LWP::Protocol::https->VERSION ge '6';
} else {
error('IO::Socket::SSL or LWP::Protocol::https is not installed');
}
}
return;
}
view all matches for this distribution
view release on metacpan or search on metacpan
cpanfile.snapshot view on Meta::CPAN
Exporter 5.57
ExtUtils::MakeMaker 6.30
IO-Socket-SSL-2.022
pathname: S/SU/SULLR/IO-Socket-SSL-2.022.tar.gz
provides:
IO::Socket::SSL 2.022
IO::Socket::SSL::Intercept 2.014
IO::Socket::SSL::OCSP_Cache 2.022
IO::Socket::SSL::OCSP_Resolver 2.022
IO::Socket::SSL::PublicSuffix undef
IO::Socket::SSL::SSL_Context 2.022
IO::Socket::SSL::SSL_HANDLE 2.022
IO::Socket::SSL::Session_Cache 2.022
IO::Socket::SSL::Utils 2.014
requirements:
ExtUtils::MakeMaker 0
Mozilla::CA 0
Net::SSLeay 1.46
Scalar::Util 0
cpanfile.snapshot view on Meta::CPAN
provides:
LWP::Protocol::https 6.06
LWP::Protocol::https::Socket 6.06
requirements:
ExtUtils::MakeMaker 0
IO::Socket::SSL 1.54
LWP::UserAgent 6.06
Mozilla::CA 20110101
Net::HTTPS 6
perl 5.008001
List-Cycle-1.02
view all matches for this distribution
view release on metacpan or search on metacpan
'Guard' => '1.022',
'HTML::Parser' => '3.70',
'HTTP::Tiny' => '0.029',
'IPC::Run' => '20231003.0',
'IO::Socket::INET6' => '2.72',
'IO::Socket::SSL' => '2.048',
'JSON' => '2.90',
'JSON::PP' => '0',
'JSON::XS' => '3.01',
'List::Util' => '1.49',
'List::MoreUtils' => '0.428',
view all matches for this distribution
view release on metacpan or search on metacpan
Makefile.PL view on Meta::CPAN
'MIME::Lite' => '0',
'MIME::Words' => '0',
'MIME::Base64' => '0',
'Authen::SASL' => '0',
'Net::SSLeay' => '0',
'IO::Socket::SSL' => '0',
},
dist => { COMPRESS => 'gzip -9f', SUFFIX => 'gz', },
clean => { FILES => 'App-OpenMbox-Client-*' },
);
view all matches for this distribution
view release on metacpan or search on metacpan
"Mozilla::CA" : "0"
},
"requires" : {
"App::Cmd" : "0.322",
"HTTP::Tiny" : "0.024",
"IO::Socket::SSL" : "1.56",
"JSON::PP" : "2.27103",
"Net::SSLeay" : "1.49",
"URI" : "1.59",
"perl" : "v5.10.0"
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Phoebe/Oddmuse.pm view on Meta::CPAN
return;
}
my @tokens = @{$server->{wiki_token}};
push(@tokens, $oddmuse_wiki_tokens{$host}) if $oddmuse_wiki_tokens{$host};
my $token = pop(@tokens); # the oddmuse wiki token, preferrably
my $name = ref($stream->handle) eq 'IO::Socket::SSL' && $stream->handle->peer_certificate('cn') || "";
my $ua = Mojo::UserAgent->new;
my $tx = $ua->post(
$oddmuse_wikis{$host}
=> {'X-Forwarded-For' => $stream->handle->peerhost}
=> form => {
view all matches for this distribution
view release on metacpan or search on metacpan
t/cpan/Mojo2/UserAgent.pm view on Meta::CPAN
All connections will be reset automatically if a new process has been forked, this allows multiple processes to share
the same L<Mojo::UserAgent> object safely.
For better scalability (epoll, kqueue) and to provide non-blocking name resolution, SOCKS5 as well as TLS support, the
optional modules L<EV> (4.32+), L<Net::DNS::Native> (0.15+), L<IO::Socket::Socks> (0.64+) and L<IO::Socket::SSL>
(2.009+) will be used automatically if possible. Individual features can also be disabled with the C<MOJO_NO_NNR>,
C<MOJO_NO_SOCKS> and C<MOJO_NO_TLS> environment variables.
See L<Mojolicious::Guides::Cookbook/"USER AGENT"> for more.
t/cpan/Mojo2/UserAgent.pm view on Meta::CPAN
Path to TLS certificate authority file used to verify the peer certificate, defaults to the value of the
C<MOJO_CA_FILE> environment variable.
# Show certificate authorities for debugging
IO::Socket::SSL::set_defaults(SSL_verify_callback => sub { say "Authority: $_[2]" and return $_[0] });
=head2 cert
my $cert = $ua->cert;
$ua = $ua->cert('/etc/tls/client.crt');
t/cpan/Mojo2/UserAgent.pm view on Meta::CPAN
# Ignore all cookies
$ua->cookie_jar->ignore(sub { 1 });
# Ignore cookies for public suffixes
my $ps = IO::Socket::SSL::PublicSuffix->default;
$ua->cookie_jar->ignore(sub ($cookie) {
return undef unless my $domain = $cookie->domain;
return ($ps->public_suffix($domain))[0] eq '';
});
view all matches for this distribution
view release on metacpan or search on metacpan
script/pureproxy.pl view on Meta::CPAN
installation.
It uses L<thrall> pre-threading HTTP server if Perl supports threads or
L<starlight> pre-forking HTTP server otherwise.
It supports SSL and TLS if L<IO::Socket::SSL> is installed and IPv6 if
L<IO::Socket::IP> is installed.
It can be fat-packed and then run with any system with standard Perl
interpreter without installing other packages. See F<examples> directory for
fat-packed version of PureProxy script.
script/pureproxy.pl view on Meta::CPAN
process will be collected every given second. This feature is useful for
doing a "slow restart". (default: none)
=head2 --ssl
Enables SSL support. The L<IO::Socket::SSL> module is required. (default: 0)
=head2 --ssl-ca-file
Specifies the path to the SSL CA certificate file which will be a part of
server's certificate chain. (default: none)
script/pureproxy.pl view on Meta::CPAN
Specifies the path to the SSL key file. (default: none)
=head2 --ssl-verify-mode
Specifies the verification mode for the client certificate.
See L<IO::Socket::SSL/SSL_verify_mode> for details. (default: 0)
=head2 --timeout
Seconds until timeout. (default: 300)
view all matches for this distribution
view release on metacpan or search on metacpan
Makefile.PL view on Meta::CPAN
delete $WriteMakefileArgs{CONFIGURE_REQUIRES}
unless eval { ExtUtils::MakeMaker->VERSION(6.52) };
if ( $^O eq 'MSWin32' ) {
$WriteMakefileArgs{PREREQ_PM}{'IO::Socket::SSL'} = $FallbackPrereqs{'IO::Socket::SSL'} = '2.067';
$WriteMakefileArgs{PREREQ_PM}{'Win32::Process'} = $FallbackPrereqs{'Win32::Process'} = '== 0.17';
$WriteMakefileArgs{PREREQ_PM}{'Win32::ShellQuote'} = $FallbackPrereqs{'Win32::ShellQuote'} = '== 0.003001';
}
if ( $^O eq 'darwin' ) {
$WriteMakefileArgs{PREREQ_PM}{'IO::Socket::SSL'} = $FallbackPrereqs{'IO::Socket::SSL'} = '2.067';
}
WriteMakefile(%WriteMakefileArgs);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Net/ManageSieve/Siesh.pm view on Meta::CPAN
sub starttls {
my ( $self, @args ) = @_;
if ( $self->debug() ) {
eval {
require IO::Socket::SSL;
IO::Socket::SSL->import('debug3');
1;
} or do {
die "Cannot load module IO::Socket::SSL\n";
}
}
return $self->SUPER::starttls(@args);
}
view all matches for this distribution
view release on metacpan or search on metacpan
cpanfile.snapshot view on Meta::CPAN
ExtUtils::MakeMaker 0
File::Basename 0
Getopt::Long 0
HTTP::Tiny 0
HTTP::Tiny::Multipart 0
IO::Socket::SSL 1.56
MIME::Base64 0
Mozilla::CA 0
Net::SSLeay 1.49
Pod::Usage 0
Term::ReadKey 0
cpanfile.snapshot view on Meta::CPAN
HTTP::Tiny 0
MIME::Base64 0
IO-Socket-SSL-2.089
pathname: S/SU/SULLR/IO-Socket-SSL-2.089.tar.gz
provides:
IO::Socket::SSL 2.089
IO::Socket::SSL::Intercept 2.056
IO::Socket::SSL::OCSP_Cache 2.089
IO::Socket::SSL::OCSP_Resolver 2.089
IO::Socket::SSL::PublicSuffix undef
IO::Socket::SSL::SSL_Context 2.089
IO::Socket::SSL::SSL_HANDLE 2.089
IO::Socket::SSL::Session_Cache 2.089
IO::Socket::SSL::Trace 2.089
IO::Socket::SSL::Utils 2.015
requirements:
ExtUtils::MakeMaker 0
Net::SSLeay 1.46
Scalar::Util 0
Importer-0.026
view all matches for this distribution