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

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

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

SslContext.buildKeyStore介绍

[英]Generates a new KeyStore.
[中]生成一个新的密钥库。

代码示例

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

static KeyManagerFactory buildKeyManagerFactory(X509Certificate[] certChainFile,
                        String keyAlgorithm, PrivateKey key,
                        String keyPassword, KeyManagerFactory kmf)
    throws KeyStoreException, NoSuchAlgorithmException, IOException,
    CertificateException, UnrecoverableKeyException {
  char[] keyPasswordChars = keyStorePassword(keyPassword);
  KeyStore ks = buildKeyStore(certChainFile, key, keyPasswordChars);
  return buildKeyManagerFactory(ks, keyAlgorithm, keyPasswordChars, kmf);
}

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

static KeyManagerFactory buildKeyManagerFactory(X509Certificate[] certChainFile,
                        String keyAlgorithm, PrivateKey key,
                        String keyPassword, KeyManagerFactory kmf)
    throws KeyStoreException, NoSuchAlgorithmException, IOException,
    CertificateException, UnrecoverableKeyException {
  char[] keyPasswordChars = keyStorePassword(keyPassword);
  KeyStore ks = buildKeyStore(certChainFile, key, keyPasswordChars);
  return buildKeyManagerFactory(ks, keyAlgorithm, keyPasswordChars, kmf);
}

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

static KeyManagerFactory buildKeyManagerFactory(X509Certificate[] certChainFile,
                        String keyAlgorithm, PrivateKey key,
                        String keyPassword, KeyManagerFactory kmf)
    throws KeyStoreException, NoSuchAlgorithmException, IOException,
    CertificateException, UnrecoverableKeyException {
  char[] keyPasswordChars = keyStorePassword(keyPassword);
  KeyStore ks = buildKeyStore(certChainFile, key, keyPasswordChars);
  return buildKeyManagerFactory(ks, keyAlgorithm, keyPasswordChars, kmf);
}

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

static KeyManagerFactory buildKeyManagerFactory(X509Certificate[] certChainFile,
                          String keyAlgorithm, PrivateKey key,
                          String keyPassword, KeyManagerFactory kmf)
      throws KeyStoreException, NoSuchAlgorithmException, IOException,
      CertificateException, UnrecoverableKeyException {
    char[] keyPasswordChars = keyPassword == null ? EmptyArrays.EMPTY_CHARS : keyPassword.toCharArray();
    KeyStore ks = buildKeyStore(certChainFile, key, keyPasswordChars);
    // Set up key manager factory to use our key store
    if (kmf == null) {
      kmf = KeyManagerFactory.getInstance(keyAlgorithm);
    }
    kmf.init(ks, keyPasswordChars);

    return kmf;
  }
}

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

static KeyManagerFactory buildKeyManagerFactory(X509Certificate[] certChainFile,
                          String keyAlgorithm, PrivateKey key,
                          String keyPassword, KeyManagerFactory kmf)
      throws KeyStoreException, NoSuchAlgorithmException, IOException,
      CertificateException, UnrecoverableKeyException {
    char[] keyPasswordChars = keyPassword == null ? EmptyArrays.EMPTY_CHARS : keyPassword.toCharArray();
    KeyStore ks = buildKeyStore(certChainFile, key, keyPasswordChars);
    // Set up key manager factory to use our key store
    if (kmf == null) {
      kmf = KeyManagerFactory.getInstance(keyAlgorithm);
    }
    kmf.init(ks, keyPasswordChars);

    return kmf;
  }
}

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

static KeyManagerFactory buildKeyManagerFactory(X509Certificate[] certChainFile,
                        String keyAlgorithm, PrivateKey key,
                        String keyPassword, KeyManagerFactory kmf)
    throws KeyStoreException, NoSuchAlgorithmException, IOException,
    CertificateException, UnrecoverableKeyException {
  char[] keyPasswordChars = keyStorePassword(keyPassword);
  KeyStore ks = buildKeyStore(certChainFile, key, keyPasswordChars);
  return buildKeyManagerFactory(ks, keyAlgorithm, keyPasswordChars, kmf);
}

相关文章