From f28e16f835b41728d46133be9fc2276c3dda3862 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcus=20Do=CC=88llerer?= Date: Mon, 3 Jun 2019 10:53:16 +0200 Subject: [PATCH] Support optional encryption parameter --- src/AppserverIo/Appserver/Doctrine/Utils/ConnectionUtil.php | 5 +++++ src/AppserverIo/Appserver/Ldap/EntityManagerFactory.php | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/AppserverIo/Appserver/Doctrine/Utils/ConnectionUtil.php b/src/AppserverIo/Appserver/Doctrine/Utils/ConnectionUtil.php index 0d0d94648..4eb9f4ec8 100644 --- a/src/AppserverIo/Appserver/Doctrine/Utils/ConnectionUtil.php +++ b/src/AppserverIo/Appserver/Doctrine/Utils/ConnectionUtil.php @@ -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()) { diff --git a/src/AppserverIo/Appserver/Ldap/EntityManagerFactory.php b/src/AppserverIo/Appserver/Ldap/EntityManagerFactory.php index baa5c7b0b..0c3837114 100644 --- a/src/AppserverIo/Appserver/Ldap/EntityManagerFactory.php +++ b/src/AppserverIo/Appserver/Ldap/EntityManagerFactory.php @@ -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'] ]) );