Netty 4.0.21.Final OpenSSL客户端上下文支持

时间:2014-07-29 21:10:03

标签: openssl netty

此问题基于netty-4.0.21.Final,这是当前稳定的推荐版本。

Netty项目何时支持OpenSSL客户端ssl上下文?现在似乎不支持此功能。

/**
 * Creates a new client-side {@link SslContext}.
 *
 * @param provider the {@link SslContext} implementation to use.
 *                 {@code null} to use the current default one.
 * @param certChainFile an X.509 certificate chain file in PEM format.
 *                      {@code null} to use the system default
 * @param trustManagerFactory the {@link TrustManagerFactory} that provides the {@link TrustManager}s
 *                            that verifies the certificates sent from servers.
 *                            {@code null} to use the default.
 * @param ciphers the cipher suites to enable, in the order of preference.
 *                {@code null} to use the default cipher suites.
 * @param nextProtocols the application layer protocols to accept, in the order of preference.
 *                      {@code null} to disable TLS NPN/ALPN extension.
 * @param sessionCacheSize the size of the cache used for storing SSL session objects.
 *                         {@code 0} to use the default value.
 * @param sessionTimeout the timeout for the cached SSL session objects, in seconds.
 *                       {@code 0} to use the default value.
 *
 * @return a new client-side {@link SslContext}
 */
public static SslContext newClientContext(
        SslProvider provider,
        File certChainFile, TrustManagerFactory trustManagerFactory,
        Iterable<String> ciphers, Iterable<String> nextProtocols,
        long sessionCacheSize, long sessionTimeout) throws SSLException {

    if (provider != null && provider != SslProvider.JDK) {
        throw new SSLException("client context unsupported for: " + provider);
    }

    return new JdkSslClientContext(
            certChainFile, trustManagerFactory,
            ciphers, nextProtocols, sessionCacheSize, sessionTimeout);
}

1 个答案:

答案 0 :(得分:2)

没有时间表可以为客户端提供openssl支持。它不是高优先级的atm,但我们喜欢贡献