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

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

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

SSLContext.getSupportedSSLParameters介绍

[英]Returns SSL handshake parameters for SSLSockets that includes all supported cipher suites and protocols.
[中]返回SSLSockets的SSL握手参数,其中包括所有受支持的密码套件和协议。

代码示例

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

/** {@inheritDoc} */
  @Override protected SSLParameters engineGetSupportedSSLParameters() {
    return delegate.getSupportedSSLParameters();
  }
}

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

protected SSLParameters engineGetSupportedSSLParameters() {
  return delegate.getSupportedSSLParameters();
}

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

protected SSLParameters engineGetSupportedSSLParameters() {
    final SSLContext delegate = getDelegate();
    return sslConfigurator.getSupportedSSLParameters(delegate, delegate.getSupportedSSLParameters());
  }
}

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

public SSLParameters getDefaultSSLParameters(final SSLContext sslContext, final SSLParameters original) {
  final SSLParameters supportedSSLParameters = sslContext.getSupportedSSLParameters();
  configure(original, supportedSSLParameters.getProtocols(), supportedSSLParameters.getCipherSuites());
  return original;
}

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

protected OptionMap getSSLOptions(SSLContext sslContext) {
  Builder builder = OptionMap.builder().addAll(commonOptions);
  builder.addAll(socketOptions);
  builder.set(Options.USE_DIRECT_BUFFERS, true);
  if (cipherSuites != null) {
    String[] cipherList = CipherSuiteSelector.fromString(cipherSuites).evaluate(sslContext.getSupportedSSLParameters().getCipherSuites());
    builder.setSequence((Option<Sequence<String>>) HttpsListenerResourceDefinition.ENABLED_CIPHER_SUITES.getOption(), cipherList);
  }
  return builder.getMap();
}

代码示例来源:origin: rhuss/jolokia

SSLParameters parameters = sslContext.getSupportedSSLParameters();

代码示例来源:origin: stackoverflow.com

SSLParameters params = context.getSupportedSSLParameters();
List<String> enabledCiphers = new ArrayList<String>();
for (String cipher : params.getCipherSuites()) {

代码示例来源:origin: org.apache.ignite/ignite-core

/** {@inheritDoc} */
  @Override protected SSLParameters engineGetSupportedSSLParameters() {
    return delegate.getSupportedSSLParameters();
  }
}

代码示例来源:origin: org.eclipse.jetty/jetty-util

SSLParameters supported = context.getSupportedSSLParameters();
selectCipherSuites(enabled.getCipherSuites(), supported.getCipherSuites());
selectProtocols(enabled.getProtocols(), supported.getProtocols());

代码示例来源:origin: com.aerospike/aerospike-client

/**
 * Filter cipher suites.  For internal use only.
 */
@Override
public String[] filterCipherSuites(Iterable<String> ciphers, List<String> defaultCiphers, Set<String> supportedCiphers) {
  if (tlsPolicy.ciphers != null) {
    return tlsPolicy.ciphers;
  }
  return tlsPolicy.context.getSupportedSSLParameters().getCipherSuites();
}

代码示例来源:origin: org.wildfly.core/wildfly-domain-management

@Override
public String[] getSupportedCipherSuites() {
  if(factory == null) {
    return wrapped.wrapped.getSupportedSSLParameters().getCipherSuites();
  }
  return factory.getSupportedCipherSuites();
}

代码示例来源:origin: org.apache.tomcat/tomcat-catalina

/**
 * @return the list of supported ssl protocols by the default
 *         {@link SSLContext}
 */
private String[] getSupportedSslProtocols() {
  try {
    SSLContext sslContext = SSLContext.getDefault();
    return sslContext.getSupportedSSLParameters().getProtocols();
  } catch (NoSuchAlgorithmException e) {
    throw new RuntimeException(sm.getString("jndiRealm.exception"), e);
  }
}

代码示例来源:origin: org.jppf/jppf-common

/**
  * 
  * @param context .
  */
 private static void printSupportedParameters(final SSLContext context) {
  final SSLParameters params = context.getSupportedSSLParameters();
  if (debugEnabled) log.debug("supported protocols: {}, supported cipher suites: {}", Arrays.asList(params.getProtocols()), Arrays.asList(params.getCipherSuites()));
 }
}

代码示例来源:origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core

/**
 * @return the list of supported ssl protocols by the default
 *         {@link SSLContext}
 */
private String[] getSupportedSslProtocols() {
  try {
    SSLContext sslContext = SSLContext.getDefault();
    return sslContext.getSupportedSSLParameters().getProtocols();
  } catch (NoSuchAlgorithmException e) {
    throw new RuntimeException(sm.getString("jndiRealm.exception"), e);
  }
}

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

protected SSLParameters engineGetSupportedSSLParameters() {
    final SSLContext delegate = getDelegate();
    return sslConfigurator.getSupportedSSLParameters(delegate, delegate.getSupportedSSLParameters());
  }
}

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

protected SSLParameters engineGetSupportedSSLParameters() {
    final SSLContext delegate = getDelegate();
    return sslConfigurator.getSupportedSSLParameters(delegate, delegate.getSupportedSSLParameters());
  }
}

代码示例来源:origin: org.mule.runtime/mule-core

public RestrictedSSLSocketFactory(SSLContext sslContext, String[] cipherSuites, String[] protocols) {
 this.sslSocketFactory = sslContext.getSocketFactory();
 if (cipherSuites == null) {
  cipherSuites = sslSocketFactory.getDefaultCipherSuites();
 }
 this.enabledCipherSuites = ArrayUtils.intersection(cipherSuites, sslSocketFactory.getSupportedCipherSuites());
 this.defaultCipherSuites = ArrayUtils.intersection(cipherSuites, sslSocketFactory.getDefaultCipherSuites());
 if (protocols == null) {
  protocols = sslContext.getDefaultSSLParameters().getProtocols();
 }
 this.enabledProtocols = ArrayUtils.intersection(protocols, sslContext.getSupportedSSLParameters().getProtocols());
}

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

public SSLParameters getDefaultSSLParameters(final SSLContext sslContext, final SSLParameters original) {
  final SSLParameters supportedSSLParameters = sslContext.getSupportedSSLParameters();
  configure(original, supportedSSLParameters.getProtocols(), supportedSSLParameters.getCipherSuites());
  return original;
}

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

protected OptionMap getSSLOptions(SSLContext sslContext) {
  Builder builder = OptionMap.builder().addAll(commonOptions);
  builder.addAll(socketOptions);
  builder.set(Options.USE_DIRECT_BUFFERS, true);
  if (cipherSuites != null) {
    String[] cipherList = CipherSuiteSelector.fromString(cipherSuites).evaluate(sslContext.getSupportedSSLParameters().getCipherSuites());
    builder.setSequence((Option<Sequence<String>>) HttpsListenerResourceDefinition.ENABLED_CIPHER_SUITES.getOption(), cipherList);
  }
  return builder.getMap();
}

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

protected OptionMap getSSLOptions(SSLContext sslContext) {
  Builder builder = OptionMap.builder().addAll(commonOptions);
  builder.addAll(socketOptions);
  builder.set(Options.USE_DIRECT_BUFFERS, true);
  if (cipherSuites != null) {
    String[] cipherList = CipherSuiteSelector.fromString(cipherSuites).evaluate(sslContext.getSupportedSSLParameters().getCipherSuites());
    builder.setSequence((Option<Sequence<String>>) HttpsListenerResourceDefinition.ENABLED_CIPHER_SUITES.getOption(), cipherList);
  }
  return builder.getMap();
}

相关文章