public class CrlID extends V3Extension
CrlID (CRL References) extension.
As with all OCSP extensions, support of the CrlID extension
is optional for client and servers. The critical flag should not be set.
Each OCSP extension is associated with a specific ocsp extension
object identifier, derived from RFC 2560,
RFC 6960:
id-pkix OBJECT IDENTIFIER ::=
{ iso(1) identified-organization(3) dod(6) internet(1)
security(5) mechanisms(5) pkix(7) }
id-ad OBJECT IDENTIFIER ::= { id-pkix 48 }
-- arc for access descriptors
id-ad-ocsp OBJECT IDENTIFIER ::= { id-ad 1 }
id-pkix-ocsp OBJECT IDENTIFIER ::= { id-ad-ocsp }
The object identifier for the CrlID extension
is defined as:
id-pkix-ocsp-crl OBJECT IDENTIFIER ::= { id-pkix-ocsp 3 }
which corresponds to the OID string "1.3.6.1.5.5.7.48.1.3".
The Online Certificate Status Protocol
( RFC 2560),
RFC 6960) specifies the CrlID
extension for allowing a responder to indicate the CRL on
which a revoked or onHold certificate is found. This can be useful
where OCSP is used between repositories, and also as an auditing
mechanism. The CRL may be specified by a URL (the URL at which the
CRL is available), a number (value of the CRL number extension of the
relevant crl) or a time (the time at which the relevant CRL was created).
These extensions will be specified as singleExtensions to be included
into a SingleResponse.
ASN.1 definition:
CrlID ::= SEQUENCE {
crlUrl [0] EXPLICIT IA5String OPTIONAL,
crlNum [1] EXPLICIT INTEGER OPTIONAL,
crlTime [2] EXPLICIT GeneralizedTime OPTIONAL }
For adding a CrlID extension object to a SingleResponse, use the addExtension method, e.g.:
String crlUrl = ...; CrlID crlID = new CrlID(); crlID.setCrlUrl(crlUrl); singleResponse.addExtension(CrlID);
SingleResponse,
V3Extension,
X509Extensions| Modifier and Type | Field and Description |
|---|---|
static ObjectID |
oid
The object identifier of this CrlID extension.
|
critical| Constructor and Description |
|---|
CrlID()
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getCrlNum()
Gets the crl number, if included
The crl number specifies the value of the CRL number
extension of the corresponding crl.
|
java.math.BigInteger |
getCrlNumber()
Gets the crl number, if included
The crl number specifies the value of the CRL number
extension of the corresponding crl.
|
java.util.Date |
getCrlTime()
Gets the crl time, if included.
|
java.lang.String |
getCrlUrl()
Gets the crl url, if included.
|
ObjectID |
getObjectID()
Returns the object ID of this
CrlID extension |
int |
hashCode()
Returns a hashcode for this identity.
|
void |
init(ASN1Object obj)
Inits this
CrlID implementation with an ASN1object
representing the value of this extension. |
void |
setCrlNum(int crlNum)
Sets the crl number.
|
void |
setCrlNumber(java.math.BigInteger crlNum)
Sets the crl number.
|
void |
setCrlTime(java.util.Date time)
Sets the crl time.
|
void |
setCrlUrl(java.lang.String crlUrl)
Sets the crl url.
|
ASN1Object |
toASN1Object()
Returns an ASN1Object representing the value of this
CrlID extension. |
java.lang.String |
toString()
Returns a string that represents the contents of this
CrlID extension. |
getName, isCritical, setCriticalpublic static final ObjectID oid
public CrlID()
CrlID object.
Use methods setCrlUrl,
setCrlNum, setCrlTime
for setting the fields of this CrlID as required.public void setCrlUrl(java.lang.String crlUrl)
crlUrl - the crl url to be setpublic java.lang.String getCrlUrl()
public void setCrlNum(int crlNum)
crlNum - the crl number to be set as intpublic void setCrlNumber(java.math.BigInteger crlNum)
crlNum - the crl number to be set as BigIntegerpublic int getCrlNum()
public java.math.BigInteger getCrlNumber()
nullpublic void setCrlTime(java.util.Date time)
time - the time at which the relevant CRL was issued.public java.util.Date getCrlTime()
nullpublic ObjectID getObjectID()
CrlID extensiongetObjectID in class V3Extensionpublic void init(ASN1Object obj) throws X509ExtensionException
CrlID implementation with an ASN1object
representing the value of this extension.
The given ASN1Object is the one created by toASN1Object().
This method is used by the X509Extensions class when parsing the ASN.1 representation
of a OCSP object for properly initializing an included
CrlID extension. This method initializes the
extension only with its value, but not with its critical
specification. For that reason, this method shall not be
explicitly called by an application.
The ASN1Object supplied to this method will reflect the ASN.1 representation of the CrlID extension value:
CrlID ::= SEQUENCE {
crlUrl [0] EXPLICIT IA5String OPTIONAL,
crlNum [1] EXPLICIT INTEGER OPTIONAL,
crlTime [2] EXPLICIT GeneralizedTime OPTIONAL }
init in class V3Extensionobj - the CrlID as ASN1Object (SEQUENCE)X509ExtensionException - if the extension cannot be initialized
from its ASN1 representationpublic ASN1Object toASN1Object()
CrlID extension.
The ASN1Object returned by this method will reflect the ASN.1 representation of the CrlID extension value:
CrlID ::= SEQUENCE {
crlUrl [0] EXPLICIT IA5String OPTIONAL,
crlNum [1] EXPLICIT INTEGER OPTIONAL,
crlTime [2] EXPLICIT GeneralizedTime OPTIONAL }
toASN1Object in class V3ExtensionCrlID as ASN1Object (SEQUENCE)public int hashCode()
hashCode in class V3Extensionpublic java.lang.String toString()
CrlID extension.toString in class java.lang.Object