Apache-Session-LDAP
view release on metacpan or search on metacpan
lib/Apache/Session/Store/LDAP.pm view on Meta::CPAN
}
# Compatibility
my $caFile = $self->{args}->{ldapCAFile} || $self->{args}->{caFile};
my $caPath = $self->{args}->{ldapCAPath} || $self->{args}->{caPath};
# Connect
my $ldap = Net::LDAP->new(
\@servers,
onerror => undef,
verify => $self->{args}->{ldapVerify} || "require",
( $caFile ? ( cafile => $caFile ) : () ),
( $caPath ? ( capath => $caPath ) : () ),
(
$self->{args}->{ldapPort}
? ( port => $self->{args}->{ldapPort} )
: ()
),
) or die( 'Unable to connect to ' . join( ' ', @servers ) . ': ' . $@ );
lib/Apache/Session/Store/LDAP.pm view on Meta::CPAN
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" );
$h{cafile} ||= $caFile if ($caFile);
$h{capath} ||= $caPath if ($caPath);
my $start_tls = $ldap->start_tls(%h);
if ( $start_tls->code ) {
$self->logError($start_tls);
return;
}
}
# Bind with credentials
( run in 0.636 second using v1.01-cache-2.11-cpan-5467b0d2c73 )