iaik.x509.extensions
Class CRLNumber

java.lang.Object
  |
  +--iaik.x509.V3Extension
        |
        +--iaik.x509.extensions.CRLNumber

public class CRLNumber
extends V3Extension

This class implements the 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 2459 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);
 

Version:
File Revision 21
See Also:
V3Extension, X509Extensions, X509CRL

Field Summary
static ObjectID oid
          The object identifier of this CRLNumber extension.
 
Fields inherited from class iaik.x509.V3Extension
critical
 
Constructor Summary
CRLNumber()
          Default constructor.
CRLNumber(BigInteger crlNumber)
          Creates a new CRLNumber from a BigInteger.
 
Method Summary
 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(BigInteger crlNumber)
          Sets the CRL number.
 ASN1Object toASN1Object()
          Returns an ASN1Object representing the value of this CRLNumber extension object.
 String toString()
          Returns a string that represents the contents of this CRLNumber extension.
 
Methods inherited from class iaik.x509.V3Extension
getName, isCritical, setCritical
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

oid

public static final ObjectID oid
The object identifier of this CRLNumber extension. The corresponding OID string is "2.5.29.20".
Constructor Detail

CRLNumber

public CRLNumber()
Default constructor. Creates an empty CRLNumber object. Use the setCRLNumber method for explicitly setting the crl number, e.g.:

 CRLNumber crl_number = new CRLNumber();
 crl_number.setCRLNumber(BigInteger.valueOf(4234234));
 


CRLNumber

public CRLNumber(BigInteger crlNumber)
Creates a new CRLNumber from a BigInteger.

For instance:

CRLNumber crl_number = new CRLNumber(BigInteger.valueOf(4234234));

Parameters:
number - the CRL number
Method Detail

getObjectID

public ObjectID getObjectID()
Returns the object ID of this CRLNumber extension.
Overrides:
getObjectID in class V3Extension
Returns:
the object ID

init

public void init(ASN1Object obj)
Inits this 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.

Overrides:
init in class V3Extension
Parameters:
obj - the CRLNumber as ASN1Object

toASN1Object

public ASN1Object toASN1Object()
Returns an ASN1Object representing the value of this CRLNumber extension object.

The returned ASN1Object is an ASN.1 INTEGER representing the BigInteger CRL number value.

 cRLNumber ::= INTEGER (0..MAX)
 

Overrides:
toASN1Object in class V3Extension
Returns:
the value of this CRLNumber as ASN1Object

getCRLNumber

public BigInteger getCRLNumber()
Returns the CRL number as BigInteger.
Returns:
the CRL number

setCRLNumber

public void setCRLNumber(BigInteger crlNumber)
Sets the CRL number.
Parameters:
crlNumber - the CRL number

hashCode

public int hashCode()
Returns a hashcode for this identity.
Overrides:
hashCode in class V3Extension
Returns:
a hash code for this identity

toString

public String toString()
Returns a string that represents the contents of this CRLNumber extension.
Overrides:
toString in class Object
Returns:
the string representation

This Javadoc may contain text parts from Internet Standard specifications (RFC 2459, 3280, 3039, 2560, 1521, 821, 822, 2253, 1319, 1321, ,2630, 2631, 2268, 3058, 2984, 2104, 2144, 2040, 2311, 2279, see copyright note) and RSA Data Security Public-Key Cryptography Standards (PKCS#1,3,5,7,8,9,10,12, see copyright note).

IAIK-JCE 3.1 with IAIK-JCE CC Core 3.1, (c) 1997-2004 IAIK