Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Serialise cipherSuites attribute of TlsSettings. #83

Merged
merged 1 commit into from
Jan 29, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Serialise cipherSuites attribute of TlsSettings.
  • Loading branch information
mikkokar committed Jan 29, 2018
commit fd049698cce5a2772b35c70c88c381d86afff381
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,11 @@ public List<String> protocols() {
return protocols;
}

@JsonProperty("cipherSuites")
public List<String> cipherSuites() {
return this.cipherSuites;
}

@Override
public boolean equals(Object obj) {
if (this == obj) {
Expand Down Expand Up @@ -138,9 +143,6 @@ public int hashCode() {
trustStorePath, Arrays.hashCode(trustStorePassword), protocols, cipherSuites);
}

public List<String> cipherSuites() {
return this.cipherSuites;
}

/**
* The builder for SSL settings.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ public void serialisesAllAttributes() throws Exception {
.sslProvider("JDK")
.trustStorePassword("bar")
.protocols(ImmutableList.of("TLSv1.2"))
.cipherSuites(ImmutableList.of("TLS_RSA_WITH_AES_128_CBC_SHA"))
.build();

String result = mapper.writerWithDefaultPrettyPrinter().writeValueAsString(tlsSettings);
Expand All @@ -60,6 +61,8 @@ public void serialisesAllAttributes() throws Exception {
// trustStorePath is platform dependent - thus match only until the root path:
assertThat(result, containsString("\"trustStorePath\" : \"/"));
assertThat(result, containsString("\"trustStorePassword\" : \"bar"));

assertThat(result, containsString("TLS_RSA_WITH_AES_128_CBC_SHA"));
}

@Test
Expand Down