iaik.x509.ocsp
Class OCSPExtensions

java.lang.Object
  |
  +--iaik.x509.X509Extensions
        |
        +--iaik.x509.ocsp.OCSPExtensions

public class OCSPExtensions
extends X509Extensions

Extends class X509Extensions for handling OCSP extensions.

This class can be used in the same way as the parent X509Extensions class for managing extensions that may be included in OCSP requests or responses. An application wishing to implement some private OCSP extension has to write a class by extending the abstract class V3Extension and statically registering the implemention by its object id:

This class consits of two parts:

Every class which implements a specific extension must first register itself, e.g.:

 MyPrivateExtension extens V3Extension {
   ...
   public static final ObjectID oid = ...;

 }

 OCSPExtensions.register(MyPrivateExtension.oid, MyPrivateExtension.class);
 
Per default all OCSP extensions specified by RFC 2560 are implementend and registered by this class:

Version:
File Revision 7
See Also:
V3Extension, X509Extensions

Fields inherited from class iaik.x509.X509Extensions
critical_extensions, noncritical_extensions
 
Constructor Summary
OCSPExtensions()
          Default Constructor.
OCSPExtensions(ASN1Object extensions)
          Creates a new OCSPExtensions object from an ASN1Object.
 
Method Summary
 V3Extension getExtension(ObjectID oid)
          Returns a particular extension, specified by its object ID.
 ASN1Object toASN1Object()
          Returns this OCSPExtensions object as (SEQUENCE) ASN1Object.
 
Methods inherited from class iaik.x509.X509Extensions
addExtension, countExtensions, create, getCriticalExtensionOIDs, getExtensionValue, getNonCriticalExtensionOIDs, hasExtensions, hasUnsupportedCriticalExtension, listExtensions, parseExtensions, register, removeAllExtensions, removeExtension, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

OCSPExtensions

public OCSPExtensions()
Default Constructor. Creates a new OCSPExtensions object to be supplied with V3Extensions.

OCSPExtensions

public OCSPExtensions(ASN1Object extensions)
               throws X509ExtensionException
Creates a new OCSPExtensions object from an ASN1Object.

The given ASN1Object has the ASN.1 type "SEQUENCE of Extensions", and may have been created by calling the toASN1Objetct method.

Parameters:
extensions - the extensions as ASN1Object
Throws:
X509ExtensionException - if the extensions cannot be parsed
Method Detail

getExtension

public V3Extension getExtension(ObjectID oid)
                         throws X509ExtensionInitException
Returns a particular extension, specified by its object ID.

This method creates a new implementation of the class registered for this ObjectID and initializes it with its extension value. If the extension is an unknown extension, an UnknownExtension is returned. If the extension cannot be initialized properly because of some error, an X509ExtensionInitException is thrown.

Overrides:
getExtension in class X509Extensions
Parameters:
objectID - the object ID of the extension
Returns:
the desired extension if it is available, or null if not
Throws:
X509ExtensionInitException - if the extension can not be initialized

toASN1Object

public ASN1Object toASN1Object()
                        throws X509ExtensionException
Returns this OCSPExtensions object as (SEQUENCE) ASN1Object. The ASN1Object has the ASN.1 type "SEQUENCE of Extensions".
Overrides:
toASN1Object in class X509Extensions
Returns:
the extensions as ASN1Object.
Throws:
X509ExtensionException - if the extensions could not be created

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