public class CRLNumber extends V3Extension
CRLNumber
extension.
The CRLNumber
extension is a non critical
standard X509v2 CRL extension.
Each extension is associated with a specific certificateExtension
object identifier, derived from:
certificateExtension OBJECT IDENTIFIER ::= {joint-iso-ccitt(2) ds(5) 29} id-ce OBJECT IDENTIFIER ::= certificateExtension
The object identifier for the CRLNumber
extension
is defined as:
id-ce-cRLNumber OBJECT IDENTIFIER ::= { id-ce 20 }
which corresponds to the OID string "2.5.29.20".
The X.509 Certificate and CRL profile presented in RFC 3280 specifies the CRL number extension for conveying a monotonically increacing sequence number for each CRL issued by a given CA through a specific CA X.500 Directory entry or CRL distribution point. This extension allows users to easily determine when a particular CRL supersedes another CRL.
ASN.1 definition:
cRLNumber ::= INTEGER (0..MAX)
For adding a CRLNumber
extension object to a X509v2 certificate revocation
list, use the addExtension
method of the iaik.x509.X509CRL
class:
CRLNumber crl_number = new CRLNumber(BigInteger.valueOf(4234234)); X505CRL crl = new X509CRL(); ... crl.addExtension(crl_number);
V3Extension
,
X509Extensions
,
X509CRL
Modifier and Type | Field and Description |
---|---|
static ObjectID |
oid
The object identifier of this CRLNumber extension.
|
critical
Constructor and Description |
---|
CRLNumber()
Default constructor.
|
CRLNumber(java.math.BigInteger crlNumber)
Creates a new
CRLNumber from a BigInteger. |
Modifier and Type | Method and Description |
---|---|
java.math.BigInteger |
getCRLNumber()
Returns the CRL number as BigInteger.
|
ObjectID |
getObjectID()
Returns the object ID of this
CRLNumber extension. |
int |
hashCode()
Returns a hashcode for this identity.
|
void |
init(ASN1Object obj)
Inits this
CRLNumber implementation with an ASN1object
representing the value of this extension. |
void |
setCRLNumber(java.math.BigInteger crlNumber)
Sets the CRL number.
|
ASN1Object |
toASN1Object()
Returns an ASN1Object representing the value of this
CRLNumber
extension object. |
java.lang.String |
toString()
Returns a string that represents the contents of this
CRLNumber
extension. |
getName, isCritical, setCritical
public static final ObjectID oid
public CRLNumber()
cRLNumber
value to 0.
Use the setCRLNumber
method for explicitly
setting the crl number, e.g.:
CRLNumber crl_number = new CRLNumber(); crl_number.setCRLNumber(BigInteger.valueOf(4234234));
public CRLNumber(java.math.BigInteger crlNumber)
CRLNumber
from a BigInteger.
For instance:
CRLNumber crl_number = new CRLNumber(BigInteger.valueOf(4234234));
crlNumber
- the CRL numberpublic ObjectID getObjectID()
CRLNumber
extension.getObjectID
in class V3Extension
public void init(ASN1Object obj)
CRLNumber
implementation with an ASN1object
representing the value of this extension.
The given ASN1Object represents the BigInteger CRL number value.
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 CRL for properly initializing an included
CRLNumber 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.
init
in class V3Extension
obj
- the CRLNumber as ASN1Objectpublic ASN1Object toASN1Object()
CRLNumber
extension object.
The returned ASN1Object is an ASN.1 INTEGER representing the BigInteger CRL number value.
cRLNumber ::= INTEGER (0..MAX)
toASN1Object
in class V3Extension
CRLNumber
as ASN1Objectpublic java.math.BigInteger getCRLNumber()
public void setCRLNumber(java.math.BigInteger crlNumber)
crlNumber
- the CRL numberpublic int hashCode()
hashCode
in class V3Extension
public java.lang.String toString()
CRLNumber
extension.toString
in class java.lang.Object