public class OCSPExtensions extends X509Extensions
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:
V3Extension,
X509Extensionscritical_extensions, noncritical_extensions, ordered_extensions| Constructor and Description |
|---|
OCSPExtensions()
Default Constructor.
|
OCSPExtensions(ASN1Object extensions)
Creates a new OCSPExtensions object from an ASN1Object.
|
| Modifier and Type | Method and Description |
|---|---|
V3Extension |
getExtension(ObjectID oid)
Returns a particular extension, specified by its object ID.
|
ASN1Object |
toASN1Object()
Returns this OCSPExtensions object as (SEQUENCE) ASN1Object.
|
addExtension, countExtensions, create, getCriticalExtensionOIDs, getExtensionValue, getNonCriticalExtensionOIDs, hasExtensions, hasUnsupportedCriticalExtension, listExtensions, parseExtensions, register, removeAllExtensions, removeExtension, toASN1Object, toStringpublic OCSPExtensions()
OCSPExtensions object to be supplied
with V3Extensions.public OCSPExtensions(ASN1Object extensions) throws X509ExtensionException
The given ASN1Object has the ASN.1 type "SEQUENCE of Extensions", and may
have been created by calling the toASN1Objetct method.
extensions - the extensions as ASN1ObjectX509ExtensionException - if the extensions cannot be parsedpublic V3Extension getExtension(ObjectID oid) throws X509ExtensionInitException
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.
getExtension in class X509ExtensionsobjectID - the object ID of the extensionnull if notX509ExtensionInitException - if the extension can not be initializedpublic ASN1Object toASN1Object() throws X509ExtensionException
toASN1Object in class X509ExtensionsX509ExtensionException - if the extensions could not be created