-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #115 from wireapp/WPB-14877
feat(set and use any mls ciphersuite) #WPB-14877
- Loading branch information
Showing
9 changed files
with
110 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
src/main/java/com/wire/xenon/backend/models/FeatureConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package com.wire.xenon.backend.models; | ||
|
||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties; | ||
import com.fasterxml.jackson.annotation.JsonInclude; | ||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
|
||
@JsonIgnoreProperties(ignoreUnknown = true) | ||
@JsonInclude(JsonInclude.Include.NON_NULL) | ||
public class FeatureConfig { | ||
|
||
@JsonProperty("mls") | ||
public MlsResponse mls; | ||
|
||
public static FeatureConfig disabledMls() { | ||
FeatureConfig featureConfig = new FeatureConfig(); | ||
featureConfig.mls = MlsResponse.disabledMlsResponse(); | ||
return featureConfig; | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
src/main/java/com/wire/xenon/backend/models/MlsConfigResponse.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package com.wire.xenon.backend.models; | ||
|
||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties; | ||
import com.fasterxml.jackson.annotation.JsonInclude; | ||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
|
||
import java.util.List; | ||
|
||
@JsonIgnoreProperties(ignoreUnknown = true) | ||
@JsonInclude(JsonInclude.Include.NON_NULL) | ||
public class MlsConfigResponse { | ||
@JsonProperty | ||
public List<Integer> allowedCipherSuites; | ||
|
||
@JsonProperty | ||
public Integer defaultCipherSuite; | ||
|
||
@JsonProperty | ||
public String defaultProtocol; | ||
|
||
@JsonProperty | ||
public List<String> supportedProtocols; | ||
} |
25 changes: 25 additions & 0 deletions
25
src/main/java/com/wire/xenon/backend/models/MlsResponse.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package com.wire.xenon.backend.models; | ||
|
||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties; | ||
import com.fasterxml.jackson.annotation.JsonInclude; | ||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
|
||
@JsonIgnoreProperties(ignoreUnknown = true) | ||
@JsonInclude(JsonInclude.Include.NON_NULL) | ||
public class MlsResponse { | ||
@JsonProperty("config") | ||
public MlsConfigResponse config; | ||
|
||
@JsonProperty | ||
public String status; | ||
|
||
public static MlsResponse disabledMlsResponse() { | ||
MlsResponse mlsResponse = new MlsResponse(); | ||
mlsResponse.status = "disabled"; | ||
return mlsResponse; | ||
} | ||
|
||
public boolean isMlsStatusEnabled() { | ||
return status != null && status.equals("enabled"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters