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.
- See Also:
X509Extensions
|
Constructor Summary |
ErrorExtension(ObjectID objectID,
boolean critical,
java.lang.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. |
java.lang.String |
toString()
Returns a string that represents the contents of this
ErrorExtension. |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
notify,
notifyAll,
wait,
wait,
wait |
ErrorExtension
public ErrorExtension(ObjectID objectID,
boolean critical,
java.lang.String errorMessage)
- Creates a new broken extension.
- Parameters:
objectID - the ObjectID of the broken extensioncritical - whether the broken extension is critical or noterrorMessage - a message describing the reason of the error
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
- Tags copied from class: 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 java.lang.String toString()
- Returns a string that represents the contents of this
ErrorExtension.
- Overrides:
- toString in class java.lang.Object
- Returns:
- the string representation