|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--iaik.x509.V3Extension | +--iaik.x509.extensions.HoldInstructionCode
This class implements the HoldInstructionCode
extension.
The HoldInstructionCode
extension is a non-critical
standard X509v2 CRL entry 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 HoldInstructionCode
extension
is defined as:
id-ce-HoldInstructionCode OBJECT IDENTIFIER ::= { id-ce 23 }
which corresponds to the OID string "2.5.29.23".
The X.509 Certificate and CRL profile presented in RFC 2459 specifies the HoldInstructionCode extension for providing a registered instruction identifier which indicates the action to be taken after encountering a certificate that has been placed on hold.
ASN.1 definition:
holdInstructionCode ::= OBJECT IDENTIFER
Since in the IAIK-JCE environment revoked certificates are implementations of the
iaik.x509.RevokedCertificate
class, a holdInstructionCode
CRL entry extension may be added to a revoked certificate
by using the addExtension
method of the iaik.x509.RevokedCertificate
class.
Any revoked certificate itself is added to a certificate revocation list by using a proper
addCertificate
method of the iaik.x509.X509CRL
class, e.g.:
//Create a revoked certificate from a X509Certificate and set the revocation date //to the current date; the X509Certificate is read in from a file: GregorianCalendar date = (GregorianCalendar)Calendar.getInstance(); InputStream fis = new FileInputStream("cert.der"); X509Certificate cert = new X509Certificate(fis); fis.close(); RevokedCertificate rev_cert = new RevokedCertificate(cert, date.getTime()); //add the holdInstructionCode code CRL entry extension to the revoked certificate: HoldInstructionCode holdInstructionCode = new HoldInstructionCode(HoldInstructionCode.holdInstructionCallIssuer); rev_cert.addExtension(holdInstructionCode); //add the revoked certificate to the crl X509CRL crl = new X509CRL(); ... crl.addCertificate(rev_cert);
X509CRL
,
X509Certificate
,
RevokedCertificate
Field Summary | |
static ObjectID |
holdInstruction
The base OID for defined hold instructions (1.2.840.10040.2). |
static ObjectID |
holdInstructionCallIssuer
The holdinstruction-callissuer oid (1.2.840.10040.2.2). |
static ObjectID |
holdInstructionNone
The holdinstruction-none oid (1.2.840.10040.2.1). |
static ObjectID |
holdInstructionReject
The holdinstruction-reject oid (1.2.840.10040.2.3). |
static ObjectID |
oid
The object identifier of this HoldInstructionCode extension. |
Fields inherited from class iaik.x509.V3Extension |
critical |
Constructor Summary | |
HoldInstructionCode()
Default constructor. |
|
HoldInstructionCode(ObjectID instructionCode)
Creates a new HoldInstructionCode from the given oid.
|
Method Summary | |
ObjectID |
getHoldInstructionCode()
Returns the hold instruction code. |
ObjectID |
getObjectID()
Returns the object ID of this HoldInstructionCode extension. |
int |
hashCode()
Returns a hashcode for this identity. |
void |
init(ASN1Object obj)
Inits this HoldInstructionCode implementation with an ASN1object
representing the value of this extension.
|
void |
setInstructionCode(ObjectID instructionCode)
Sets the hold instruction code. |
ASN1Object |
toASN1Object()
Returns an ASN1Object representing the value of this HoldInstructionCode
extension object.
|
String |
toString()
Returns a string that represents the contents of this HoldInstructionCode
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 |
public static final ObjectID oid
public static final ObjectID holdInstruction
public static final ObjectID holdInstructionNone
public static final ObjectID holdInstructionCallIssuer
public static final ObjectID holdInstructionReject
Constructor Detail |
public HoldInstructionCode()
HoldInstructionCode
object.
Use the setInstructionCode
method for explicitly
setting the instruction code.public HoldInstructionCode(ObjectID instructionCode)
HoldInstructionCode
from the given oid.
For instance:
HoldInstructionCode hic = new HoldInstructionCode(HoldInstrcutionCode.holdInstructionCodeReject));
instructionCode
- the hold instruction code oidMethod Detail |
public ObjectID getObjectID()
HoldInstructionCode
extension.getObjectID
in class V3Extension
public void init(ASN1Object obj)
HoldInstructionCode
implementation with an ASN1object
representing the value of this extension.
The given ASN1Object represents the hold instruction code oid.
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
HoldInstructionCode 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 HoldInstructionCode as ASN1Objectpublic ASN1Object toASN1Object()
HoldInstructionCode
extension object.
The returned ASN1Object represents the hold instruction code oid.
holdInstructionCode ::= OBJECT IDENTIFER
toASN1Object
in class V3Extension
HoldInstructionCode
as ASN1Objectpublic ObjectID getHoldInstructionCode()
public void setInstructionCode(ObjectID instructionCode)
instructionCode
- the instruction codepublic int hashCode()
hashCode
in class V3Extension
public String toString()
HoldInstructionCode
extension.toString
in class Object
|
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). | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |