codec.x509.extensions
Class ReasonCodeExtension

java.lang.Object
  |
  +--java.util.AbstractCollection
        |
        +--java.util.AbstractList
              |
              +--java.util.ArrayList
                    |
                    +--codec.asn1.ASN1AbstractCollection
                          |
                          +--codec.asn1.ASN1Sequence
                                |
                                +--codec.x509.X509Extension
                                      |
                                      +--codec.x509.extensions.ReasonCodeExtension
All Implemented Interfaces:
ASN1Collection, ASN1Type, Cloneable, Collection, Externalizable, List, Serializable, X509Extension

public class ReasonCodeExtension
extends X509Extension

Author:
mal
  
 id-ce-cRLReason OBJECT IDENTIFIER ::= { id-ce 21 }
 
 reasonCode = { CRLReason }
 
 CRLReason ::= ENUMERATED {
    unspecified             (0),
    keyCompromise           (1),
    cACompromise            (2),
    affiliationChanged      (3),
    superseded              (4),
    cessationOfOperation    (5),
    certificateHold         (6),
    removeFromCRL           (8) }
  id-ce OBJECT IDENTIFIER  ::=  {joint-iso-ccitt(2) ds(5) 29}
 }
 
See Also:
Serialized Form

Field Summary
protected static String ID_CE_CRL_REASON
          This is the object identifier (OID) of this extension
static int REASON_AFFILIATION_CHANGE
           
static int REASON_CA_COMPROMISE
           
static int REASON_CERTIFICATE_HOLD
           
static int REASON_CESSATION_OF_OPERATION
           
static int REASON_KEY_COMPROMISE
           
static int REASON_REMOVE_FROM_CRL
           
static int REASON_SUPERSEDED
           
static int REASON_UNSPECIFIED
          These are the possible reason codes
protected  ASN1Enumerated theReason
           
 
Fields inherited from class codec.x509.X509Extension
critical, extnID, extnValue
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
ReasonCodeExtension()
          Constructor for ReasonCodeExtension.
ReasonCodeExtension(byte[] ext)
          This constructor basically calls the related constructor in the base class.
ReasonCodeExtension(int aReason)
           
 
Method Summary
 void decode(Decoder dec)
          Reads this collection from the given Decoder.
 void setReasonCode(int aReason)
           
 String toString()
          Returns a human-readable String representation of this extension
 String toString(String offset)
          Returns a human-readable String representation of this extension with an offset String.
 
Methods inherited from class codec.x509.X509Extension
decodeExtensionValue, getCriticalExtensionOIDs, getEncoded, getExtensionValue, getNonCriticalExtensionOIDs, getOID, getValue, hasUnsupportedCriticalExtension, isCritical, setCritical, setOID, setValue
 
Methods inherited from class codec.asn1.ASN1Sequence
getTag
 
Methods inherited from class codec.asn1.ASN1AbstractCollection
checkConstraints, encode, getCollection, getConstraint, getTagClass, isExplicit, isOptional, isType, readExternal, setConstraint, setExplicit, setOptional, writeExternal
 
Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, removeRange, set, size, toArray, toArray, trimToSize
 
Methods inherited from class java.util.AbstractList
equals, hashCode, iterator, listIterator, listIterator, subList
 
Methods inherited from class java.util.AbstractCollection
containsAll, remove, removeAll, retainAll
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.io.Externalizable
readExternal, writeExternal
 
Methods inherited from interface java.util.Collection
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray
 
Methods inherited from interface java.util.List
containsAll, equals, hashCode, iterator, listIterator, listIterator, remove, removeAll, retainAll, subList
 

Field Detail

ID_CE_CRL_REASON

protected static final String ID_CE_CRL_REASON
This is the object identifier (OID) of this extension

theReason

protected ASN1Enumerated theReason

REASON_UNSPECIFIED

public static final int REASON_UNSPECIFIED
These are the possible reason codes

REASON_KEY_COMPROMISE

public static final int REASON_KEY_COMPROMISE

REASON_CA_COMPROMISE

public static final int REASON_CA_COMPROMISE

REASON_AFFILIATION_CHANGE

public static final int REASON_AFFILIATION_CHANGE

REASON_SUPERSEDED

public static final int REASON_SUPERSEDED

REASON_CESSATION_OF_OPERATION

public static final int REASON_CESSATION_OF_OPERATION

REASON_CERTIFICATE_HOLD

public static final int REASON_CERTIFICATE_HOLD

REASON_REMOVE_FROM_CRL

public static final int REASON_REMOVE_FROM_CRL
Constructor Detail

ReasonCodeExtension

public ReasonCodeExtension()
                    throws Exception
Constructor for ReasonCodeExtension.
Throws:
Exception -  

ReasonCodeExtension

public ReasonCodeExtension(int aReason)
                    throws Exception

ReasonCodeExtension

public ReasonCodeExtension(byte[] ext)
                    throws ASN1Exception,
                           IOException
This constructor basically calls the related constructor in the base class.
Parameters:
ext -  
Throws:
ASN1Exception -  
IOException -  
Method Detail

setReasonCode

public void setReasonCode(int aReason)
                   throws Exception

decode

public void decode(Decoder dec)
            throws ASN1Exception,
                   IOException
Description copied from class: ASN1AbstractCollection
Reads this collection from the given Decoder. This type is initialized with the decoded data. The components of the decoded collection must match the components of this collection. If they do then the components are also initialized with the decoded values. Otherwise an exception is thrown.
Overrides:
decode in class ASN1AbstractCollection
Following copied from class: codec.asn1.ASN1AbstractCollection
Parameters:
dec - The decoder to read from.

toString

public String toString()
Description copied from class: X509Extension
Returns a human-readable String representation of this extension
Overrides:
toString in class X509Extension
Following copied from class: codec.asn1.ASN1AbstractCollection
Returns:
The string representation of this ASN.1 collection.

toString

public String toString(String offset)
Description copied from class: X509Extension
Returns a human-readable String representation of this extension with an offset String.
Overrides:
toString in class X509Extension
Following copied from class: codec.x509.X509Extension
Parameters:
offset - String that will be put before each line of output


Copyright © Fraunhofer Gesellschaft. All Rights Reserved.