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

x33g5p2x  于2022-01-25 转载在 其他  
字(3.2k)|赞(0)|评价(0)|浏览(291)

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

OpenSsl.isCipherSuiteAvailable介绍

[英]Returns true if and only if the specified cipher suite is available in OpenSSL. Both Java-style cipher suite and OpenSSL-style cipher suite are accepted.
[中]当且仅当指定的密码套件在OpenSSL中可用时,返回true。Java风格的密码套件和OpenSSL风格的密码套件都被接受。

代码示例

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

  1. if (!OpenSsl.isCipherSuiteAvailable(converted)) {
  2. throw new IllegalArgumentException("unsupported cipher suite: " + c + '(' + converted + ')');

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

  1. if (!OpenSsl.isCipherSuiteAvailable(converted)) {
  2. throw new IllegalArgumentException("unsupported cipher suite: " + c + '(' + converted + ')');

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

  1. if (!OpenSsl.isCipherSuiteAvailable(converted)) {
  2. throw new IllegalArgumentException("unsupported cipher suite: " + c + '(' + converted + ')');

代码示例来源:origin: logstash-plugins/logstash-input-beats

  1. public SslSimpleBuilder setCipherSuites(String[] ciphersSuite) throws IllegalArgumentException {
  2. for(String cipher : ciphersSuite) {
  3. if(!OpenSsl.isCipherSuiteAvailable(cipher)) {
  4. throw new IllegalArgumentException("Cipher `" + cipher + "` is not available");
  5. } else {
  6. logger.debug("Cipher is supported: " + cipher);
  7. }
  8. }
  9. ciphers = ciphersSuite;
  10. return this;
  11. }

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

  1. if (!OpenSsl.isCipherSuiteAvailable(converted)) {
  2. throw new IllegalArgumentException("unsupported cipher suite: " + c + '(' + converted + ')');

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

  1. if (!OpenSsl.isCipherSuiteAvailable(converted)) {
  2. throw new IllegalArgumentException("unsupported cipher suite: " + c + '(' + converted + ')');

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

  1. if (!OpenSsl.isCipherSuiteAvailable(converted)) {
  2. throw new IllegalArgumentException("unsupported cipher suite: " + c + '(' + converted + ')');

代码示例来源:origin: floragunncom/search-guard-ssl

  1. final Set<String> openSSLSecureHttpCiphers = new HashSet<>();
  2. for (final String secure : secureHttpSSLCiphers) {
  3. if (OpenSsl.isCipherSuiteAvailable(secure)) {
  4. openSSLSecureHttpCiphers.add(secure);
  5. final Set<String> openSSLSecureTransportCiphers = new HashSet<>();
  6. for (final String secure : secureTransportSSLCiphers) {
  7. if (OpenSsl.isCipherSuiteAvailable(secure)) {
  8. openSSLSecureTransportCiphers.add(secure);

代码示例来源:origin: floragunncom/search-guard-ssl

  1. @Test
  2. public void testAvailCiphersOpenSSL() throws Exception {
  3. Assume.assumeTrue(OpenSsl.isAvailable());
  4. // Set<String> openSSLAvailCiphers = new
  5. // HashSet<>(OpenSsl.availableCipherSuites());
  6. // System.out.println("OpenSSL available ciphers: "+openSSLAvailCiphers);
  7. // ECDHE-RSA-AES256-SHA, ECDH-ECDSA-AES256-SHA, DH-DSS-DES-CBC-SHA,
  8. // ADH-AES256-SHA256, ADH-CAMELLIA128-SHA
  9. final Set<String> openSSLSecureCiphers = new HashSet<>();
  10. for (final String secure : SSLConfigConstants.getSecureSSLCiphers(Settings.EMPTY, false)) {
  11. if (OpenSsl.isCipherSuiteAvailable(secure)) {
  12. openSSLSecureCiphers.add(secure);
  13. }
  14. }
  15. System.out.println("OpenSSL secure ciphers: " + openSSLSecureCiphers);
  16. Assert.assertTrue(openSSLSecureCiphers.size() > 0);
  17. }

相关文章