public class SetupCMSKeyStore extends java.lang.Object implements CMSKeyStoreConstants
CMSKeyStoreConstants
.CMSKeyStoreConstants
CA_DSA, CA_RSA, CA_RSAPSS, DSA_1024, DSA_2048, DSA_3072, ESDH_2048_1, ESDH_2048_2, KS_DIRECTORY, KS_FILENAME, KS_PASSWORD, RSA_2048_CRYPT_1, RSA_2048_CRYPT_2, RSA_2048_CRYPT_3, RSA_2048_SIGN_1, RSA_2048_SIGN_2, RSA_2048_SIGN_3, RSAPSS_2048_SHA1_SIGN, RSAPSS_2048_SHA256_SIGN, RSAPSS_2048_SHA384_SIGN, RSAPSS_2048_SHA512_SIGN, SSDH_2048_1, SSDH_2048_2, TSP_SERVER
Constructor and Description |
---|
SetupCMSKeyStore()
Default Constructor.
|
SetupCMSKeyStore(java.lang.String ksFileName)
Creates a SetupCMSKeyStore for the given keystore filename.
|
Modifier and Type | Method and Description |
---|---|
void |
addToKeyStore(java.security.KeyPair keyPair,
iaik.x509.X509Certificate[] chain,
java.lang.String alias)
Adds the private key and the certificate chain to the key store.
|
void |
generateCertificates()
Generates the certificates.
|
static void |
main(java.lang.String[] arg)
Creates the test certificates.
|
static void |
start()
Starts the keystore setup.
|
public SetupCMSKeyStore()
public SetupCMSKeyStore(java.lang.String ksFileName)
ksFileName
- the KeyStore filenamepublic void addToKeyStore(java.security.KeyPair keyPair, iaik.x509.X509Certificate[] chain, java.lang.String alias) throws java.security.KeyStoreException
keyPair
- the key pair with the private key to be addedchain
- the certificate chain to be addedalias
- the alias for the keystore entryjava.security.KeyStoreException
- if an error occurs when trying to add the keypublic void generateCertificates()
public static void start()
public static void main(java.lang.String[] arg) throws java.io.IOException
java.io.IOException