iaik.smime.ess.utils
Class ESSLayerException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by iaik.cms.CMSException
              extended by iaik.smime.SMimeException
                  extended by iaik.smime.ess.ESSException
                      extended by iaik.smime.ess.utils.ESSLayerException
All Implemented Interfaces:
java.io.Serializable

public class ESSLayerException
extends ESSException

This exception is thrown when a problem occurs while decomposing a S/MIME message into its layers. Calling method getReason may be used to get the reason code for the failure.

See Also:
Serialized Form

Field Summary
static int ATTRIBUTE_MISMATCH
          MLA exception "Attribute mismatch" (5).
static int ATTRIBUTE_PARSING_ERROR
          MLA exception "Error parsing attribute" (3).
static int CEK_DECRYPTION_ERROR
          MLA exception "Error decrypting content encryption key" (2).
static int CONTENT_PARSING_PROBLEM
          MLA exception "Error parsing MIME content" (0).
static int MAIL_LIST_EXPANSION_LOOP
          MLA exception "Mail list expansion loop" (3).
static int NO_DECRYPTION_KEY
          MLA exception "No decryption key" (0).
static int RECEIPT_REQUEST_IN_OUTER_LAYER
          MLA exception "ReceipRequest attribute not allowed in outer layer." (7).
static int SECURITY_LABEL
          MLA exception "Access denied by SecurityLabel attribute" (6).
static int SIGNATURE_VERIFICATION_ERROR
          MLA exception "Signature verification error." (8).
 
Constructor Summary
ESSLayerException(int reason, ESSLayer layer)
          Creates an ESSLayerException for the specified reason.
ESSLayerException(int reason, java.lang.Exception ex, ESSLayer layer)
          Creates an ESSLayerException for the specified reason and original exception.
ESSLayerException(int reason, java.lang.String message, ESSLayer layer)
          Creates an ESSLayerException for the specified reason and error message.
ESSLayerException(int reason, java.lang.String msg, java.lang.Exception ex, ESSLayer layer)
          Creates an ESSLayerException for the specified reason and message and original exception.
 
Method Summary
 ESSLayer getLayer()
          Gets the layer in which the exception has occured.
 int getReason()
          Returns the reason why no SignedReceipt has been created.
static java.lang.String getReasonMsg(int reason)
          Returns a message describing the given reason code.
 java.lang.Exception getWrappedException()
          Get the (original) exception that has caused this ESSLayerException.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CONTENT_PARSING_PROBLEM

public static final int CONTENT_PARSING_PROBLEM
MLA exception "Error parsing MIME content" (0). This exception is thrown if an error occurs when accessin/parsing the content of an S/MIME layer.

See Also:
Constant Field Values

NO_DECRYPTION_KEY

public static final int NO_DECRYPTION_KEY
MLA exception "No decryption key" (0). This exception is thrown if a composed S/MIME layer contains an enveloped layer but no key is available to decrypt the layer.

See Also:
Constant Field Values

CEK_DECRYPTION_ERROR

public static final int CEK_DECRYPTION_ERROR
MLA exception "Error decrypting content encryption key" (2). This exception is thrown if an error occurs when trying to decrypt the content encryption key of an enveloped layer.

See Also:
Constant Field Values

ATTRIBUTE_PARSING_ERROR

public static final int ATTRIBUTE_PARSING_ERROR
MLA exception "Error parsing attribute" (3). This exception is thrown if an error occurs while parsing an attribute included, e.g. in a signed content.

See Also:
Constant Field Values

ATTRIBUTE_MISMATCH

public static final int ATTRIBUTE_MISMATCH
MLA exception "Attribute mismatch" (5). This exception indicates that there are ESS attributes included in a SignedData layer that are not identical, but are requested to be identical by the ESS specification (e.g. any ReceiptRequest attribute of a SignedData layer has to be identical).

See Also:
Constant Field Values

MAIL_LIST_EXPANSION_LOOP

public static final int MAIL_LIST_EXPANSION_LOOP
MLA exception "Mail list expansion loop" (3). This exception is thrown if a mail list expansion loop is detected while handling a SignedData layer (the MLA detects its own ID among the MLData records it has received).

See Also:
Constant Field Values

SECURITY_LABEL

public static final int SECURITY_LABEL
MLA exception "Access denied by SecurityLabel attribute" (6). This exception is thrown if a signed layer contains a SecurityLabel attribute that does not allow to access the content of the layer.

See Also:
Constant Field Values

RECEIPT_REQUEST_IN_OUTER_LAYER

public static final int RECEIPT_REQUEST_IN_OUTER_LAYER
MLA exception "ReceipRequest attribute not allowed in outer layer." (7). This exception indicates that an outer signed layer has been found where any of the SignerInfos contains a ReceiptRequest attribute (which is not allowed).

See Also:
Constant Field Values

SIGNATURE_VERIFICATION_ERROR

public static final int SIGNATURE_VERIFICATION_ERROR
MLA exception "Signature verification error." (8). This exception indicates that some of the signatures of a signed layer is invalid.

See Also:
Constant Field Values
Constructor Detail

ESSLayerException

public ESSLayerException(int reason,
                         ESSLayer layer)
Creates an ESSLayerException for the specified reason. The reason may be one of the following:

Parameters:
reason - the reason why no SignedReceipt has been created
layer - the layer in which the exception occured

ESSLayerException

public ESSLayerException(int reason,
                         java.lang.String message,
                         ESSLayer layer)
Creates an ESSLayerException for the specified reason and error message. The reason may be one of the following:

Parameters:
reason - the reason why no SignedReceipt has been created
message - the error message
layer - the layer in which the exception occured

ESSLayerException

public ESSLayerException(int reason,
                         java.lang.Exception ex,
                         ESSLayer layer)
Creates an ESSLayerException for the specified reason and original exception. The reason may be one of the following:

Parameters:
reason - the reason why no SignedReceipt has been created
ex - the (original) exception that has caused this ESSLayerException
layer - the layer in which the exception occured

ESSLayerException

public ESSLayerException(int reason,
                         java.lang.String msg,
                         java.lang.Exception ex,
                         ESSLayer layer)
Creates an ESSLayerException for the specified reason and message and original exception. The reason may be one of the following:

Parameters:
reason - the reason why no SignedReceipt has been created
msg - the message string describing this exception
ex - the (original) exception that has caused this ESSLayerException
Method Detail

getReason

public int getReason()
Returns the reason why no SignedReceipt has been created. The returned reason may be one of the following:

Returns:
the reason why no SignedReceipt has been created

getWrappedException

public java.lang.Exception getWrappedException()
Get the (original) exception that has caused this ESSLayerException.

Returns:
the (original) exception that has caused this ESSLayerException; maybe null if this ESSLayerException itself is the original exception

getLayer

public ESSLayer getLayer()
Gets the layer in which the exception has occured.

Returns:
the layer in which the exception has occured

getReasonMsg

public static java.lang.String getReasonMsg(int reason)
Returns a message describing the given reason code.

Parameters:
reason - the reason code

This Javadoc may contain text parts from text parts from IETF Internet Standard specifications (see copyright note).

IAIK-CMS 6.0, (c) 2002 IAIK, (c) 2003, 2023 SIC