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;
our $VERSION = '1.104';
# ABSTRACT: HTTP client using HTTP::Tiny
use Moo;
use HTTP::Tiny;
use IO::Socket::SSL;
use Kubernetes::REST::HTTPResponse;
use Types::Standard qw/Bool/;
with 'Kubernetes::REST::Role::IO';
lib/Kubernetes/REST/HTTPTinyIO.pm view on Meta::CPAN
has timeout => (is => 'ro', default => sub { 310 });
has ua => (is => 'ro', lazy => 1, default => sub {
my $self = shift;
require IO::Socket::SSL::Utils;
my %options;
$options{ SSL_verify_mode } = SSL_VERIFY_PEER if ($self->ssl_verify_server);
if (defined $self->ssl_cert_pem) {
$options{ SSL_cert } = [ IO::Socket::SSL::Utils::PEM_string2cert($self->ssl_cert_pem) ];
} elsif (defined $self->ssl_cert_file) {
$options{ SSL_cert_file } = $self->ssl_cert_file;
}
if (defined $self->ssl_key_pem) {
$options{ SSL_key } = IO::Socket::SSL::Utils::PEM_string2key($self->ssl_key_pem);
} elsif (defined $self->ssl_key_file) {
$options{ SSL_key_file } = $self->ssl_key_file;
}
if (defined $self->ssl_ca_pem) {
$options{ SSL_ca } = [ IO::Socket::SSL::Utils::PEM_string2cert($self->ssl_ca_pem) ];
} elsif (defined $self->ssl_ca_file) {
$options{ SSL_ca_file } = $self->ssl_ca_file;
}
return HTTP::Tiny->new(
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
my $host = $url->host() =~ m/:|^[\d.]+$/s ? undef : $url->host();
my $usebio = {};
if (UNIVERSAL::can($sock,'is_SSL') && $sock->is_SSL) {
$usebio = eval { $Net::HTTPS::SSL_SOCKET_CLASS->can_nested_ssl } or
die "no support for nested TLS in this IO::Socket::SSL version";
}
$sock = LWP::Protocol::https::Socket->start_SSL( my $osock = $sock,
SSL_verifycn_name => $url->host,
SSL_hostname => $host,
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('prime256v1');
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, $type ) = @_;
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/LightTCP/SSLclient.pm view on Meta::CPAN
package LightTCP::SSLclient;
use strict;
use warnings;
use IO::Socket::SSL;
use IO::Socket::INET;
use MIME::Base64 qw(encode_base64);
use URI;
our $VERSION = '1.06';
lib/LightTCP/SSLclient.pm view on Meta::CPAN
SSL_protocols => $self->{ssl_protocols},
SSL_cipher_list => $self->{ssl_ciphers},
);
if ($self->{insecure}) {
$ssl_opts{SSL_verify_mode} = IO::Socket::SSL::SSL_VERIFY_NONE;
} else {
$ssl_opts{SSL_verify_mode} = IO::Socket::SSL::SSL_VERIFY_PEER;
}
if ($self->{cert} && -f $self->{cert}.'.key' && -f $self->{cert}.'.crt') {
$ssl_opts{SSL_key_file} = $self->{cert}.'.key';
$ssl_opts{SSL_cert_file} = $self->{cert}.'.crt';
lib/LightTCP/SSLclient.pm view on Meta::CPAN
push(@errors, "- ERROR: Proxy CONNECT failed:\n$proxy_resp");
return (0, \@errors, \@debug, ECONNECT);
}
push(@debug, "- Proxy tunnel established.\n") if $self->{verbose};
if (IO::Socket::SSL->start_SSL($socket, %ssl_opts)) {
$socket->timeout($timeout);
push(@debug, "- SSL connect established.\n") if $self->{verbose};
$self->{_socket} = $socket;
$self->{_connected} = 1;
return (1, \@errors, \@debug, 0);
lib/LightTCP/SSLclient.pm view on Meta::CPAN
push(@errors, "- ERROR: SSL connect failed: $SSL_ERROR\n");
return (0, \@errors, \@debug, ESSL);
}
} else {
push(@debug, "# Connecting to $target_host:$target_port...\n") if $self->{verbose};
$socket = IO::Socket::SSL->new(
PeerHost => $target_host,
PeerPort => $target_port,
%ssl_opts,
);
if ($socket) {
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
view release on metacpan or search on metacpan
t/02-client.t view on Meta::CPAN
my $base_url;
for (@{(BASE_URLS)}) {
$base_url = $_;
$client = MToken::Client->new(
url => $base_url,
insecure => 1, # IO::Socket::SSL::set_defaults(SSL_verify_mode => 0); # Skip verify for test only!
pwcache => PWCACHE_FILE,
max_redirects => 2,
connect_timeout => 3,
inactivity_timeout => 5,
request_timeout => 10,
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Mail/Box/IMAP4/SSL.pm view on Meta::CPAN
package Mail::Box::IMAP4::SSL;
# ABSTRACT: handle IMAP4 folders with SSL
our $VERSION = '0.03'; # VERSION
use superclass 'Mail::Box::IMAP4' => 2.079;
use IO::Socket::SSL 1.12;
use Mail::Reporter 2.079 qw();
use Mail::Transport::IMAP4 2.079 qw();
use Mail::IMAPClient 3.02;
my $imaps_port = 993; # standard port for IMAP over SSL
lib/Mail/Box/IMAP4/SSL.pm view on Meta::CPAN
# trying to create the transport object
my $verify_mode =
$ENV{MAIL_BOX_IMAP4_SSL_NOVERIFY} ? SSL_VERIFY_NONE() : SSL_VERIFY_PEER();
my $ssl_socket = IO::Socket::SSL->new(
Proto => 'tcp',
PeerAddr => $args->{server_name},
PeerPort => $args->{server_port},
SSL_verify_mode => $verify_mode,
);
unless ($ssl_socket) {
Mail::Reporter->log( ERROR => "Couldn't connect to '$args->{server_name}': "
. IO::Socket::SSL::errstr() );
return;
}
my $imap = Mail::IMAPClient->new(
User => $args->{username},
lib/Mail/Box/IMAP4/SSL.pm view on Meta::CPAN
=head1 DESCRIPTION
This is a thin subclass of L<Mail::Box::IMAP4> to provide IMAP over SSL (aka
IMAPS). It hides the complexity of setting up Mail::Box::IMAP4 with
L<IO::Socket::SSL>, L<Mail::IMAPClient> and L<Mail::Transport::IMAP4>.
In all other respects, it resembles L<Mail::Box::IMAP4>. See that module
for documentation.
=for Pod::Coverage init
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Mail/Box/IMAP4s.pm view on Meta::CPAN
use strict;
use warnings;
use Log::Report 'mail-box-imap4', import => [];
use IO::Socket::SSL qw/SSL_VERIFY_NONE/;
#--------------------
sub init($)
{ my ($self, $args) = @_;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Mail/Transport/POP3.pm view on Meta::CPAN
use Log::Report 'mail-box-pop3', import => [ qw/error fault __x/ ];
use IO::Socket ();
use IO::Socket::IP ();
use IO::Socket::SSL qw/SSL_VERIFY_NONE/;
use Socket qw/$CRLF/;
use Digest::MD5 qw/md5_hex/;
use MIME::Base64 qw/encode_base64/;
#--------------------
lib/Mail/Transport/POP3.pm view on Meta::CPAN
or error __x"POP3 requires a username and password.";
my $socket;
if($self->useSSL)
{ my $opts = $self->SSLOptions;
$socket = eval { IO::Socket::SSL->new(PeerAddr => "$host:$port", %$opts) };
}
else
{ $socket = eval { IO::Socket::IP->new("$host:$port") };
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Mail/DMARC/Iterator.pm view on Meta::CPAN
}
{
# Define function organizational_domain based on which package we have to
# calculate the public suffix.
if (eval { require IO::Socket::SSL::PublicSuffix }) {
my $ps = IO::Socket::SSL::PublicSuffix->default;
*organizational_domain = sub {
return $ps->public_suffix($_[0],1) || $_[0];
};
} elsif (eval { require Domain::PublicSuffix }) {
my $ps = Domain::PublicSuffix->new;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Mail/DMARC/Report/Receive.pm view on Meta::CPAN
my $a_done = $self->config->{imap}{a_done};
my $f_done = $self->config->{imap}{f_done};
my $port = $self->config->{imap}{port} // 993;
if ($port != 143) {
eval "use IO::Socket::SSL"; ## no critic (Eval)
if ( $@ ) {
croak "Can't load IO::Socket::SSL: $!\n";
};
if (defined $self->config->{imap}{SSL_verify_mode}) {
IO::Socket::SSL::set_ctx_defaults(
SSL_verifycn_scheme => 'imap',
SSL_verify_mode => $self->config->{imap}{SSL_verify_mode},
);
}
}
view all matches for this distribution
view release on metacpan or search on metacpan
examples/imap_to_mbox.pl view on Meta::CPAN
use warnings;
use strict;
use Mail::IMAPClient; # a nice set of perl libs for imap
use IO::Socket::SSL; # for SSL support
use vars qw($opt_h $opt_u $opt_p $opt_P $opt_s $opt_i $opt_f $opt_m $opt_b
$opt_c $opt_r $opt_w $opt_W $opt_S $opt_D $opt_U $opt_d $opt_I
$opt_n);
examples/imap_to_mbox.pl view on Meta::CPAN
{
# Open an SSL session to the IMAP server
# Handles the SSL setup, and gives us back a socket
my $ssl;
if ($opt_S) {
$ssl=IO::Socket::SSL->new(
PeerHost => "$SERVER:imaps"
# , SSL_version => 'SSLv2' # for older versions of openssl
);
defined $ssl
view all matches for this distribution
view release on metacpan or search on metacpan
IMAPFolderSearch.pm view on Meta::CPAN
package Mail::IMAPFolderSearch;
use strict;
use IO::Socket::SSL;
use IO::Socket;
use vars qw($VERSION @ISA @EXPORT @EXPORT_OK);
require Exporter;
IMAPFolderSearch.pm view on Meta::CPAN
$imap->logout();
=head1 REQUIRES
IO::Socket, IO::Socket::SSL
=head1 DESCRIPTION
Many e-mail clients such as F<PINE> allow the user to search
for a string within a single folder. Mail::IMAPFolderSearch allows
IMAPFolderSearch.pm view on Meta::CPAN
$imap->{Password} = $args->{Password} || die "Password is required";
my $socket;
if ($imap->{SSL} == 0) {
$socket = IO::Socket::INET->new("$imap->{Server}:$imap->{Port}") || die "Can't connect $!";
} else {
$socket = IO::Socket::SSL->new( SSL_verify_mode => 0x00,
SSL_use_cert => 0,
PeerAddr => $imap->{Server},
PeerPort => $imap->{Port}
) || die "Can't connect $!";
}
IMAPFolderSearch.pm view on Meta::CPAN
Brian Hodges <bhodgescpan ^at^ pelemele ^dot^ com>
=head1 SEE ALSO
perl(1), L<IO::Socket>, L<IO::Socket::SSL>
view all matches for this distribution