Apache-Session-Browseable
view release on metacpan or search on metacpan
lib/Apache/Session/Browseable/Store/LDAP.pm view on Meta::CPAN
),
(
$self->{args}->{ldapPort} ? ( port => $self->{args}->{ldapPort} )
: ()
),
) 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 );
}
}
# Start TLS if needed
if ($useTls) {
my %h = split( /[&=]/, $tlsParam );
$h{verify} ||= ( $self->{args}->{ldapVerify} || "require" );
lib/Apache/Session/Browseable/Store/Patroni.pm view on Meta::CPAN
sub remove {
my $self = shift;
return $self->_try( 'remove', @_ );
}
sub checkMaster {
my ( $self, $args ) = @_;
delete $self->{failure};
require JSON;
require LWP::UserAgent;
require IO::Socket::SSL;
my $ua = LWP::UserAgent->new(
env_proxy => 1,
ssl_opts => {
verify_hostname => 0,
SSL_verify_mode => &IO::Socket::SSL::SSL_VERIFY_NONE,
},
timeout => 3,
);
my $res;
foreach my $patroniUrl ( split /[,\s]\s*/,
( $args->{PatroniUrl} || $args->{patroniUrl} ) )
{
my $resp = $ua->get($patroniUrl);
if ( $resp->is_success ) {
( run in 0.586 second using v1.01-cache-2.11-cpan-4d50c553e7e )