iaik.smime.ess.utils
Class SignedESSLayer

java.lang.Object
  extended by iaik.smime.ess.utils.ESSLayer
      extended by iaik.smime.ess.utils.SignedESSLayer

public class SignedESSLayer
extends ESSLayer

An ESS layer holding a signed S/MIME entity.


Field Summary
 
Fields inherited from class iaik.smime.ess.utils.ESSLayer
content_, dataHandler_, ENVELOPED_DATA, SIGNED_DATA, type_
 
Constructor Summary
SignedESSLayer(SignedContent content)
          Creates an ESSLayer for the given signed content.
 
Method Summary
 boolean allSignaturesValid()
          Checks if the signatures of all included SignerInfos are valid.
 EquivalentLabels getEquivalentLabels()
          Gets the EquivalentLabels attribute, if present in this signed ESS layer.
 ESSSecurityLabel getESSSecurityLabel()
          Gets the ESSSecurityLabel attribute, if present in this signed ESS layer.
 MLExpansionHistory getMLExpansionHistory()
          Gets the MLExpansionHistory attribute, if present in this (outer) signed ESS layer.
 ReceiptRequest getReceiptRequest()
          Gets the ReceiptRequest attribute, if present in this (inner) signed ESS layer.
 SignerInfo[] getSignerInfosWithMLExpansionHistory()
          Gets all SignerInfos of this signed layer that contain a MLExpansionHistory attribute.
 SignerInfo[] getSignerInfosWithReceiptRequest()
          Gets all SignerInfos of this signed layer that contain a ReceiptRequest attribute.
 SignerInfoVerificationResult[] getSignerInfoVerificationResults()
          Gets the signature verification results for all included SignerInfos.
 SignerInfoVerificationResult getSignerInfoVerificationResults(CertificateIdentifier signerID)
          Gets the signature verification result for the SignerInfo with the given signer id.
 boolean isOuterLayer()
          Asks whether this signed layer is the outer layer.
 void setIsOuterLayer(boolean isOuterLayer)
          Sets if this signed layer is the outer layer.
 
Methods inherited from class iaik.smime.ess.utils.ESSLayer
getContent, getDataHandler, getException, getType, setDataHandler
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SignedESSLayer

public SignedESSLayer(SignedContent content)
Creates an ESSLayer for the given signed content.

Parameters:
content - the SignedContent for this ESSLayer
Method Detail

getESSSecurityLabel

public ESSSecurityLabel getESSSecurityLabel()
                                     throws CodingException,
                                            ESSException
Gets the ESSSecurityLabel attribute, if present in this signed ESS layer.

Returns:
the ESSSecurityLabel attribute if present in this signed layer
Throws:
CodingException - if an error occurs when decoding some included ESSSecurityLabel attribute
ESSException - if this layer contains ESSSecurityLabel attributes that are not identical (according the ESS specification ( RFC2634 all ESSSecurityLabel attributes included in a SignedData layer must be identical); or if any, but not all of the SignerInfos do contain an ESSSecurityLabel attribute (according the ESS specification ( RFC2634 either all or none of the SignerInfos of a SignedData must contain an (identical) ESSSecurityLabel attribute

getEquivalentLabels

public EquivalentLabels getEquivalentLabels()
                                     throws CodingException,
                                            ESSException
Gets the EquivalentLabels attribute, if present in this signed ESS layer.

Returns:
the EquivalentLabels attribute if present in this signed layer
Throws:
CodingException - if an error occurs when decoding some included EquivalentLabels attribute
ESSException - if this layer contains EquivalentLabels attributes that are not identical (according the ESS specification ( RFC2634 all EquivalentLabels attributes included in a SignedData layer must be identical); or if any, but not all of the SignerInfos do contain an EquivalentLabels attribute (according the ESS specification ( RFC2634 either all or none of the SignerInfos of a SignedData must contain an (identical) EquivalentLabels attribute

getSignerInfoVerificationResults

public SignerInfoVerificationResult[] getSignerInfoVerificationResults()
Gets the signature verification results for all included SignerInfos.

Returns:
the signature verification results for all included SignerInfos.

getSignerInfoVerificationResults

public SignerInfoVerificationResult getSignerInfoVerificationResults(CertificateIdentifier signerID)
Gets the signature verification result for the SignerInfo with the given signer id.

Parameters:
signerID - the id of the SignerInfo for which verification information is requested
Returns:
the signature verification results for the identified SignerInfo, or null if there is no verification result for this signer included

allSignaturesValid

public boolean allSignaturesValid()
Checks if the signatures of all included SignerInfos are valid.

Returns:
true if all signatures have been successfully verified and are valid; false if there is any verified but invalid signature or if there is any siganture that cannot be verified for some reason (e.g. if the signer certificate is missing)

isOuterLayer

public boolean isOuterLayer()
Asks whether this signed layer is the outer layer.

Returns:
true if this layer is the outer layer, false if not

setIsOuterLayer

public void setIsOuterLayer(boolean isOuterLayer)
Sets if this signed layer is the outer layer.

Parameters:
isOuterLayer - indicates if this signed layer is the outer layer

getMLExpansionHistory

public MLExpansionHistory getMLExpansionHistory()
Gets the MLExpansionHistory attribute, if present in this (outer) signed ESS layer. A MLExpansionHistory attribute only may be present in the outer signed layer of a multi-layered ESS S/MIME message.

Returns:
the MLExpansionHistory attribute if present in this (outer) signed layer

getSignerInfosWithMLExpansionHistory

public SignerInfo[] getSignerInfosWithMLExpansionHistory()
Gets all SignerInfos of this signed layer that contain a MLExpansionHistory attribute.

Returns:
an array holding all the SignerInfos of this layer that contain a MLExpansionHistory attribute; the array may be empty (if no SignerInfo contains a MLExpansionHistory attribute)

getReceiptRequest

public ReceiptRequest getReceiptRequest()
Gets the ReceiptRequest attribute, if present in this (inner) signed ESS layer. A ReceiptRequest attribute only may be present in the inner signed layer of a multi-layered ESS S/MIME message.

Returns:
the ReceiptRequest attribute if present in this (inner) signed layer

getSignerInfosWithReceiptRequest

public SignerInfo[] getSignerInfosWithReceiptRequest()
Gets all SignerInfos of this signed layer that contain a ReceiptRequest attribute.

Returns:
an array holding all the SignerInfos of this layer that contain a ReceiptRequest attribute; the array may be empty (if no SignerInfo contains a ReceiptRequest attribute)

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