Permalink
Browse files

Specify that we want to use the 'ldap' scheme to verify certificates.

  • Loading branch information...
1 parent 0a55dd1 commit 041d540d96b8e3f79ab0822689b3e565b222de14 @isnotajoke isnotajoke committed with gbarr Jul 28, 2011
Showing with 13 additions and 12 deletions.
  1. +1 −1 Makefile.PL
  2. +12 −11 lib/Net/LDAP.pm
View
2 Makefile.PL
@@ -39,7 +39,7 @@ features(
],
'LDAPS' => [
-default => 0,
- 'IO::Socket::SSL' => 0.93,
+ 'IO::Socket::SSL' => 1.26,
],
'Read/Write DSML files' => [
-default => 0,
View
23 lib/Net/LDAP.pm
@@ -219,17 +219,18 @@ sub _SSL_context_init_args {
}
(
- SSL_cipher_list => defined $arg->{'ciphers'} ? $arg->{'ciphers'} : 'ALL',
- SSL_ca_file => exists $arg->{'cafile'} ? $arg->{'cafile'} : '',
- SSL_ca_path => exists $arg->{'capath'} ? $arg->{'capath'} : '',
- SSL_key_file => $clientcert ? $clientkey : undef,
- SSL_passwd_cb => $passwdcb,
- SSL_check_crl => $arg->{'checkcrl'} ? 1 : 0,
- SSL_use_cert => $clientcert ? 1 : 0,
- SSL_cert_file => $clientcert,
- SSL_verify_mode => $verify,
- SSL_version => defined $arg->{'sslversion'} ? $arg->{'sslversion'} :
- 'sslv2/3',
+ SSL_cipher_list => defined $arg->{'ciphers'} ? $arg->{'ciphers'} : 'ALL',
+ SSL_ca_file => exists $arg->{'cafile'} ? $arg->{'cafile'} : '',
+ SSL_ca_path => exists $arg->{'capath'} ? $arg->{'capath'} : '',
+ SSL_key_file => $clientcert ? $clientkey : undef,
+ SSL_passwd_cb => $passwdcb,
+ SSL_check_crl => $arg->{'checkcrl'} ? 1 : 0,
+ SSL_use_cert => $clientcert ? 1 : 0,
+ SSL_cert_file => $clientcert,
+ SSL_verify_mode => $verify,
+ SSL_version => defined $arg->{'sslversion'} ? $arg->{'sslversion'} :
+ 'sslv2/3',
+ SSL_verifycn_scheme => "ldap",
);
}

0 comments on commit 041d540

Please sign in to comment.