be.fedict.eid.applet.service.signer.facets
Class EnvelopedSignatureFacet

java.lang.Object
  extended by be.fedict.eid.applet.service.signer.facets.EnvelopedSignatureFacet
All Implemented Interfaces:
SignatureFacet

public class EnvelopedSignatureFacet
extends Object
implements SignatureFacet

Signature Facet implementation to create enveloped signatures.

Author:
Frank Cornelis

Constructor Summary
EnvelopedSignatureFacet()
          Default constructor.
EnvelopedSignatureFacet(DigestAlgo digestAlgorithm)
          Main constructor.
 
Method Summary
 void postSign(Element signatureElement, List<X509Certificate> signingCertificateChain)
          This method is being invoked by the XML signature service engine during the post-sign phase.
 void preSign(javax.xml.crypto.dsig.XMLSignatureFactory signatureFactory, Document document, String signatureId, List<X509Certificate> signingCertificateChain, List<javax.xml.crypto.dsig.Reference> references, List<javax.xml.crypto.dsig.XMLObject> objects)
          This method is being invoked by the XML signature service engine during pre-sign phase.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EnvelopedSignatureFacet

public EnvelopedSignatureFacet()
Default constructor. Digest algorithm will be SHA-1.


EnvelopedSignatureFacet

public EnvelopedSignatureFacet(DigestAlgo digestAlgorithm)
Main constructor.

Parameters:
digestAlgorithm - the digest algorithm to be used within the ds:Reference element. Possible values: "SHA-1", "SHA-256, or "SHA-512".
Method Detail

postSign

public void postSign(Element signatureElement,
                     List<X509Certificate> signingCertificateChain)
Description copied from interface: SignatureFacet
This method is being invoked by the XML signature service engine during the post-sign phase. Via this method a signature facet can extend the XML signatures with for example key information.

Specified by:
postSign in interface SignatureFacet

preSign

public void preSign(javax.xml.crypto.dsig.XMLSignatureFactory signatureFactory,
                    Document document,
                    String signatureId,
                    List<X509Certificate> signingCertificateChain,
                    List<javax.xml.crypto.dsig.Reference> references,
                    List<javax.xml.crypto.dsig.XMLObject> objects)
             throws NoSuchAlgorithmException,
                    InvalidAlgorithmParameterException
Description copied from interface: SignatureFacet
This method is being invoked by the XML signature service engine during pre-sign phase. Via this method a signature facet implementation can add signature facets to an XML signature.

Specified by:
preSign in interface SignatureFacet
signingCertificateChain - the optional signing certificate chain
Throws:
NoSuchAlgorithmException
InvalidAlgorithmParameterException


Copyright © 2008-2012 FedICT. All Rights Reserved.