Rename Ldap\Connetion::SSL to ::LDAPS

The SSL constant was used to denote LDAP over TLS/SSL. In fact both STARTTLS and LDAPS use encrypted TLS/SSL communication
w/ STARTTLS upgrading a plain text connection and LDAPS using a separate port. Thus speaking of SSL only for LDAPS and TLS only for STARTTLS
is not correct.
This commit is contained in:
Eric Lippmann 2015-03-12 23:42:50 +01:00
parent 1b9ddaacac
commit 86f3ce9133
2 changed files with 4 additions and 4 deletions

View File

@ -70,7 +70,7 @@ class LdapResourceForm extends Form
),
'multiOptions' => array(
'plaintext' => $this->translate('Plaintext'),
Connection::SSL => 'Secure Sockets Layer (SSL)',
Connection::LDAPS => 'Secure Sockets Layer (SSL)',
Connection::STARTTLS => 'Transport Layer Security (TLS)'
)
)

View File

@ -43,7 +43,7 @@ class Connection
*
* @var string
*/
const SSL = 'ssl';
const LDAPS = 'ssl';
protected $ds;
protected $hostname;
@ -481,12 +481,12 @@ class Connection
*/
protected function prepareNewConnection()
{
if ($this->connectionType === static::STARTTLS || $this->connectionType === static::SSL) {
if ($this->connectionType === static::STARTTLS || $this->connectionType === static::LDAPS) {
$this->prepareTlsEnvironment();
}
$hostname = $this->hostname;
if ($this->connectionType === static::SSL) {
if ($this->connectionType === static::LDAPS) {
$hostname = 'ldaps://' . $hostname;
}