public class KeyManagerHelper
extends java.lang.Object
Constructor | Description |
---|---|
KeyManagerHelper() |
Modifier and Type | Method | Description |
---|---|---|
static javax.net.ssl.X509ExtendedKeyManager |
createBCFKSKeyManager(java.io.InputStream bcfksStream,
char[] keyStorePassword,
char[] entryPassword) |
Creates KeyManager that will use specified key store to get party credentials.
|
static javax.net.ssl.X509ExtendedKeyManager |
createBCFKSKeyManager(java.lang.String bksFilePath,
char[] keyStorePassword,
char[] entryPassword) |
Creates KeyManager that will use specified key store to get party credentials.
|
static javax.net.ssl.X509ExtendedKeyManager |
createEmptyKeyManager() |
Creates empty KeyManager instance, one that does not contain any keys and/or certificates.
|
static javax.net.ssl.X509ExtendedKeyManager |
createJKSKeyManager(java.io.InputStream jksStream,
char[] keyStorePassword,
char[] entryPassword) |
Creates KeyManager that will use specified key store to get party credentials.
|
static javax.net.ssl.X509ExtendedKeyManager |
createJKSKeyManager(java.lang.String jksFilePath,
char[] keyStorePassword,
char[] entryPassword) |
Creates KeyManager that will use specified key store to get party credentials.
|
static javax.net.ssl.X509ExtendedKeyManager |
createMSCAPIKeyManager(javax.security.auth.callback.CallbackHandler callbackHandler,
java.lang.String certThumbprint) |
Creates KeyManager that will use specified entry from Windows Certificate Services (WCS) as
party credentials.
|
static javax.net.ssl.X509ExtendedKeyManager |
createPEMKeyManager(java.io.InputStream certStream,
java.io.InputStream keyStream) |
Creates KeyManager that will use specified private key and certificate as party credentials.
|
static javax.net.ssl.X509ExtendedKeyManager |
createPEMKeyManager(java.lang.String certFilePath,
java.lang.String keyFilePath) |
Creates KeyManager that will use specified private key and certificate as party credentials.
|
static javax.net.ssl.X509ExtendedKeyManager |
createPKCS11KeyManager(javax.security.auth.callback.CallbackHandler callbackHandler) |
Creates KeyManager that will use PKCS#11 security provider key store as party credentials.
|
public static javax.net.ssl.X509ExtendedKeyManager createPEMKeyManager(java.io.InputStream certStream, java.io.InputStream keyStream) throws java.io.IOException, java.security.GeneralSecurityException
certStream
- Stream to load certificate from. Certificate must be in X.509 PEM format.keyStream
- Stream to load private key from. Key must be in PKCS#8 PEM format without
password protection.java.io.IOException
- If there are problems reading any of the streamsjava.security.GeneralSecurityException
- If there are problems with certificate/key format and/or datapublic static javax.net.ssl.X509ExtendedKeyManager createPEMKeyManager(java.lang.String certFilePath, java.lang.String keyFilePath) throws java.io.IOException, java.security.GeneralSecurityException
certFilePath
- Path to an existing file containing certificate in PEM-encoded X.509 format.keyFilePath
- Path to an existing file containing private key in PEM-encoded PKCS#8 format.java.io.IOException
java.security.GeneralSecurityException
public static javax.net.ssl.X509ExtendedKeyManager createMSCAPIKeyManager(javax.security.auth.callback.CallbackHandler callbackHandler, java.lang.String certThumbprint) throws java.io.IOException, java.security.GeneralSecurityException
callbackHandler
- CallbackHandler instance used to provide password necessary to access
the entry. Must be always provided, can not be null. Use
DummyCallbackHandler instance if no password is required.certThumbprint
- Hexadecimal thumbprint (SHA1 hash of signed certificate data) used to
identify entry in WCSjava.io.IOException
java.security.GeneralSecurityException
public static javax.net.ssl.X509ExtendedKeyManager createPKCS11KeyManager(javax.security.auth.callback.CallbackHandler callbackHandler) throws java.io.IOException, java.security.GeneralSecurityException
callbackHandler
- CallbackHandler instance used to provide password necessary to access
key store. Must be always provided, can not be null. Use
DummyCallbackHandler instance if no password is required.java.security.GeneralSecurityException
- If Java runtime is not in FIPS mode or there are problems getting
data from key store.java.io.IOException
- If there are problems accessing key store.public static javax.net.ssl.X509ExtendedKeyManager createJKSKeyManager(java.io.InputStream jksStream, char[] keyStorePassword, char[] entryPassword) throws java.io.IOException, java.security.GeneralSecurityException
jksStream
- Stream to read key store fromkeyStorePassword
- Password to access key storeentryPassword
- Password to access key/certificate entry in the key storejava.io.IOException
- If there are problems reading data from stream.java.security.GeneralSecurityException
- If there are problems accessing key store.public static javax.net.ssl.X509ExtendedKeyManager createJKSKeyManager(java.lang.String jksFilePath, char[] keyStorePassword, char[] entryPassword) throws java.io.IOException, java.security.GeneralSecurityException
jksFilePath
- Path to file to read key store fromkeyStorePassword
- Password to access key storeentryPassword
- Password to access key/certificate entry in the key storejava.io.IOException
- If there are problems reading data from file.java.security.GeneralSecurityException
- If there are problems accessing key store.public static javax.net.ssl.X509ExtendedKeyManager createEmptyKeyManager()
public static javax.net.ssl.X509ExtendedKeyManager createBCFKSKeyManager(java.io.InputStream bcfksStream, char[] keyStorePassword, char[] entryPassword) throws java.io.IOException, java.security.GeneralSecurityException
bcfksStream
- Stream to read key store fromkeyStorePassword
- Password to access key storeentryPassword
- Password to access key/certificate entry in the key storejava.io.IOException
- If there are problems reading data from stream.java.security.GeneralSecurityException
- If there are problems accessing key store.public static javax.net.ssl.X509ExtendedKeyManager createBCFKSKeyManager(java.lang.String bksFilePath, char[] keyStorePassword, char[] entryPassword) throws java.io.IOException, java.security.GeneralSecurityException
bksFilePath
- Path to file to read key store fromkeyStorePassword
- Password to access key storeentryPassword
- Password to access key/certificate entry in the key storejava.io.IOException
- If there are problems reading data from file.java.security.GeneralSecurityException
- If there are problems accessing key store.Send comments on this topicTechpubs.webadmin@genesys.com.
Document version: 9.0.006.00
Copyright © 2006–2019 Genesys Telecommunications Laboratories, Inc. All rights reserved.