本文整理了Java中javax.net.ssl.SSLContext.getClientSessionContext()
方法的一些代码示例,展示了SSLContext.getClientSessionContext()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。SSLContext.getClientSessionContext()
方法的具体详情如下:
包路径:javax.net.ssl.SSLContext
类名称:SSLContext
方法名:getClientSessionContext
[英]Returns the SSL session context that encapsulates the set of SSL sessions that can be used for handshake of client-side SSL sockets.
[中]返回SSL会话上下文,该上下文封装可用于客户端SSL套接字握手的SSL会话集。
代码示例来源:origin: apache/ignite
/** {@inheritDoc} */
@Override protected SSLSessionContext engineGetClientSessionContext() {
return delegate.getClientSessionContext();
}
代码示例来源:origin: wildfly/wildfly
protected SSLSessionContext engineGetClientSessionContext() {
return delegate.getClientSessionContext();
}
代码示例来源:origin: wildfly/wildfly
@Override
protected SSLSessionContext engineGetClientSessionContext() {
return matcher.getDefaultContext().getClientSessionContext();
}
}
代码示例来源:origin: wildfly/wildfly
@Override
protected SSLSessionContext engineGetClientSessionContext() {
return matcher.getDefaultContext().getClientSessionContext();
}
}
代码示例来源:origin: redisson/redisson
null);
SSLSessionContext sessCtx = ctx.getClientSessionContext();
if (sessionCacheSize > 0) {
sessCtx.setSessionCacheSize((int) Math.min(sessionCacheSize, Integer.MAX_VALUE));
代码示例来源:origin: wildfly/wildfly
null);
SSLSessionContext sessCtx = ctx.getClientSessionContext();
if (sessionCacheSize > 0) {
sessCtx.setSessionCacheSize((int) Math.min(sessionCacheSize, Integer.MAX_VALUE));
代码示例来源:origin: redisson/redisson
/**
* Returns the JDK {@link SSLSessionContext} object held by this context.
*/
@Override
public final SSLSessionContext sessionContext() {
if (isServer()) {
return context().getServerSessionContext();
} else {
return context().getClientSessionContext();
}
}
代码示例来源:origin: io.netty/netty
SSLSessionContext sessCtx = ctx.getClientSessionContext();
if (sessionCacheSize > 0) {
sessCtx.setSessionCacheSize((int) Math.min(sessionCacheSize, Integer.MAX_VALUE));
代码示例来源:origin: wildfly/wildfly
/**
* Returns the JDK {@link SSLSessionContext} object held by this context.
*/
@Override
public final SSLSessionContext sessionContext() {
if (isServer()) {
return context().getServerSessionContext();
} else {
return context().getClientSessionContext();
}
}
代码示例来源:origin: io.netty/netty
/**
* Returns the JDK {@link SSLSessionContext} object held by this context.
*/
public final SSLSessionContext sessionContext() {
if (isServer()) {
return context().getServerSessionContext();
} else {
return context().getClientSessionContext();
}
}
代码示例来源:origin: aws/aws-sdk-java
LOG.debug("connection failed due to SSL error, clearing TLS session cache", sslEx);
clearSessionCache(sslContext.getClientSessionContext(), remoteAddress);
代码示例来源:origin: wildfly/wildfly
sslContext.getClientSessionContext().setSessionCacheSize(optionMap.get(Options.SSL_CLIENT_SESSION_CACHE_SIZE, 0));
sslContext.getClientSessionContext().setSessionTimeout(optionMap.get(Options.SSL_CLIENT_SESSION_TIMEOUT, 0));
sslContext.getServerSessionContext().setSessionCacheSize(optionMap.get(Options.SSL_SERVER_SESSION_CACHE_SIZE, 0));
sslContext.getServerSessionContext().setSessionTimeout(optionMap.get(Options.SSL_SERVER_SESSION_TIMEOUT, 0));
代码示例来源:origin: wildfly/wildfly
SSLSessionContext sessionContext = clientMode ? sslContext.getClientSessionContext() : sslContext.getServerSessionContext();
if (sessionContext != null) {
if (sessionCacheSize >= 0) sessionContext.setSessionCacheSize(sessionCacheSize);
代码示例来源:origin: io.netty/netty-handler
null);
SSLSessionContext sessCtx = ctx.getClientSessionContext();
if (sessionCacheSize > 0) {
sessCtx.setSessionCacheSize((int) Math.min(sessionCacheSize, Integer.MAX_VALUE));
代码示例来源:origin: com.ning/async-http-client
public SSLContext getSSLContext(AsyncHttpClientConfig config) throws GeneralSecurityException {
SSLContext sslContext = config.getSSLContext();
if (sslContext == null) {
sslContext = config.isAcceptAnyCertificate() ? looseTrustManagerSSLContext : SSLContext.getDefault();
if (config.getSslSessionCacheSize() != null)
sslContext.getClientSessionContext().setSessionCacheSize(config.getSslSessionCacheSize());
if (config.getSslSessionTimeout() != null)
sslContext.getClientSessionContext().setSessionTimeout(config.getSslSessionTimeout());
}
return sslContext;
}
}
代码示例来源:origin: io.netty/netty-handler
/**
* Returns the JDK {@link SSLSessionContext} object held by this context.
*/
@Override
public final SSLSessionContext sessionContext() {
if (isServer()) {
return context().getServerSessionContext();
} else {
return context().getClientSessionContext();
}
}
代码示例来源:origin: org.apache.cxf/cxf-rt-transports-http
public static SSLContext getSSLContext(TLSParameterBase parameters) throws GeneralSecurityException {
// TODO do we need to cache the context
String provider = parameters.getJsseProvider();
String protocol = parameters.getSecureSocketProtocol() != null ? parameters
.getSecureSocketProtocol() : "TLS";
SSLContext ctx = provider == null ? SSLContext.getInstance(protocol) : SSLContext
.getInstance(protocol, provider);
KeyManager[] keyManagers = parameters.getKeyManagers();
if (keyManagers == null && parameters instanceof TLSClientParameters) {
keyManagers = org.apache.cxf.configuration.jsse.SSLUtils.getDefaultKeyStoreManagers(LOG);
}
KeyManager[] configuredKeyManagers = configureKeyManagersWithCertAlias(parameters, keyManagers);
TrustManager[] trustManagers = parameters.getTrustManagers();
if (trustManagers == null && parameters instanceof TLSClientParameters) {
trustManagers = org.apache.cxf.configuration.jsse.SSLUtils.getDefaultTrustStoreManagers(LOG);
}
ctx.init(configuredKeyManagers, trustManagers, parameters.getSecureRandom());
if (parameters instanceof TLSClientParameters && ctx.getClientSessionContext() != null) {
ctx.getClientSessionContext().setSessionTimeout(((TLSClientParameters)parameters).getSslCacheTimeout());
}
return ctx;
}
代码示例来源:origin: com.amazonaws/aws-java-sdk-core
LOG.debug("connection failed due to SSL error, clearing TLS session cache", sslEx);
clearSessionCache(sslContext.getClientSessionContext(), remoteAddress);
代码示例来源:origin: io.undertow/undertow-core
@Override
protected SSLSessionContext engineGetClientSessionContext() {
return matcher.getDefaultContext().getClientSessionContext();
}
}
代码示例来源:origin: apache/activemq-artemis
/**
* Returns the JDK {@link SSLSessionContext} object held by this context.
*/
@Override
public final SSLSessionContext sessionContext() {
if (isServer()) {
return context().getServerSessionContext();
} else {
return context().getClientSessionContext();
}
}
内容来源于网络,如有侵权,请联系作者删除!