Package io.netty.handler.ssl
Class OpenSslX509KeyManagerFactory
java.lang.Object
javax.net.ssl.KeyManagerFactory
io.netty.handler.ssl.OpenSslX509KeyManagerFactory
Special
KeyManagerFactory
that pre-compute the keymaterial used when SslProvider.OPENSSL
or
SslProvider.OPENSSL_REFCNT
is used and so will improve handshake times and its performance.
Because the keymaterial is pre-computed any modification to the KeyStore
is ignored after
KeyManagerFactory.init(KeyStore, char[])
is called.
KeyManagerFactory.init(ManagerFactoryParameters)
is not supported by this implementation and so a call to it will always
result in an InvalidAlgorithmParameterException
.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static final class
private static final class
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final OpenSslX509KeyManagerFactory.OpenSslKeyManagerFactorySpi
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
OpenSslX509KeyManagerFactory
(String algorithm, Provider provider) OpenSslX509KeyManagerFactory
(Provider provider) -
Method Summary
Modifier and TypeMethodDescriptionstatic OpenSslX509KeyManagerFactory
newEngineBased
(File certificateChain, String password) Create a new initializedOpenSslX509KeyManagerFactory
which loads itsPrivateKey
directly from anOpenSSL engine
via the ENGINE_load_private_key function.static OpenSslX509KeyManagerFactory
newEngineBased
(X509Certificate[] certificateChain, String password) Create a new initializedOpenSslX509KeyManagerFactory
which loads itsPrivateKey
directly from anOpenSSL engine
via the ENGINE_load_private_key function.static OpenSslX509KeyManagerFactory
newKeyless
(File chain) static OpenSslX509KeyManagerFactory
newKeyless
(InputStream chain) static OpenSslX509KeyManagerFactory
newKeyless
(X509Certificate... certificateChain) Returns a new initializedOpenSslX509KeyManagerFactory
which will provide its private key by using theOpenSslPrivateKeyMethod
.private static OpenSslX509KeyManagerFactory.OpenSslKeyManagerFactorySpi
newOpenSslKeyManagerFactorySpi
(String algorithm, Provider provider) private static OpenSslX509KeyManagerFactory.OpenSslKeyManagerFactorySpi
newOpenSslKeyManagerFactorySpi
(Provider provider) (package private) OpenSslKeyMaterialProvider
Methods inherited from class javax.net.ssl.KeyManagerFactory
getAlgorithm, getDefaultAlgorithm, getInstance, getInstance, getInstance, getKeyManagers, getProvider, init, init
-
Field Details
-
spi
-
-
Constructor Details
-
OpenSslX509KeyManagerFactory
public OpenSslX509KeyManagerFactory() -
OpenSslX509KeyManagerFactory
-
OpenSslX509KeyManagerFactory
public OpenSslX509KeyManagerFactory(String algorithm, Provider provider) throws NoSuchAlgorithmException - Throws:
NoSuchAlgorithmException
-
OpenSslX509KeyManagerFactory
-
-
Method Details
-
newOpenSslKeyManagerFactorySpi
private static OpenSslX509KeyManagerFactory.OpenSslKeyManagerFactorySpi newOpenSslKeyManagerFactorySpi(Provider provider) -
newOpenSslKeyManagerFactorySpi
private static OpenSslX509KeyManagerFactory.OpenSslKeyManagerFactorySpi newOpenSslKeyManagerFactorySpi(String algorithm, Provider provider) throws NoSuchAlgorithmException - Throws:
NoSuchAlgorithmException
-
newProvider
OpenSslKeyMaterialProvider newProvider() -
newEngineBased
public static OpenSslX509KeyManagerFactory newEngineBased(File certificateChain, String password) throws CertificateException, IOException, KeyStoreException, NoSuchAlgorithmException, UnrecoverableKeyException Create a new initializedOpenSslX509KeyManagerFactory
which loads itsPrivateKey
directly from anOpenSSL engine
via the ENGINE_load_private_key function. -
newEngineBased
public static OpenSslX509KeyManagerFactory newEngineBased(X509Certificate[] certificateChain, String password) throws CertificateException, IOException, KeyStoreException, NoSuchAlgorithmException, UnrecoverableKeyException Create a new initializedOpenSslX509KeyManagerFactory
which loads itsPrivateKey
directly from anOpenSSL engine
via 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 initializedOpenSslX509KeyManagerFactory
which will provide its private key by using theOpenSslPrivateKeyMethod
.
-