Lemonldap-NG-Common
view release on metacpan or search on metacpan
lib/Lemonldap/NG/Common/Conf/Backends/LDAP.pm view on Meta::CPAN
( $self->{ldapPort} ? ( port => $self->{ldapPort} ) : () ),
raw => => qr/(?i:^jpegPhoto|;binary)/
);
unless ($ldap) {
$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;
}
}
# Start TLS if needed
if ($useTls) {
lib/Lemonldap/NG/Common/Notifications/LDAP.pm view on Meta::CPAN
( $self->ldapCAFile ? ( cafile => $self->ldapCAFile ) : () ),
( $self->ldapCAPath ? ( capath => $self->ldapCAPath ) : () ),
);
unless ($ldap) {
use Data::Dumper;
die 'connexion failed: ' . $@;
}
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 )
{
die "SSL connection error: " . $ldap->socket->errstr;
}
}
# Start TLS if needed
if ($useTls) {
my %h = split( /[&=]/, $tlsParam );
$h{cafile} ||= $self->ldapCAFile if ( $self->ldapCAFile );
( run in 0.678 second using v1.01-cache-2.11-cpan-fd5d4e115d8 )