forked from opensearch-project/security
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use CertType enum instead of ssl config prefix
Signed-off-by: Andrey Pleskach <[email protected]>
- Loading branch information
1 parent
8d93ac9
commit 32abc34
Showing
8 changed files
with
134 additions
and
116 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
33 changes: 33 additions & 0 deletions
33
src/main/java/org/opensearch/security/ssl/config/CertType.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,33 @@ | ||
/* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* | ||
* The OpenSearch Contributors require contributions made to | ||
* this file be licensed under the Apache-2.0 license or a | ||
* compatible open source license. | ||
* | ||
* Modifications Copyright OpenSearch Contributors. See | ||
* GitHub history for details. | ||
*/ | ||
|
||
package org.opensearch.security.ssl.config; | ||
|
||
import static org.opensearch.security.ssl.util.SSLConfigConstants.SSL_HTTP_PREFIX; | ||
import static org.opensearch.security.ssl.util.SSLConfigConstants.SSL_TRANSPORT_CLIENT_PREFIX; | ||
import static org.opensearch.security.ssl.util.SSLConfigConstants.SSL_TRANSPORT_PREFIX; | ||
|
||
public enum CertType { | ||
HTTP(SSL_HTTP_PREFIX), | ||
TRANSPORT(SSL_TRANSPORT_PREFIX), | ||
TRANSPORT_CLIENT(SSL_TRANSPORT_CLIENT_PREFIX); | ||
|
||
private final String sslConfigPrefix; | ||
|
||
private CertType(String sslConfigPrefix) { | ||
this.sslConfigPrefix = sslConfigPrefix; | ||
} | ||
|
||
public String sslConfigPrefix() { | ||
return sslConfigPrefix; | ||
} | ||
|
||
} |
Oops, something went wrong.