|
IAIK CMS/SMIME Toolkit Demo API Documentation
Version 6.1 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdemo.keystore.CMSKeyStore
public class CMSKeyStore
KeyStore repository used providing keys and certificates for the several CMS and S/MIME demos.
Reads and loads keys and certificates from an IaikKeyStore files and provides methods to access the keys and certificates based on algorithm name and algorithm type.
Field Summary | |
---|---|
static iaik.x509.X509Certificate[] |
ca_certificates
Ca certificates. |
static java.security.PrivateKey[] |
ca_keys
Ca keys. |
static java.lang.Object[][] |
certificates
Certificates. |
static int |
DSA
|
static int |
ESDH
|
static java.security.PrivateKey[][] |
keys
Keys. |
static java.lang.String |
ks_filename
The KeyStore file name. |
static int |
RSA
Indices into the cert/key tables |
static int |
RSAPSS
|
static int |
SSDH
|
static int |
SZ_1024_SIGN
|
static int |
SZ_2048_CRYPT_1
|
static int |
SZ_2048_CRYPT_2
|
static int |
SZ_2048_CRYPT_3
|
static int |
SZ_2048_SHA1_SIGN
|
static int |
SZ_2048_SHA256_SIGN
|
static int |
SZ_2048_SHA384_SIGN
|
static int |
SZ_2048_SHA512_SIGN
|
static int |
SZ_2048_SIGN_1
|
static int |
SZ_2048_SIGN_2
|
static int |
SZ_2048_SIGN_3
|
static int |
SZ_3072_SIGN
|
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 | |
---|---|
CMSKeyStore()
|
Method Summary | |
---|---|
static void |
addRecipientKey(java.security.PrivateKey recipientKey,
iaik.x509.X509Certificate[] recipientCertChain)
Adds a key and certificate by its key (certificate) ids to the given recipient keys/certs repositories. |
static iaik.x509.X509Certificate |
getCaCertificate(int type)
Returns a demo CA certificate. |
static java.security.PrivateKey |
getCaPrivateKey(int type)
Returns the private key of a CA certificate. |
static iaik.x509.X509Certificate[] |
getCertificateChain(int type,
int size)
Returns a demo user certificate. |
static java.security.PrivateKey |
getPrivateKey(int type,
int size)
Returns the private key of a CA certificate. |
static iaik.x509.X509Certificate |
getRecipientCert(iaik.cms.CertificateIdentifier certId)
Gets a recipient cert by the given certificate id from the given recipient certs repository. |
static java.security.PrivateKey |
getRecipientKey(iaik.cms.KeyIdentifier keyId)
Gets a recipient key by the given key (certificate) id. |
static iaik.x509.X509Certificate[] |
getTspServerCertificate()
Returns the certificate chain of the TSP demo server. |
static java.security.PrivateKey |
getTspServerPrivateKey()
Returns the private key of the TSP demo server. |
static void |
initKeyStore()
Initializes the keystore. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static java.lang.Object[][] certificates
public static java.security.PrivateKey[][] keys
public static iaik.x509.X509Certificate[] ca_certificates
public static java.security.PrivateKey[] ca_keys
public static final int RSA
public static final int DSA
public static final int RSAPSS
public static final int ESDH
public static final int SSDH
public static final int SZ_1024_SIGN
public static final int SZ_2048_SIGN_1
public static final int SZ_2048_SIGN_2
public static final int SZ_2048_SIGN_3
public static final int SZ_3072_SIGN
public static final int SZ_2048_CRYPT_1
public static final int SZ_2048_CRYPT_2
public static final int SZ_2048_CRYPT_3
public static final int SZ_2048_SHA1_SIGN
public static final int SZ_2048_SHA256_SIGN
public static final int SZ_2048_SHA384_SIGN
public static final int SZ_2048_SHA512_SIGN
public static java.lang.String ks_filename
Constructor Detail |
---|
public CMSKeyStore()
Method Detail |
---|
public static void addRecipientKey(java.security.PrivateKey recipientKey, iaik.x509.X509Certificate[] recipientCertChain)
recipientKey
- the recipient key to be addedrecipientCertChain
- the recipient certificate chainpublic static java.security.PrivateKey getRecipientKey(iaik.cms.KeyIdentifier keyId)
keyId
- the key identifier
null
if no key for the given id can be foundpublic static iaik.x509.X509Certificate getRecipientCert(iaik.cms.CertificateIdentifier certId)
certId
- the certificate identifier
null
if no cert for the given id can be foundpublic static void initKeyStore()
public static java.security.PrivateKey getPrivateKey(int type, int size)
type
- RSA
or DSA
or ESDH
size
- the key size
public static iaik.x509.X509Certificate[] getCertificateChain(int type, int size)
type
- RSA
or DSA
or ESDH
or SSDH
size
- the size of the corresponding key
public static java.security.PrivateKey getCaPrivateKey(int type)
type
- RSA
or DSA
public static iaik.x509.X509Certificate getCaCertificate(int type)
type
- RSA
or DSA
public static java.security.PrivateKey getTspServerPrivateKey()
public static iaik.x509.X509Certificate[] getTspServerCertificate()
|
IAIK CMS/SMIME Toolkit Demo API Documentation
Version 6.1 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
![]() |
v6.1 (c) 2002 IAIK, (c) 2003 - 2025 SIC |
![]() |