Skip to content

Commit

Permalink
Add key alias support for SSL context configuration
Browse files Browse the repository at this point in the history
Implement functionality to specify a key alias for the SSL context, enhancing flexibility in managing multiple keys. Update relevant documentation to reflect these changes and ensure consistent usage across the application.
  • Loading branch information
t-burch authored and rrayst committed Sep 11, 2024
1 parent 00d2ebe commit efc98fb
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ public void selectFirstKeyAndPass() throws Exception {

@Test
public void selectFirstKeyTrustFail() {
assertThrows(SocketException.class, () -> {
assertThrows2(SocketException.class, SSLHandshakeException.class, () -> {
SSLContext server = cb().withKeyStore("classpath:/alias-keystore.p12").byKeyAlias("key2").build();
SSLContext client = cb().withTrustStore("classpath:/alias-truststore.p12").build();
testCombination(server, client);
Expand All @@ -123,7 +123,7 @@ public void selectSecondKeyAndPass() throws Exception {

@Test
public void selectSecondKeyTrustFail() {
assertThrows(SocketException.class, () -> {
assertThrows2(SocketException.class, SSLHandshakeException.class, () -> {
SSLContext server = cb().withKeyStore("classpath:/alias-keystore.p12").byKeyAlias("key1").build();
SSLContext client = cb().withTrustStore("classpath:/alias-truststore2.p12").build();
testCombination(server, client);
Expand Down

0 comments on commit efc98fb

Please sign in to comment.