javax.net.ssl.SSLServerSocket.getSupportedProtocols()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(6.0k)|赞(0)|评价(0)|浏览(137)

本文整理了Java中javax.net.ssl.SSLServerSocket.getSupportedProtocols()方法的一些代码示例,展示了SSLServerSocket.getSupportedProtocols()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。SSLServerSocket.getSupportedProtocols()方法的具体详情如下:
包路径:javax.net.ssl.SSLServerSocket
类名称:SSLServerSocket
方法名:getSupportedProtocols

SSLServerSocket.getSupportedProtocols介绍

[英]Returns the names of the supported protocols.
[中]返回支持的协议的名称。

代码示例

代码示例来源:origin: wildfly/wildfly

public String[] getSupportedProtocols() {
  return delegate.getSupportedProtocols();
}

代码示例来源:origin: wildfly/wildfly

public void setSSLParameters(final SSLContext sslContext, final SSLServerSocket sslServerSocket, final SSLParameters parameters) {
  sslServerSocket.setSSLParameters(redefine(parameters, sslServerSocket.getSupportedCipherSuites(), sslServerSocket.getSupportedProtocols()));
}

代码示例来源:origin: NanoHttpd/nanohttpd

@Override
public ServerSocket create() throws IOException {
  SSLServerSocket ss = null;
  ss = (SSLServerSocket) this.sslServerSocketFactory.createServerSocket();
  if (this.sslProtocols != null) {
    ss.setEnabledProtocols(this.sslProtocols);
  } else {
    ss.setEnabledProtocols(ss.getSupportedProtocols());
  }
  ss.setUseClientMode(false);
  ss.setWantClientAuth(false);
  ss.setNeedClientAuth(false);
  return ss;
}

代码示例来源: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: camunda/camunda-bpm-platform

public String[] getSupportedProtocols() {
 return delegate.getSupportedProtocols();
}

代码示例来源:origin: javaee/glassfish

protected String[] getEnabledProtocols(SSLServerSocket socket, String requestedProtocols) {
  String[] supportedProtocols = socket.getSupportedProtocols();
  String[] enabledProtocols = null;
  if (requestedProtocols != null) {

代码示例来源:origin: i2p/i2p.i2p

/**
 * Select protocols and cipher suites to be used
 * based on configured inclusion and exclusion lists
 * as well as enabled and supported protocols and cipher suites.
 *
 * Adapted from Jetty SslContextFactory.java
 *
 * @since 0.9.16
 */
public static void setProtocolsAndCiphers(SSLServerSocket socket) {
  String[] p = selectProtocols(socket.getEnabledProtocols(),
                 socket.getSupportedProtocols());
  for (int i = 0; i < p.length; i++) {
    // if we left SSLv3 in there, we don't support TLS,
    // so we should't remove the SSL ciphers
    if (p[i].equals("SSLv3"))
      return;
  }
  socket.setEnabledProtocols(p);
  socket.setEnabledCipherSuites(selectCipherSuites(socket.getEnabledCipherSuites(),
                           socket.getSupportedCipherSuites()));
}

代码示例来源:origin: tony19/logback-android

public String[] getSupportedProtocols() {
 return delegate.getSupportedProtocols();
}

代码示例来源:origin: org.wildfly.security/wildfly-elytron

public String[] getSupportedProtocols() {
  return delegate.getSupportedProtocols();
}

代码示例来源:origin: org.jboss.eap/wildfly-client-all

public String[] getSupportedProtocols() {
  return delegate.getSupportedProtocols();
}

代码示例来源:origin: com.hynnet/logback-core

public String[] getSupportedProtocols() {
 return delegate.getSupportedProtocols();
}

代码示例来源:origin: apache/karaf

public String[] getSupportedProtocols() {
  return ss.getSupportedProtocols();
}

代码示例来源:origin: tomcat-slf4j-logback/tomcat-slf4j-logback

public String[] getSupportedProtocols() {
  return delegate.getSupportedProtocols();
}

代码示例来源:origin: dCache/dcache

private void setCipherSuiteAndProtocol(SSLServerSocket socket)
  {
    String[] cipherSuites = toArray(filter(asList(socket.getSupportedCipherSuites()),
                        not(in(bannedCiphers))), String.class);
    String[] protocols = toArray(filter(asList(socket.getSupportedProtocols()),
                        not(in(bannedProtocols))), String.class);
    socket.setEnabledCipherSuites(cipherSuites);
    socket.setEnabledProtocols(protocols);
    socket.setWantClientAuth(true);
    socket.setUseClientMode(false);
  }
}

代码示例来源:origin: org.jboss.eap/wildfly-client-all

public void setSSLParameters(final SSLContext sslContext, final SSLServerSocket sslServerSocket, final SSLParameters parameters) {
  sslServerSocket.setSSLParameters(redefine(parameters, sslServerSocket.getSupportedCipherSuites(), sslServerSocket.getSupportedProtocols()));
}

代码示例来源:origin: org.wildfly.security/wildfly-elytron

public void setSSLParameters(final SSLContext sslContext, final SSLServerSocket sslServerSocket, final SSLParameters parameters) {
  sslServerSocket.setSSLParameters(redefine(parameters, sslServerSocket.getSupportedCipherSuites(), sslServerSocket.getSupportedProtocols()));
}

代码示例来源:origin: proninyaroslav/libretorrent

@Override
public ServerSocket create() throws IOException {
  SSLServerSocket ss = null;
  ss = (SSLServerSocket) this.sslServerSocketFactory.createServerSocket();
  if (this.sslProtocols != null) {
    ss.setEnabledProtocols(this.sslProtocols);
  } else {
    ss.setEnabledProtocols(ss.getSupportedProtocols());
  }
  ss.setUseClientMode(false);
  ss.setWantClientAuth(false);
  ss.setNeedClientAuth(false);
  return ss;
}

代码示例来源: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);
}

相关文章