in huawei-cloud/servicestage/src/main/java/org/apache/servicecomb/huaweicloud/servicestage/RBACBootStrapService.java [135:211]
private SSLProperties createSSLProperties(Environment environment) {
SSLProperties sslProperties = new SSLProperties();
SSLOption option = new SSLOption();
option.setEngine(getStringProperty(environment,
DEFAULT_OPTION.getEngine(),
"ssl." + SSL_TAG + ".engine",
"ssl.engine"));
option.setProtocols(
getStringProperty(environment,
DEFAULT_OPTION.getProtocols(),
"ssl." + SSL_TAG + ".protocols",
"ssl.protocols"));
option.setCiphers(
getStringProperty(environment, DEFAULT_OPTION.getCiphers(), "ssl." + SSL_TAG + ".ciphers", "ssl.ciphers"));
option.setAuthPeer(
getBooleanProperty(environment, DEFAULT_OPTION.isAuthPeer(), "ssl." + SSL_TAG + ".authPeer", "ssl.authPeer"));
option.setCheckCNHost(
getBooleanProperty(environment,
DEFAULT_OPTION.isCheckCNHost(),
"ssl." + SSL_TAG + ".checkCN.host",
"ssl.checkCN.host"));
option.setCheckCNWhite(
getBooleanProperty(environment,
DEFAULT_OPTION.isCheckCNWhite(),
"ssl." + SSL_TAG + ".checkCN.white",
"ssl.checkCN.white"));
option.setCheckCNWhiteFile(getStringProperty(environment,
DEFAULT_OPTION.getCiphers(),
"ssl." + SSL_TAG + ".checkCN.white.file",
"ssl.checkCN.white.file"));
option.setAllowRenegotiate(getBooleanProperty(environment,
DEFAULT_OPTION.isAllowRenegotiate(),
"ssl." + SSL_TAG + ".allowRenegotiate",
"ssl.allowRenegotiate"));
option.setStorePath(
getStringProperty(environment,
DEFAULT_OPTION.getStorePath(),
"ssl." + SSL_TAG + ".storePath",
"ssl.storePath"));
option.setClientAuth(
getStringProperty(environment,
DEFAULT_OPTION.getClientAuth(),
"ssl." + SSL_TAG + ".clientAuth",
"ssl.clientAuth"));
option.setTrustStore(
getStringProperty(environment,
DEFAULT_OPTION.getTrustStore(),
"ssl." + SSL_TAG + ".trustStore",
"ssl.trustStore"));
option.setTrustStoreType(getStringProperty(environment,
DEFAULT_OPTION.getTrustStoreType(),
"ssl." + SSL_TAG + ".trustStoreType",
"ssl.trustStoreType"));
option.setTrustStoreValue(getStringProperty(environment,
DEFAULT_OPTION.getTrustStoreValue(),
"ssl." + SSL_TAG + ".trustStoreValue",
"ssl.trustStoreValue"));
option.setKeyStore(
getStringProperty(environment, DEFAULT_OPTION.getKeyStore(), "ssl." + SSL_TAG + ".keyStore", "ssl.keyStore"));
option.setKeyStoreType(
getStringProperty(environment,
DEFAULT_OPTION.getKeyStoreType(),
"ssl." + SSL_TAG + ".keyStoreType",
"ssl.keyStoreType"));
option.setKeyStoreValue(getStringProperty(environment,
DEFAULT_OPTION.getKeyStoreValue(),
"ssl." + SSL_TAG + ".keyStoreValue",
"ssl.keyStoreValue"));
option.setCrl(getStringProperty(environment, DEFAULT_OPTION.getCrl(), "ssl." + SSL_TAG + ".crl", "ssl.crl"));
option.setSslCustomClass(
getStringProperty(environment, null, "ssl." + SSL_TAG + ".sslCustomClass", "ssl.sslCustomClass"));
sslProperties.setSslOption(option);
sslProperties.setSslCustom(SSLCustom.createSSLCustom(option.getSslCustomClass()));
return sslProperties;
}