io.netty.handler.ssl.SslContext.cipherSuites()方法的使用及代码示例

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

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

SslContext.cipherSuites介绍

[英]Returns the list of enabled cipher suites, in the order of preference.
[中]按首选顺序返回已启用密码套件的列表。

代码示例

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

@Override
public final List<String> cipherSuites() {
  return ctx.cipherSuites();
}

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

@Override
public final List<String> cipherSuites() {
  return ctx.cipherSuites();
}

代码示例来源:origin: eclipse-vertx/vert.x

@Test
public void testUseJdkCiphersWhenNotSpecified() throws Exception {
 SSLContext context = SSLContext.getInstance("TLS");
 context.init(null, null, null);
 SSLEngine engine = context.createSSLEngine();
 String[] expected = engine.getEnabledCipherSuites();
 SSLHelper helper = new SSLHelper(new HttpClientOptions(),
   Cert.CLIENT_JKS.get(),
   Trust.SERVER_JKS.get());
 SslContext ctx = helper.getContext((VertxInternal) vertx);
 assertEquals(new HashSet<>(Arrays.asList(expected)), new HashSet<>(ctx.cipherSuites()));
}

代码示例来源:origin: io.netty/netty-handler

@Override
public final List<String> cipherSuites() {
  return ctx.cipherSuites();
}

代码示例来源:origin: eclipse-vertx/vert.x

@Test
public void testUseOpenSSLCiphersWhenNotSpecified() throws Exception {
 Set<String> expected = OpenSsl.availableOpenSslCipherSuites();
 SSLHelper helper = new SSLHelper(
   new HttpClientOptions().setOpenSslEngineOptions(new OpenSSLEngineOptions()),
   Cert.CLIENT_PEM.get(),
   Trust.SERVER_PEM.get());
 SslContext ctx = helper.getContext((VertxInternal) vertx);
 assertEquals(expected, new HashSet<>(ctx.cipherSuites()));
}

代码示例来源:origin: io.vertx/vertx-core

@Test
public void testUseJdkCiphersWhenNotSpecified() throws Exception {
 SSLContext context = SSLContext.getInstance("TLS");
 context.init(null, null, null);
 SSLEngine engine = context.createSSLEngine();
 String[] expected = engine.getEnabledCipherSuites();
 SSLHelper helper = new SSLHelper(new HttpClientOptions(),
   Cert.CLIENT_JKS.get(),
   Trust.SERVER_JKS.get());
 SslContext ctx = helper.getContext((VertxInternal) vertx);
 assertEquals(new HashSet<>(Arrays.asList(expected)), new HashSet<>(ctx.cipherSuites()));
}

代码示例来源:origin: org.apache.activemq/artemis-jms-client-all

@Override
public final List<String> cipherSuites() {
  return ctx.cipherSuites();
}

代码示例来源:origin: apache/activemq-artemis

@Override
public final List<String> cipherSuites() {
  return ctx.cipherSuites();
}

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

@Override
public final List<String> cipherSuites() {
  return ctx.cipherSuites();
}

代码示例来源:origin: io.vertx/vertx-core

@Test
public void testUseOpenSSLCiphersWhenNotSpecified() throws Exception {
 Set<String> expected = OpenSsl.availableOpenSslCipherSuites();
 SSLHelper helper = new SSLHelper(
   new HttpClientOptions().setOpenSslEngineOptions(new OpenSSLEngineOptions()),
   Cert.CLIENT_PEM.get(),
   Trust.SERVER_PEM.get());
 SslContext ctx = helper.getContext((VertxInternal) vertx);
 assertEquals(expected, new HashSet<>(ctx.cipherSuites()));
}

代码示例来源:origin: com.google.cloud.genomics/google-genomics-utils

private static ManagedChannel getGenomicsManagedChannel(List<ClientInterceptor> interceptors)
  throws SSLException {
 // Java 8's implementation of GCM ciphers is extremely slow. Therefore we disable
 // them here.
 List<String> defaultCiphers = GrpcSslContexts.forClient().ciphers(null).build().cipherSuites();
 List<String> performantCiphers = new ArrayList<>();
 for (String cipher : defaultCiphers) {
  if (!cipher.contains("GCM")) {
   performantCiphers.add(cipher);
  }
 }
 return NettyChannelBuilder.forAddress(GENOMICS_ENDPOINT, 443)
   .negotiationType(NegotiationType.TLS)
   .sslContext(GrpcSslContexts.forClient().ciphers(performantCiphers).build())
   .intercept(interceptors)
   .build();
}

代码示例来源:origin: io.netty/netty-testsuite

break;
case SERVER_INITIATED:
  r = new Renegotiation(rt, sc.cipherSuites().get(sc.cipherSuites().size() - 1));
  break;
case CLIENT_INITIATED:
  r = new Renegotiation(rt, cc.cipherSuites().get(cc.cipherSuites().size() - 1));
  break;
default:

相关文章