iaik.x509.ocsp
Class RevokedInfo

java.lang.Object
  |
  +--iaik.x509.ocsp.RevokedInfo

public class RevokedInfo
extends Object

This class implements the OCSP type RevokedInfo.

Within a CertStatus the revoked choice holds a RevokedInfo giving information about the revocation time and optionally specifying the revocation reason (see RFC 2560):

 RevokedInfo ::= SEQUENCE {
   revocationTime              GeneralizedTime,
   revocationReason    [0]     EXPLICIT CRLReason OPTIONAL }
 
When creating a RevokedInfo you have to supply the revocationTime as Java Date object. When using method setRevocationReason for including information about the revocation reason, the reason has to be supplied as ReasonCode object, e.g.:
 Date revocationDate = ...;
 RevokedInfo revokedInfo = new RevokedInfo(revocationDate);
 ReasonCode revocationReason = new ReasonCode(ReasonCode.keyCompromise);
 revokedInfo.setRevocationReason(revocationReason);
 
For creating a cert status for an RevokedInfo simply call the corresponding constructor of class CertStatus:
 CertStatus certStatus = new CertStatus(revokedInfo);
 

Version:
File Revision 7
See Also:
CertStatus

Constructor Summary
RevokedInfo(ASN1Object obj)
          Creates RevokedInfo from an ASN1Object.
RevokedInfo(Date revocationTime)
          Creates a RevokedInfo from a revocation date.
 
Method Summary
 ReasonCode getRevocationReason()
          Returns the revocation reason.
 Date getRevocationTime()
          Returns the revocationTime.
 void setRevocationReason(ReasonCode reasonCode)
          Sets the revocation reason field.
 ASN1Object toASN1Object()
          Returns this RevokedInfo as an ASN1Object.
 String toString()
          Gives a string representation of this RevokedInfo.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RevokedInfo

public RevokedInfo(Date revocationTime)
Creates a RevokedInfo from a revocation date.
Parameters:
revocationTime - the time of revocation

RevokedInfo

public RevokedInfo(ASN1Object obj)
            throws CodingException
Creates RevokedInfo from an ASN1Object.
Parameters:
obj - the RevokedInfo as ASN1Object
Throws:
CodingException - if the ASN1Object has the wrong format
Method Detail

setRevocationReason

public void setRevocationReason(ReasonCode reasonCode)
Sets the revocation reason field. The reason has to be supplied as ReasonCode object, e.g.:
 ReasonCode revocationReason = new ReasonCode(ReasonCode.keyCompromise);
 revokedInfo.setRevocationReason(revocationReason);
 
Parameters:
reasonCode - the revocation reason as ReasonCode object

getRevocationTime

public Date getRevocationTime()
Returns the revocationTime.
Returns:
the time of revocation

getRevocationReason

public ReasonCode getRevocationReason()
Returns the revocation reason.
Returns:
the revocation reason as ReasonCode object

toASN1Object

public ASN1Object toASN1Object()
Returns this RevokedInfo as an ASN1Object.
Returns:
this RevokedInfo as ASN1Object

toString

public String toString()
Gives a string representation of this RevokedInfo.
Overrides:
toString in class Object
Returns:
a String representation of this RevokedInfo

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