Revision 9514
Added by Jing Tao almost 9 years ago
ldapweb.cgi | ||
---|---|---|
81 | 81 |
my $cgiPrefix = "/" . $context . "/cgi-bin"; |
82 | 82 |
my $styleSkinsPath = $contextUrl . "/style/skins"; |
83 | 83 |
my $styleCommonPath = $contextUrl . "/style/common"; |
84 |
my $ldapServerCACertFile = $workingDirectory. "/../" . $properties->getProperty('ldap.server.ca.certificate'); |
|
84 |
my $caCertFileProp = $properties->getProperty('ldap.server.ca.certificate'); |
|
85 |
my $ldapServerCACertFile; |
|
86 |
if ($caCertFileProp eq "") { |
|
87 |
$ldapServerCACertFile = "/etc/ssl/certs/ca-certificates.crt"; |
|
88 |
debug("Metacat doesn't specify the ca file, we use the default one " . $ldapServerCACertFile); |
|
89 |
} else { |
|
90 |
$ldapServerCACertFile = $workingDirectory. "/../" . $properties->getProperty('ldap.server.ca.certificate'); |
|
91 |
debug("Metacat does specify the ca file, we will use it - " . $ldapServerCACertFile); |
|
92 |
} |
|
85 | 93 |
|
94 |
|
|
86 | 95 |
#recaptcha key information |
87 | 96 |
my $recaptchaPublicKey=$properties->getProperty('ldap.recaptcha.publickey'); |
88 | 97 |
my $recaptchaPrivateKey=$properties->getProperty('ldap.recaptcha.privatekey'); |
... | ... | |
1350 | 1359 |
print "Content-type: text/html\n\n"; |
1351 | 1360 |
debug("the dn is " . $dn); |
1352 | 1361 |
debug("LDAP connection to $ldapurl..."); |
1362 |
debug("the ldap ca certificate is " . $ldapServerCACertFile); |
|
1353 | 1363 |
#if main ldap server is down, a html file containing warning message will be returned |
1354 | 1364 |
my $ldap = Net::LDAP->new($ldapurl, timeout => $timeout) or handleLDAPBindFailure($ldapurl); |
1355 | 1365 |
if ($ldap) { |
Also available in: Unified diff
If the user doesn's specify the ldap ca file path on the metacat.properties, it will use the default one.