本文整理了Java中javax.net.ssl.SSLServerSocket.getSSLParameters()
方法的一些代码示例,展示了SSLServerSocket.getSSLParameters()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。SSLServerSocket.getSSLParameters()
方法的具体详情如下:
包路径:javax.net.ssl.SSLServerSocket
类名称:SSLServerSocket
方法名:getSSLParameters
暂无
代码示例来源:origin: wildfly/wildfly
public SSLParameters getSSLParameters() {
return delegate.getSSLParameters();
}
代码示例来源:origin: apache/zookeeper
private SSLServerSocket configureSSLServerSocket(SSLServerSocket socket) {
SSLParameters sslParameters = socket.getSSLParameters();
configureSslParameters(sslParameters, false);
socket.setSSLParameters(sslParameters);
socket.setUseClientMode(false);
return socket;
}
代码示例来源:origin: wildfly/wildfly
public void configure(final SSLContext context, final SSLServerSocket sslServerSocket) {
sslServerSocket.setUseClientMode(clientMode);
final SSLParameters sslParameters = sslServerSocket.getSSLParameters();
configure(sslParameters, sslServerSocket.getSupportedProtocols(), sslServerSocket.getSupportedCipherSuites());
sslServerSocket.setSSLParameters(sslParameters);
}
代码示例来源:origin: apache/flume
private TServerTransport getSSLServerTransport() {
try {
TServerTransport transport;
TSSLTransportFactory.TSSLTransportParameters params =
new TSSLTransportFactory.TSSLTransportParameters();
params.setKeyStore(getKeystore(), getKeystorePassword(),
KeyManagerFactory.getDefaultAlgorithm(), getKeystoreType());
transport = TSSLTransportFactory.getServerSocket(
port, 120000, InetAddress.getByName(bindAddress), params);
ServerSocket serverSock = ((TServerSocket) transport).getServerSocket();
if (serverSock instanceof SSLServerSocket) {
SSLServerSocket sslServerSock = (SSLServerSocket) serverSock;
SSLParameters sslParameters = sslServerSock.getSSLParameters();
sslServerSock.setEnabledCipherSuites(getFilteredCipherSuites(sslParameters));
sslServerSock.setEnabledProtocols(getFilteredProtocols(sslParameters));
}
return transport;
} catch (Throwable throwable) {
throw new FlumeException("Cannot start Thrift source.", throwable);
}
}
代码示例来源:origin: org.eclipse.jetty/jetty-util
public SSLServerSocket newSslServerSocket(String host, int port, int backlog) throws IOException
{
checkIsStarted();
SSLContext context = getSslContext();
SSLServerSocketFactory factory = context.getServerSocketFactory();
SSLServerSocket socket =
(SSLServerSocket)(host == null ?
factory.createServerSocket(port, backlog) :
factory.createServerSocket(port, backlog, InetAddress.getByName(host)));
socket.setSSLParameters(customize(socket.getSSLParameters()));
return socket;
}
代码示例来源:origin: apache/karaf
public SSLParameters getSSLParameters() {
return ss.getSSLParameters();
}
代码示例来源:origin: org.wildfly.security/wildfly-elytron-ssl
public SSLParameters getSSLParameters() {
return delegate.getSSLParameters();
}
代码示例来源:origin: org.wildfly.security/wildfly-elytron
public SSLParameters getSSLParameters() {
return delegate.getSSLParameters();
}
代码示例来源:origin: org.jboss.eap/wildfly-client-all
public SSLParameters getSSLParameters() {
return delegate.getSSLParameters();
}
代码示例来源:origin: jenkinsci/winstone
public SSLServerSocket newSslServerSocket(String host, int port, int backlog) throws IOException
{
checkIsStarted();
SSLContext context = getSslContext();
SSLServerSocketFactory factory = context.getServerSocketFactory();
SSLServerSocket socket =
(SSLServerSocket)(host == null ?
factory.createServerSocket(port, backlog) :
factory.createServerSocket(port, backlog, InetAddress.getByName(host)));
socket.setSSLParameters(customize(socket.getSSLParameters()));
return socket;
}
代码示例来源:origin: com.atlassian.tunnel/atlassian-tunnel
public static void configureSocket(final SSLServerSocket ssocket)
{
if (!disableClientAuth)
{
ssocket.setNeedClientAuth(true);
}
final AtomicReference<SecureCipherSuitesAndProtocols> socketConfiguration = serverSocketConfiguration;
synchronized (socketConfiguration)
{
if (socketConfiguration.get() == null)
{
socketConfiguration.set(new SecureCipherSuitesAndProtocols(ssocket.getSupportedCipherSuites(), ssocket.getSupportedProtocols()));
log.debug("Server: " + Arrays.toString(socketConfiguration.get().getSecureCipherSuites()));
}
}
ssocket.setEnabledCipherSuites(socketConfiguration.get().getSecureCipherSuites());
ssocket.setEnabledProtocols(socketConfiguration.get().getSecureProtocols());
ssocket.getSSLParameters().setUseCipherSuitesOrder(true);
//when changing more SSL parameters here, make sure they get propagated in SSLSocketDecorator#configureSsl
}
代码示例来源:origin: org.wildfly.security/wildfly-elytron
public void configure(final SSLContext context, final SSLServerSocket sslServerSocket) {
sslServerSocket.setUseClientMode(clientMode);
final SSLParameters sslParameters = sslServerSocket.getSSLParameters();
configure(sslParameters, sslServerSocket.getSupportedProtocols(), sslServerSocket.getSupportedCipherSuites());
sslServerSocket.setSSLParameters(sslParameters);
}
代码示例来源:origin: org.wildfly.security/wildfly-elytron-ssl
public void configure(final SSLContext context, final SSLServerSocket sslServerSocket) {
sslServerSocket.setUseClientMode(clientMode);
final SSLParameters sslParameters = sslServerSocket.getSSLParameters();
configure(sslParameters, sslServerSocket.getSupportedProtocols(), sslServerSocket.getSupportedCipherSuites());
sslServerSocket.setSSLParameters(sslParameters);
}
代码示例来源:origin: org.jboss.eap/wildfly-client-all
public void configure(final SSLContext context, final SSLServerSocket sslServerSocket) {
sslServerSocket.setUseClientMode(clientMode);
final SSLParameters sslParameters = sslServerSocket.getSSLParameters();
configure(sslParameters, sslServerSocket.getSupportedProtocols(), sslServerSocket.getSupportedCipherSuites());
sslServerSocket.setSSLParameters(sslParameters);
}
代码示例来源:origin: org.apache.cassandra/cassandra-all
/** Sets relevant socket options specified in encryption settings */
private static void prepareSocket(SSLServerSocket serverSocket, EncryptionOptions options)
{
String[] suites = filterCipherSuites(serverSocket.getSupportedCipherSuites(), options.cipher_suites);
if(options.require_endpoint_verification)
{
SSLParameters sslParameters = serverSocket.getSSLParameters();
sslParameters.setEndpointIdentificationAlgorithm("HTTPS");
serverSocket.setSSLParameters(sslParameters);
}
serverSocket.setEnabledCipherSuites(suites);
serverSocket.setNeedClientAuth(options.require_client_auth);
}
代码示例来源:origin: jsevellec/cassandra-unit
/** Sets relevant socket options specified in encryption settings */
private static void prepareSocket(SSLServerSocket serverSocket, EncryptionOptions options)
{
String[] suites = filterCipherSuites(serverSocket.getSupportedCipherSuites(), options.cipher_suites);
if(options.require_endpoint_verification)
{
SSLParameters sslParameters = serverSocket.getSSLParameters();
sslParameters.setEndpointIdentificationAlgorithm("HTTPS");
serverSocket.setSSLParameters(sslParameters);
}
serverSocket.setEnabledCipherSuites(suites);
serverSocket.setNeedClientAuth(options.require_client_auth);
}
代码示例来源:origin: com.strapdata.cassandra/cassandra-all
/** Sets relevant socket options specified in encryption settings */
private static void prepareSocket(SSLServerSocket serverSocket, EncryptionOptions options)
{
String[] suites = filterCipherSuites(serverSocket.getSupportedCipherSuites(), options.cipher_suites);
if(options.require_endpoint_verification)
{
SSLParameters sslParameters = serverSocket.getSSLParameters();
sslParameters.setEndpointIdentificationAlgorithm("HTTPS");
serverSocket.setSSLParameters(sslParameters);
}
serverSocket.setEnabledCipherSuites(suites);
serverSocket.setNeedClientAuth(options.require_client_auth);
}
代码示例来源:origin: org.apache.flume/flume-ng-core
private TServerTransport getSSLServerTransport() {
try {
TServerTransport transport;
TSSLTransportFactory.TSSLTransportParameters params =
new TSSLTransportFactory.TSSLTransportParameters();
params.setKeyStore(getKeystore(), getKeystorePassword(),
KeyManagerFactory.getDefaultAlgorithm(), getKeystoreType());
transport = TSSLTransportFactory.getServerSocket(
port, 120000, InetAddress.getByName(bindAddress), params);
ServerSocket serverSock = ((TServerSocket) transport).getServerSocket();
if (serverSock instanceof SSLServerSocket) {
SSLServerSocket sslServerSock = (SSLServerSocket) serverSock;
SSLParameters sslParameters = sslServerSock.getSSLParameters();
sslServerSock.setEnabledCipherSuites(getFilteredCipherSuites(sslParameters));
sslServerSock.setEnabledProtocols(getFilteredProtocols(sslParameters));
}
return transport;
} catch (Throwable throwable) {
throw new FlumeException("Cannot start Thrift source.", throwable);
}
}
内容来源于网络,如有侵权,请联系作者删除!