IAIK CMS/SMIME Toolkit Demo API Documentation
Version 6.1

demo.keystore
Class SetupCMSKeyStore

java.lang.Object
  extended by demo.keystore.SetupCMSKeyStore
All Implemented Interfaces:
CMSKeyStoreConstants

public class SetupCMSKeyStore
extends java.lang.Object
implements CMSKeyStoreConstants

Creates a default KeyStore in the current working directory. These keys are used by many demos included in IAIK-JCE. The aliases and the password for accessing the keys and certificates can be found in CMSKeyStoreConstants.

See Also:
CMSKeyStoreConstants

Field Summary
 
Fields inherited from interface demo.keystore.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 Summary
SetupCMSKeyStore()
          Default Constructor.
SetupCMSKeyStore(java.lang.String ksFileName)
          Creates a SetupCMSKeyStore for the given keystore filename.
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SetupCMSKeyStore

public SetupCMSKeyStore()
Default Constructor.


SetupCMSKeyStore

public SetupCMSKeyStore(java.lang.String ksFileName)
Creates a SetupCMSKeyStore for the given keystore filename.

Parameters:
ksFileName - the KeyStore filename
Method Detail

addToKeyStore

public void addToKeyStore(java.security.KeyPair keyPair,
                          iaik.x509.X509Certificate[] chain,
                          java.lang.String alias)
                   throws java.security.KeyStoreException
Adds the private key and the certificate chain to the key store.

Parameters:
keyPair - the key pair with the private key to be added
chain - the certificate chain to be added
alias - the alias for the keystore entry
Throws:
java.security.KeyStoreException - if an error occurs when trying to add the key

generateCertificates

public void generateCertificates()
Generates the certificates.


start

public static void start()
Starts the keystore setup.


main

public static void main(java.lang.String[] arg)
                 throws java.io.IOException
Creates the test certificates.

Throws:
java.io.IOException

IAIK CMS/SMIME Toolkit Demo API Documentation
Version 6.1

v6.1
(c) 2002 IAIK, (c) 2003 - 2025 SIC