- java.lang.Object
-
- javax.net.ssl.KeyManagerFactory
-
- io.netty5.handler.ssl.OpenSslX509KeyManagerFactory
-
public final class OpenSslX509KeyManagerFactory extends KeyManagerFactory
SpecialKeyManagerFactorythat pre-compute the keymaterial used whenSslProvider.OPENSSLorSslProvider.OPENSSL_REFCNTis used and so will improve handshake times and its performance. Because the keymaterial is pre-computed any modification to theKeyStoreis ignored afterKeyManagerFactory.init(KeyStore, char[])is called.KeyManagerFactory.init(ManagerFactoryParameters)is not supported by this implementation and so a call to it will always result in anInvalidAlgorithmParameterException.
-
-
Constructor Summary
Constructors Constructor Description OpenSslX509KeyManagerFactory()OpenSslX509KeyManagerFactory(String algorithm, Provider provider)OpenSslX509KeyManagerFactory(Provider provider)
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static OpenSslX509KeyManagerFactorynewEngineBased(File certificateChain, String password)Create a new initializedOpenSslX509KeyManagerFactorywhich loads itsPrivateKeydirectly from anOpenSSL enginevia the ENGINE_load_private_key function.static OpenSslX509KeyManagerFactorynewEngineBased(X509Certificate[] certificateChain, String password)Create a new initializedOpenSslX509KeyManagerFactorywhich loads itsPrivateKeydirectly from anOpenSSL enginevia the ENGINE_load_private_key function.static OpenSslX509KeyManagerFactorynewKeyless(File chain)static OpenSslX509KeyManagerFactorynewKeyless(InputStream chain)static OpenSslX509KeyManagerFactorynewKeyless(X509Certificate... certificateChain)Returns a new initializedOpenSslX509KeyManagerFactorywhich will provide its private key by using theOpenSslPrivateKeyMethod.-
Methods inherited from class javax.net.ssl.KeyManagerFactory
getAlgorithm, getDefaultAlgorithm, getInstance, getInstance, getInstance, getKeyManagers, getProvider, init, init
-
-
-
-
Constructor Detail
-
OpenSslX509KeyManagerFactory
public OpenSslX509KeyManagerFactory()
-
OpenSslX509KeyManagerFactory
public OpenSslX509KeyManagerFactory(Provider provider)
-
OpenSslX509KeyManagerFactory
public OpenSslX509KeyManagerFactory(String algorithm, Provider provider) throws NoSuchAlgorithmException
- Throws:
NoSuchAlgorithmException
-
-
Method Detail
-
newEngineBased
public static OpenSslX509KeyManagerFactory newEngineBased(File certificateChain, String password) throws CertificateException, IOException, KeyStoreException, NoSuchAlgorithmException, UnrecoverableKeyException
Create a new initializedOpenSslX509KeyManagerFactorywhich loads itsPrivateKeydirectly from anOpenSSL enginevia the ENGINE_load_private_key function.
-
newEngineBased
public static OpenSslX509KeyManagerFactory newEngineBased(X509Certificate[] certificateChain, String password) throws CertificateException, IOException, KeyStoreException, NoSuchAlgorithmException, UnrecoverableKeyException
Create a new initializedOpenSslX509KeyManagerFactorywhich loads itsPrivateKeydirectly from anOpenSSL enginevia the ENGINE_load_private_key function.
-
newKeyless
public static OpenSslX509KeyManagerFactory newKeyless(File chain) throws CertificateException, IOException, KeyStoreException, NoSuchAlgorithmException, UnrecoverableKeyException
-
newKeyless
public static OpenSslX509KeyManagerFactory newKeyless(InputStream chain) throws CertificateException, IOException, KeyStoreException, NoSuchAlgorithmException, UnrecoverableKeyException
-
newKeyless
public static OpenSslX509KeyManagerFactory newKeyless(X509Certificate... certificateChain) throws CertificateException, IOException, KeyStoreException, NoSuchAlgorithmException, UnrecoverableKeyException
Returns a new initializedOpenSslX509KeyManagerFactorywhich will provide its private key by using theOpenSslPrivateKeyMethod.
-
-