Skip to content

Commit

Permalink
Enh 36550340 - ENH: [Beta] - Change the default keystore type in 14.1…
Browse files Browse the repository at this point in the history
….2 to PKCS12 (main -> ce-main@108733)

[git-p4: depot-paths = "//dev/coherence-ce/main/": change = 108885]
  • Loading branch information
lsho committed May 8, 2024
1 parent 64d79e8 commit 1232876
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 3 deletions.
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2023, Oracle and/or its affiliates.
* Copyright (c) 2000, 2024, Oracle and/or its affiliates.
*
* Licensed under the Universal Permissive License v 1.0 as shown at
* https://oss.oracle.com/licenses/upl.
Expand Down Expand Up @@ -373,7 +373,7 @@ public interface Dependencies
/**
* The default keystore type.
*/
String DEFAULT_KEYSTORE_TYPE = KEYSTORE_TYPE_JKS;
String DEFAULT_KEYSTORE_TYPE = KEYSTORE_TYPE_PKCS12;
}


Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2022, Oracle and/or its affiliates.
* Copyright (c) 2000, 2024, Oracle and/or its affiliates.
*
* Licensed under the Universal Permissive License v 1.0 as shown at
* https://oss.oracle.com/licenses/upl.
Expand Down Expand Up @@ -84,6 +84,17 @@ public void testSimpleServerConfiguration()
assertThat(sslDeps.getHostnameVerifier(), is(nullValue()));
}

@Test
public void testSimpleServerP12Configuration()
{
SSLSocketProviderDefaultDependencies sslDeps = loadDependencies("ssl-config-p12-server.xml");
SSLContext ctx = sslDeps.getSSLContext();
assertThat(ctx, is(notNullValue()));
assertThat(ctx.getProtocol(), is(SSLSocketProviderDefaultDependencies.DEFAULT_SSL_PROTOCOL));
assertThat(sslDeps.getExecutor(), is(notNullValue()));
assertThat(sslDeps.getHostnameVerifier(), is(nullValue()));
}

@Test
public void testCustomConfiguration()
throws IOException
Expand Down
@@ -0,0 +1,23 @@
<?xml version="1.0"?>
<!--
Copyright (c) 2000, 2024, Oracle and/or its affiliates.
Licensed under the Universal Permissive License v 1.0 as shown at
https://oss.oracle.com/licenses/upl.
-->
<ssl>
<identity-manager>
<key-store>
<url>file:server.p12</url>
<password>password</password>
</key-store>
<password>password</password>
</identity-manager>

<trust-manager>
<key-store>
<url>file:client.p12</url>
<password>password</password>
</key-store>
</trust-manager>
</ssl>

0 comments on commit 1232876

Please sign in to comment.