|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.iplanet.trustbase.security.store.TokenKeyStoreEntry | +--com.iplanet.trustbase.security.store.KeyEntry
a KeyEntry in the TokenKeyStore contains a PrivateKey and an associated certificate chain. KeyEntrys are created by TokenKeyStores to form the client interface to a PrivateKey and it's associated certificate chain, and additional attribute such as KeyUsage
A KeyPair is be created on a token, and in doing so a self-signed certificate, signed with the PrivateKey of the KeyPair, and containing the PublicKey of the KeyPair will be created.
Constructor Summary | |
protected |
KeyEntry(java.security.PrivateKey key,
java.security.cert.X509Certificate[] chain,
KeyUsages keyUsages)
Creates new KeyEntry |
Method Summary | |
byte[] |
generatePKCS10Request(java.lang.String subjectName,
boolean base64)
generate a PKCS#10 request for the PrivateKey in this entry. |
java.security.cert.X509Certificate[] |
getCertificateChain()
get the certificate chain guaranteeing the PrivateKey of this KeyEntry |
KeyUsages |
getKeyUsages()
get the KeyUsages to which this Key may be put |
java.security.PrivateKey |
getPrivateKey()
get the PrivateKey from the KeyEntry |
java.security.PublicKey |
getPublicKey()
get the PublicKey associated with the PrivateKey. |
void |
setCertificateChain(java.security.cert.X509Certificate[] newchain)
set the certificate chain associated with a PrivateKey. |
protected abstract java.security.cert.X509Certificate[] |
setCertificateChainImpl(java.security.cert.X509Certificate[] chain)
overridable by sub-classes to do any implementation specific stuff. |
void |
setKeyUsages(KeyUsages usages)
set the KeyUsages to which this Key may be put. |
Methods inherited from class com.iplanet.trustbase.security.store.TokenKeyStoreEntry |
addAlias, getAliases, getIssuerName, getSerialNo, getSubjectName, removeAlias, setSubject |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
protected KeyEntry(java.security.PrivateKey key, java.security.cert.X509Certificate[] chain, KeyUsages keyUsages)
Method Detail |
public java.security.PrivateKey getPrivateKey()
public java.security.PublicKey getPublicKey()
public java.security.cert.X509Certificate[] getCertificateChain()
public KeyUsages getKeyUsages()
public void setKeyUsages(KeyUsages usages)
public final void setCertificateChain(java.security.cert.X509Certificate[] newchain) throws IncompleteChainException, com.iplanet.trustbase.security.cert.ValidateException, TokenKeyStoreException
the
- [ possibly partial ] certificate chain to setIncompleteChainException
- thrown if the supplied chain is incomplete,
or cannot be completedTokenKeyStoreException
- thrown if there is any other problemprotected abstract java.security.cert.X509Certificate[] setCertificateChainImpl(java.security.cert.X509Certificate[] chain) throws TokenKeyStoreException
public byte[] generatePKCS10Request(java.lang.String subjectName, boolean base64) throws TokenKeyStoreException
subjectName
- the subject name in the request. may be null,
in which case the subject name from the existing subject cert will be usedbase64
- true if the result is to be base-64 encoded
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |