类 KeyStoreFactory
java.lang.Object
cn.taketoday.buildpack.platform.docker.ssl.KeyStoreFactory
Utility methods for creating Java trust material from key and certificate files.
- 作者:
- Scott Frederick
-
字段概要
字段 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明private static voidaddCertificates(KeyStore keyStore, X509Certificate[] certificates, PrivateKey privateKey, String alias) (专用程序包) static KeyStoreCreate a newKeyStorepopulated with the certificate stored at the specified file path and an optional private key.private static KeyStoreprivate static PrivateKeygetPrivateKey(Path path)
-
字段详细资料
-
NO_PASSWORD
private static final char[] NO_PASSWORD
-
-
构造器详细资料
-
KeyStoreFactory
private KeyStoreFactory()
-
-
方法详细资料
-
create
Create a newKeyStorepopulated with the certificate stored at the specified file path and an optional private key.- 参数:
certPath- the path to the certificate authority filekeyPath- the path to the private filealias- the alias to use for KeyStore entries- 返回:
- the
KeyStore
-
getKeyStore
private static KeyStore getKeyStore() throws KeyStoreException, IOException, NoSuchAlgorithmException, CertificateException -
getPrivateKey
-
addCertificates
private static void addCertificates(KeyStore keyStore, X509Certificate[] certificates, PrivateKey privateKey, String alias) throws KeyStoreException
-