Skip to content
Snippets Groups Projects
Commit 01d85e26 authored by Andreas Åkre Solberg's avatar Andreas Åkre Solberg
Browse files

Use port 636 if ldaps as default

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@1226 44740490-163a-0410-bde0-09ae8108e29a
parent 0cb58423
No related branches found
No related tags found
No related merge requests found
...@@ -31,7 +31,7 @@ function phpping($host, $port) { ...@@ -31,7 +31,7 @@ function phpping($host, $port) {
$socket = @fsockopen($host, $port, $errno, $errstr, $timeout); $socket = @fsockopen($host, $port, $errno, $errstr, $timeout);
@fclose($socket); @fclose($socket);
if ($errno) { if ($errno) {
return array(FALSE, $errno . ':' . $errstr); return array(FALSE, $errno . ':' . $errstr . ' [' . $host . ':' . $port . ']');
} else { } else {
return array(TRUE,NULL); return array(TRUE,NULL);
} }
...@@ -68,6 +68,7 @@ foreach ($orgs AS $orgkey => $orgconfig) { ...@@ -68,6 +68,7 @@ foreach ($orgs AS $orgkey => $orgconfig) {
$urldef = explode(' ', $orgconfig['hostname']); $urldef = explode(' ', $orgconfig['hostname']);
$url = parse_url($urldef[0]); $url = parse_url($urldef[0]);
$port = 389; $port = 389;
if (!empty($url['scheme']) && $url['scheme'] === 'ldaps') $port = 636;
if (!empty($url['port'])) $port = $url['port']; if (!empty($url['port'])) $port = $url['port'];
SimpleSAML_Logger::debug('ldapstatus Url parse [' . $orgconfig['hostname'] . '] => [' . $url['host'] . ']:[' . $port . ']' ); SimpleSAML_Logger::debug('ldapstatus Url parse [' . $orgconfig['hostname'] . '] => [' . $url['host'] . ']:[' . $port . ']' );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment