|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.rsa.certj.cert.RevokedCertificates
This class builds and holds revoked certificates, which are part of an X.509-defined CRL. The ASN.1 definition is as follows:
RevokedCertificates ::= SEQUENCE OF SEQUENCE { userCertificate CertificateSerialNumber, revocationDate Time, crlEntryExtensions Extensions OPTIONAL } CertificateSerialNumber ::= INTEGER Time ::= CHOICE { utcTime UTCTime, generalizedTime GeneralizedTime } Extensions ::= SEQUENCE OF Extension Extension ::= SEQUENCE { extnId EXTENSION.&id ({ExtensionSet}), critical BOOLEAN DEFAULT FALSE, extnValue OCTET STRING -- contains a DER encoding of a value of type &ExtnType -- for the extension object identified by extnId -- } ExtensionSet EXTENSION ::= { ... } |
See Also
Constructor Summary |
|
RevokedCertificates()
Constructs an empty |
|
RevokedCertificates(byte[] valueBER,
int offset,
int special)
Constructs a |
Method Summary |
|
void |
addRevokedCertificate(byte[] serialNumber,
Date date,
X509V3Extensions extensions)
Adds the revoked certificate using the given values. |
clone()
Overrides the default |
|
boolean |
equals(Object obj)
Returns |
int |
getCertificateCount()
Gets the number of revoked certificates in this object. |
int |
getDEREncoding(byte[] encoding,
int offset,
int special,
boolean timeFlag)
Places the DER encoding of this object into encoding, beginning at offset. |
int |
getDERLen(int special)
Returns the number of bytes of the DER encoding of the revoked certificates. |
getExtensions(int index)
Gets the |
|
static int |
getNextBEROffset(byte[] valueBER,
int offset)
Given valueBER, the BER of a revoked certificate beginning at offset, finds the index to the next element in the encoding. |
getRevocationDate(int index)
Gets the revocation date of the revoked certificate at the specified index. |
|
byte[] |
getSerialNumber(int index)
Gets the serial number of the revoked certificate at the specified index. |
Methods inherited from class java.lang.Object |
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public RevokedCertificates()
RevokedCertificates
object.public RevokedCertificates(byte[] valueBER, int offset, int special) throws CertificateException
RevokedCertificates
object and initializes it with the given values.Parameters
valueBER | The | ||
offset | The offset into the valueBER array. | ||
special | The special circumstances of the BER encoding, if there
are any.
The following ASN.1 constants are
possible values for special:
|
Method Detail |
public void addRevokedCertificate(byte[] serialNumber, Date date, X509V3Extensions extensions) throws CertificateException
Parameters
serialNumber | The certificate serial number. | ||
date | The revocation date that specifies when this certificate was revoked. | ||
extensions | The |
Throws
CertificateException
- If the specified
extensions are of the wrong
type (not CRLEntryExtensions
extensions).public byte[] getSerialNumber(int index) throws CertificateException
Parameters
index | The index to the revoked certificate. |
Returns
Throws
CertificateException
- If the specified
index is invalid.public Date getRevocationDate(int index) throws CertificateException
Parameters
index | The index to the certificate. |
Returns
Throws
CertificateException
- If the specified index is
invalid.public X509V3Extensions getExtensions(int index) throws CertificateException
CRLEntryExtensions
object of the revoked
certificate at the specified index. If this object is
not set with values, then this method returns null
.Parameters
index | The index to the revoked certificate. |
Returns
null
.
Throws
CertificateException
- If the specified index is
invalid.public int getCertificateCount()
Returns
public static int getNextBEROffset(byte[] valueBER, int offset) throws CertificateException
valueBER[120]
is the first
byte in the encoding of the certificate, valueBER[1938]
is the last byte
in the encoding of the certificate,
and the next element begins at index 1939.Parameters
valueBER | The BER encoding of a revoked certificate. | ||
offset | The offset into valueBER where the encoding begins. |
Returns
int
that contains the index to the
next element in the BER encoding.
Throws
CertificateException
- If the method
cannot read the BER encoding.public int getDERLen(int special) throws CertificateException
Parameters
special | The special circumstances of the DER encoding, if there
are any.
The following ASN.1 constants are
possible values for special:
|
Returns
public int getDEREncoding(byte[] encoding, int offset, int special, boolean timeFlag) throws CertificateException
getDERLen
. If this object is
not yet set with values, this method places nothing into the array
and returns zero.
To indicate that the DER encoding should follow any special
circumstances, use the special argument.
If there are no special circumstances, pass in
special = 0
.
The following ASN.1 constants are
possible values for special:
APP_IMPLICIT
, APP_EXPLICIT
,
PRIVATE_IMPLICIT
, PRIVATE_EXPLICIT
,
OPTIONAL
, DEFAULT
,
CONTEXT_IMPLICIT
,
or CONTEXT_EXPLICIT
.Parameters
encoding | The | ||
offset | The offset into encoding where writing begins. | ||
special | The special DER circumstances of the encoding, if there are any. | ||
timeFlag | The flag indicating how to encode time values:
|
Returns
public boolean equals(Object obj)
true
if this object
and obj contain the
same RevokedCertificates
,
returns false
otherwise.Overrides
equals
in class Object
Parameters
obj | An instance of the
|
Returns
boolean
indicating whether
these objects are equal.public Object clone() throws CloneNotSupportedException
clone
method
to get a deeper clone.
Returns
RevokedCertificates
object,
a copy of this object.
Throws
CloneNotSupportedException
- If the cloning operation
is not successful.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |