Skip to content

Commit cd72487

Browse files
authored
Merge pull request #662 from marklogic/feature/2way-clean
Updated ssl-2way to work with ml-gradle 4.x
2 parents 4cec636 + 995479b commit cd72487

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

examples/ssl-2way-project/build.gradle

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
plugins {
2+
id "net.saliman.properties" version "1.5.1"
23
id "com.marklogic.ml-gradle" version "4.5.2"
34
}
45

@@ -77,10 +78,11 @@ if (project.hasProperty("mlKeystore")) {
7778
KeyManager[] key = keyManagerFactory.getKeyManagers()
7879

7980
// Initialize the SSL context with key and trust managers.
80-
SSLContext sslContext = SSLContext.getInstance("SSLv3")
81+
SSLContext sslContext = SSLContext.getInstance("TLSv1.2")
8182
sslContext.init(key, trust, null)
8283

8384
restSslContext = sslContext
85+
restTrustManager = trust[0]
8486

8587
// This turns off hostname verification unless mlVerifyServerHostname=true
8688
if (project.hasProperty("mlVerifyServerHostname") && mlVerifyServerHostname.toBoolean()) {

0 commit comments

Comments
 (0)