iaik.x509.extensions
Class ErrorExtension

java.lang.Object
  |
  +--iaik.x509.V3Extension
        |
        +--iaik.x509.extensions.ErrorExtension

public class ErrorExtension
extends V3Extension

This class can be used to show extensions which can not be initialized because of an error.

An ErrorExtension only may be created when calling a listExtensions method that is based on the listExtensions() method of the X509Extensions class for obtaining an enumeration listing all the extensions included in, for instance, some particular certificate. The returned enumeration will contain an ErrorExtension for any extension which cannot be initialized because of some error (the DER encodig of the extension value is wrong, or the implementation is unable to parse the extension value).

An ErrorExtension always will be marked as being critical. It will contain the OID of the appertaining extension and can be queried for a message trying to explain the reason for the error.

Version:
File Revision 16
See Also:
X509Extensions

Fields inherited from class iaik.x509.V3Extension
critical
 
Constructor Summary
ErrorExtension(ObjectID objectID, boolean critical, String errorMessage)
          Creates a new broken extension.
 
Method Summary
 ObjectID getObjectID()
          Returns the ObjectID of the broken extension.
 int hashCode()
          Returns a hashcode for this identity.
 void init(ASN1Object obj)
          Implements the V3Extension Interface.
 ASN1Object toASN1Object()
          Only throws a X509ExtensionException, since an ErrorExtension only may be used for displaying information about some broken extension.
 String toString()
          Returns a string that represents the contents of this ErrorExtension.
 
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
 

Constructor Detail

ErrorExtension

public ErrorExtension(ObjectID objectID,
                      boolean critical,
                      String errorMessage)
Creates a new broken extension.
Parameters:
objectID - the ObjectID of the broken extension
critical - whether the broken extension is critical or not
errorMessage - a message describing the reason of the error
Method Detail

toASN1Object

public ASN1Object toASN1Object()
                        throws X509ExtensionException
Only throws a X509ExtensionException, since an ErrorExtension only may be used for displaying information about some broken extension.
Overrides:
toASN1Object in class V3Extension
Throws:
X509ExtensionException - since an ErrorExtension only may be used for displaying information about some broken extension

init

public void init(ASN1Object obj)
Implements the V3Extension Interface. This method does nothing.
Overrides:
init in class V3Extension
Following copied from class: iaik.x509.V3Extension
Parameters:
obj - the extension value as ASN1Object
Throws:
X509ExtensionException - if the extension could not parse the ASN1Object

hashCode

public int hashCode()
Returns a hashcode for this identity.
Overrides:
hashCode in class V3Extension
Returns:
a hash code for this identity

getObjectID

public ObjectID getObjectID()
Returns the ObjectID of the broken extension.
Overrides:
getObjectID in class V3Extension
Returns:
the ObjectID of the broken extension

toString

public String toString()
Returns a string that represents the contents of this ErrorExtension.
Overrides:
toString in class Object
Returns:
the string representation

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