public class CardMSKeyMgmtInfo extends java.lang.Object implements ASN1Type
CardMSKeyMgmtInfo ::= {
certTypeId EntrustCertInfoId,
certDefnId EntrustCertInfoId,
mgmtReqReason [0] EntrustEventReason OPTIONAL,
derEncodedLatestCert [1] OCTET_STRING OPTIONAL,
streamIndex [2] INTEGER OPTIONAL
}
This structure contains information related to the key management of a certificate stream from an Entrust user's digital identity. A certificate stream consists of all the keys/certificates that have been issued to a user under a specific certificate type/definition and the policy it contains. For example a typical 2-key-pair user with the 'ent_twokeypair' certificate type will have one 'Encryption' certificate stream and one 'Verification' certificate stream.
This structure will be produced as part of a CardMSDigitalIDMgmtInfo
structure by an Entrust client application that supports key management via a
CardMS. Currently this is only Entrust Entelligence Security Provider (ESP)
version 8.0 or later. It is the responsibility of the CardMS to consume this
structure and drive the key management operation through the
CMPForCardMS API.
The following are examples of what this structure will look like for a certificate stream in various key management scenarios:
Scenario 1 (Management Not Required)certTypeId: ent_twokeypair (19) certDefnId: Encryption (32) mgmtReqReason: null derEncodedLatestCert: non-null streamIndex: 0Scenario 2 (Key Update Required - Certificate Near Expiration)
certTypeId: ent_twokeypair (19) certDefnId: Verification (33) mgmtReqReason: nearExpired (1) derEncodedLatestCert: non-null streamIndex: 0Scenario 3 (Key Update Required - Certificate Expired)
certTypeId: ent_twokeypair (19) certDefnId: Encryption (32) mgmtReqReason: expired (2) derEncodedLatestCert: non-null streamIndex: 2Scenario 4 (Key Update Required - Certificate Revoked)
certTypeId: ent_twokeypair (19) certDefnId: Encryption (32) mgmtReqReason: revoked (3) derEncodedLatestCert: non-null streamIndex: 9Scenario 5 (Key Update Required - DN Change)
certTypeId: ent_twokeypair (33) certDefnId: Verification (2) mgmtReqReason: dnChange (4) derEncodedLatestCert: non-null streamIndex: 1Scenario 6 (Key Update Required - CA Forced Update)
certTypeId: ent_twokeypair (19) certDefnId: Encryption (32) mgmtReqReason: forcedUpdate (5) derEncodedLatestCert: non-null streamIndex: 0Scenario 7 (Key Update Required - Certificate Definition Forced Update)
certTypeId: ent_twokeypair (19) certDefnId: Encryption (32) mgmtReqReason: defnUpdate (7) derEncodedLatestCert: non-null streamIndex: 0Scenario 8 (Key Certification Required - Certificate Type Change)
certTypeId: ent_nonrepud (20) certDefnId: Nonrepudiation (36) mgmtReqReason: typeChange (6) derEncodedLatestCert: null streamIndex: nullScenario 9 (Key Certification Required - Certificate Definition Added)
certTypeId: ent_twokeypair (19) certDefnId MyNewDefn (99) mgmtReqReason: newCertDefn (9) derEncodedLatestCert: null streamIndex: null
| Constructor and Description |
|---|
CardMSKeyMgmtInfo(ASN1Object obj)
A constructor; creates a
CardMSKeyMgmtInfo object from an
ASN1Object. |
CardMSKeyMgmtInfo(EntrustCertInfoId certTypeId,
EntrustCertInfoId certDefnId)
A constructor; creates a
CardMSKeyMgmtInfo object that
contains the specified components. |
| Modifier and Type | Method and Description |
|---|---|
void |
decode(ASN1Object obj)
Decodes a CardMSKeyMgmtInfo structure from an
ASN1Object. |
EntrustCertInfoId |
getCertDefnId()
Gets the certificate definition identifier.
|
EntrustCertInfoId |
getCertTypeId()
Gets the certificate type identifier.
|
X509Certificate |
getLatestCert()
Returns the latest certificate in the certificate stream.
|
EntrustEventReason |
getMgmtReqReason()
Gets the key management request reason.
|
java.lang.Integer |
getStreamIndex()
Returns the stream index of the latest certificate in the certificate
stream.
|
void |
setCertDefnId(EntrustCertInfoId certDefnId)
Sets the certificate definition identifier.
|
void |
setCertTypeId(EntrustCertInfoId certTypeId)
Sets the certificate type identifier.
|
void |
setLatestCert(X509Certificate latestCert)
Sets the latest certificate in the certificate stream.
|
void |
setMgmtReqReason(EntrustEventReason mgmtReqReason)
Sets the key management request reason.
|
void |
setStreamIndex(java.lang.Integer streamIndex)
Sets the stream index of the latest certificate in the certificate
stream.
|
ASN1Object |
toASN1Object()
Encodes this
CardMSKeyMgmtInfo object as an ASN1Object. |
java.lang.String |
toString()
Creates a text representation of the ASN.1 structure of this
CardMSKeyMgmtInfo
object. |
public CardMSKeyMgmtInfo(EntrustCertInfoId certTypeId, EntrustCertInfoId certDefnId)
CardMSKeyMgmtInfo object that
contains the specified components.certTypeId - the certificate type identifiercertDefnId - the certificate definition identifierjava.lang.IllegalArgumentException - if any of the parameters are nullpublic CardMSKeyMgmtInfo(ASN1Object obj) throws CodingException
CardMSKeyMgmtInfo object from an
ASN1Object.obj - the ASN.1 representation of a CardMSKeyMgmtInfo structureCodingException - if an errors occurs while decoding the ANS1Objectjava.lang.IllegalArgumentException - if the ASN.1 object is nullpublic EntrustCertInfoId getCertTypeId()
The certificate type identifier indicates the certificate type under which the certificate stream exists that the key management information corresponds to.
public void setCertTypeId(EntrustCertInfoId certTypeId)
java.lang.IllegalArgumentException - if the certificate type identifier is nullgetCertTypeId()public EntrustCertInfoId getCertDefnId()
The certificate definition identifier indicates the certificate stream that the key management information corresponds to.
public void setCertDefnId(EntrustCertInfoId certDefnId)
java.lang.IllegalArgumentException - if the certificate definition identifier is nullgetCertDefnId()public EntrustEventReason getMgmtReqReason()
The key management request reason, when set, indicates that a key update/certification operation is required on the certificate stream.
null otherwisepublic void setMgmtReqReason(EntrustEventReason mgmtReqReason)
mgmtReqReason - the key management request reason (OPTIONAL)getMgmtReqReason()public X509Certificate getLatestCert()
The latest certificate will be present for current (non-obsolete) certificate streams for which a key/certificate exists in the user's digital identity. The latest certificate will not be present when a key certification operation is necessary (requesting the first certificate in a certificate stream).
null
otherwisepublic void setLatestCert(X509Certificate latestCert)
latestCert - the latest certificate (OPTIONAL)getLatestCert()public java.lang.Integer getStreamIndex()
The stream index will be present for current (non-obsolete) certificate streams for which a key/certificate exists in the user's digital identity. The stream index will not be present when a key certification operation is necessary (requesting the first certificate in a certificate stream).
null
otherwisepublic void setStreamIndex(java.lang.Integer streamIndex)
streamIndex - the stream index (OPTIONAL)getStreamIndex()public void decode(ASN1Object obj) throws CodingException
ASN1Object.decode in interface ASN1Typeobj - an ASN.1 representation of a CardMSKeyMgmtInfo structureCodingException - if an errors occurs while decoding the CardMSKeyMgmtInfojava.lang.IllegalArgumentException - if the ASN.1 object is nullpublic ASN1Object toASN1Object()
CardMSKeyMgmtInfo object as an ASN1Object.toASN1Object in interface ASN1Typepublic java.lang.String toString()
CardMSKeyMgmtInfo
object.toString in class java.lang.Object