-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Breaking apart the PSK creation to an interface
- Loading branch information
1 parent
29124da
commit e906fb9
Showing
5 changed files
with
68 additions
and
7 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
31 changes: 31 additions & 0 deletions
31
zuul-core/src/main/java/com/netflix/zuul/netty/server/psk/PskCreationFailureException.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,31 @@ | ||
package com.netflix.zuul.netty.server.psk; | ||
|
||
public class PskCreationFailureException extends Exception { | ||
|
||
public enum TlsAlertMessage { | ||
/** | ||
* The server does not recognize the (client) PSK identity | ||
*/ | ||
unknown_psk_identity, | ||
/** | ||
* The (client) PSK identity existed but the key was incorrect | ||
*/ | ||
decrypt_error, | ||
} | ||
|
||
private final TlsAlertMessage tlsAlertMessage; | ||
|
||
public PskCreationFailureException(TlsAlertMessage tlsAlertMessage, String message) { | ||
super(message); | ||
this.tlsAlertMessage = tlsAlertMessage; | ||
} | ||
|
||
public PskCreationFailureException(TlsAlertMessage tlsAlertMessage, String message, Throwable cause) { | ||
super(message, cause); | ||
this.tlsAlertMessage = tlsAlertMessage; | ||
} | ||
|
||
public TlsAlertMessage getTlsAlertMessage() { | ||
return tlsAlertMessage; | ||
} | ||
} |
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