Skip to content

Commit

Permalink
Merge pull request #1124 from pathmissing/ldap-ssl
Browse files Browse the repository at this point in the history
Support optional encryption parameter
  • Loading branch information
wagnert authored Jun 22, 2019
2 parents 510c04f + f28e16f commit ae73a48
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions src/AppserverIo/Appserver/Doctrine/Utils/ConnectionUtil.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,11 @@ public function fromDatabaseNode(DatabaseConfigurationInterface $databaseNode)
if ($databasePortNode = $databaseNode->getDatabasePort()) {
$connectionParameters['port'] = $databasePortNode->getNodeValue()->__toString();
}

// adds the optional encryption option
if ($encryptionNode = $databaseNode->getEncryption()) {
$connectionParameters['encryption'] = $encryptionNode->getNodeValue()->__toString();
}

// add charset, if specified
if ($charsetNode = $databaseNode->getCharset()) {
Expand Down
3 changes: 2 additions & 1 deletion src/AppserverIo/Appserver/Ldap/EntityManagerFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,8 @@ public function factory()
$ldapClient = new LdapClient(
Ldap::create($connectionParameters['driver'], [
'host' => $connectionParameters['host'],
'port' => $connectionParameters['port']
'port' => $connectionParameters['port'],
'encryption' => $connectionParameters['encryption']
])
);

Expand Down

0 comments on commit ae73a48

Please sign in to comment.