当前位置: 首页>>代码示例>>Java>>正文


Java AbstractHttp11JsseProtocol.setKeyAlias方法代码示例

本文整理汇总了Java中org.apache.coyote.http11.AbstractHttp11JsseProtocol.setKeyAlias方法的典型用法代码示例。如果您正苦于以下问题:Java AbstractHttp11JsseProtocol.setKeyAlias方法的具体用法?Java AbstractHttp11JsseProtocol.setKeyAlias怎么用?Java AbstractHttp11JsseProtocol.setKeyAlias使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.coyote.http11.AbstractHttp11JsseProtocol的用法示例。


在下文中一共展示了AbstractHttp11JsseProtocol.setKeyAlias方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: configureSsl

import org.apache.coyote.http11.AbstractHttp11JsseProtocol; //导入方法依赖的package包/类
/**
 * Configure Tomcat's {@link AbstractHttp11JsseProtocol} for SSL.
 * @param protocol the protocol
 * @param ssl the ssl details
 */
protected void configureSsl(AbstractHttp11JsseProtocol<?> protocol, Ssl ssl) {
	protocol.setSSLEnabled(true);
	protocol.setSslProtocol(ssl.getProtocol());
	configureSslClientAuth(protocol, ssl);
	protocol.setKeystorePass(ssl.getKeyStorePassword());
	protocol.setKeyPass(ssl.getKeyPassword());
	protocol.setKeyAlias(ssl.getKeyAlias());
	protocol.setCiphers(StringUtils.arrayToCommaDelimitedString(ssl.getCiphers()));
	if (ssl.getEnabledProtocols() != null) {
		protocol.setProperty("sslEnabledProtocols",
				StringUtils.arrayToCommaDelimitedString(ssl.getEnabledProtocols()));
	}
	if (getSslStoreProvider() != null) {
		configureSslStoreProvider(protocol, getSslStoreProvider());
	}
	else {
		configureSslKeyStore(protocol, ssl);
		configureSslTrustStore(protocol, ssl);
	}
}
 
开发者ID:philwebb,项目名称:spring-boot-concourse,代码行数:26,代码来源:TomcatEmbeddedServletContainerFactory.java

示例2: configureSsl

import org.apache.coyote.http11.AbstractHttp11JsseProtocol; //导入方法依赖的package包/类
/**
 * Configure Tomcat's {@link AbstractHttp11JsseProtocol} for SSL.
 * @param protocol the protocol
 * @param ssl the ssl details
 */
protected void configureSsl(AbstractHttp11JsseProtocol<?> protocol, Ssl ssl) {
	protocol.setSSLEnabled(true);
	protocol.setSslProtocol(ssl.getProtocol());
	configureSslClientAuth(protocol, ssl);
	protocol.setKeystorePass(ssl.getKeyStorePassword());
	protocol.setKeyPass(ssl.getKeyPassword());
	protocol.setKeyAlias(ssl.getKeyAlias());
	configureSslKeyStore(protocol, ssl);
	String ciphers = StringUtils.arrayToCommaDelimitedString(ssl.getCiphers());
	protocol.setCiphers(ciphers);
	configureSslTrustStore(protocol, ssl);
}
 
开发者ID:Nephilim84,项目名称:contestparser,代码行数:18,代码来源:TomcatEmbeddedServletContainerFactory.java

示例3: configureSsl

import org.apache.coyote.http11.AbstractHttp11JsseProtocol; //导入方法依赖的package包/类
/**
 * Configure Tomcat's {@link AbstractHttp11JsseProtocol} for SSL.
 * @param protocol the protocol
 * @param ssl the ssl details
 */
protected void configureSsl(AbstractHttp11JsseProtocol<?> protocol, Ssl ssl) {
	protocol.setSSLEnabled(true);
	protocol.setSslProtocol(ssl.getProtocol());
	configureSslClientAuth(protocol, ssl);
	protocol.setKeystorePass(ssl.getKeyStorePassword());
	protocol.setKeyPass(ssl.getKeyPassword());
	protocol.setKeyAlias(ssl.getKeyAlias());
	String ciphers = StringUtils.arrayToCommaDelimitedString(ssl.getCiphers());
	protocol.setCiphers(StringUtils.hasText(ciphers) ? ciphers : null);
	if (ssl.getEnabledProtocols() != null) {
		try {
			for (SSLHostConfig sslHostConfig : protocol.findSslHostConfigs()) {
				sslHostConfig.setProtocols(StringUtils
						.arrayToCommaDelimitedString(ssl.getEnabledProtocols()));
			}
		}
		catch (NoSuchMethodError ex) {
			// Tomcat 8.0.x or earlier
			Assert.isTrue(
					protocol.setProperty("sslEnabledProtocols",
							StringUtils.arrayToCommaDelimitedString(
									ssl.getEnabledProtocols())),
					"Failed to set sslEnabledProtocols");
		}
	}
	if (getSslStoreProvider() != null) {
		TomcatURLStreamHandlerFactory instance = TomcatURLStreamHandlerFactory
				.getInstance();
		instance.addUserFactory(
				new SslStoreProviderUrlStreamHandlerFactory(getSslStoreProvider()));
		protocol.setKeystoreFile(
				SslStoreProviderUrlStreamHandlerFactory.KEY_STORE_URL);
		protocol.setTruststoreFile(
				SslStoreProviderUrlStreamHandlerFactory.TRUST_STORE_URL);
	}
	else {
		configureSslKeyStore(protocol, ssl);
		configureSslTrustStore(protocol, ssl);
	}
}
 
开发者ID:vikrammane23,项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,代码行数:46,代码来源:TomcatEmbeddedServletContainerFactory.java


注:本文中的org.apache.coyote.http11.AbstractHttp11JsseProtocol.setKeyAlias方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。