|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbe.fedict.eid.applet.service.signer.AbstractXmlSignatureService
public abstract class AbstractXmlSignatureService
Abstract base class for an XML Signature Service implementation.
Constructor Summary | |
---|---|
AbstractXmlSignatureService(DigestAlgo digestAlgo)
Main constructor. |
Method Summary | |
---|---|
protected void |
addSignatureFacet(SignatureFacet signatureFacet)
Adds a signature facet to this XML signature service. |
protected String |
getCanonicalizationMethod()
|
protected Document |
getEnvelopingDocument()
Gives back the enveloping document. |
protected String |
getSignatureDescription()
Gives back the human-readable description of what the citizen will be signing. |
protected DigestAlgo |
getSignatureDigestAlgorithm()
Gives back the signature digest algorithm. |
protected abstract OutputStream |
getSignedDocumentOutputStream()
Gives back the output stream to which to write the signed XML document. |
protected abstract TemporaryDataStorage |
getTemporaryDataStorage()
Gives back a temporary data storage component. |
protected javax.xml.crypto.URIDereferencer |
getURIDereferencer()
Override this method to change the URI dereferener used by the signing engine. |
protected Document |
loadDocument(InputStream documentInputStream)
|
protected Document |
loadDocumentNoClose(InputStream documentInputStream)
|
void |
postSign(byte[] signatureValue,
List<X509Certificate> signingCertificateChain)
|
DigestInfo |
preSign(List<DigestInfo> digestInfos,
List<X509Certificate> signingCertificateChain)
|
protected void |
setSignatureId(String signatureId)
Sets the signature Id attribute value used to create the XML signature. |
protected void |
setSignatureNamespacePrefix(String signatureNamespacePrefix)
Sets the XML Signature namespace prefix to be used for signature creation. |
protected void |
writeDocument(Document document,
OutputStream documentOutputStream)
|
protected void |
writeDocumentNoClosing(Document document,
OutputStream documentOutputStream)
|
protected void |
writeDocumentNoClosing(Document document,
OutputStream documentOutputStream,
boolean omitXmlDeclaration)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface be.fedict.eid.applet.service.spi.SignatureService |
---|
getFilesDigestAlgorithm |
Constructor Detail |
---|
public AbstractXmlSignatureService(DigestAlgo digestAlgo)
Method Detail |
---|
protected void setSignatureId(String signatureId)
null
value will trigger an automatically generated signature
Id.
signatureId
- protected void setSignatureNamespacePrefix(String signatureNamespacePrefix)
null
value will omit the prefixing.
signatureNamespacePrefix
- protected void addSignatureFacet(SignatureFacet signatureFacet)
signatureFacet
- protected DigestAlgo getSignatureDigestAlgorithm()
protected Document getEnvelopingDocument() throws ParserConfigurationException, IOException, SAXException
null
in case
ds:Signature should be the top-level element. Implementations can
override this method to provide a custom enveloping document.
SAXException
IOException
ParserConfigurationException
protected javax.xml.crypto.URIDereferencer getURIDereferencer()
protected String getSignatureDescription()
protected abstract TemporaryDataStorage getTemporaryDataStorage()
protected abstract OutputStream getSignedDocumentOutputStream()
public DigestInfo preSign(List<DigestInfo> digestInfos, List<X509Certificate> signingCertificateChain) throws NoSuchAlgorithmException
preSign
in interface SignatureService
NoSuchAlgorithmException
public void postSign(byte[] signatureValue, List<X509Certificate> signingCertificateChain)
postSign
in interface SignatureService
protected String getCanonicalizationMethod()
protected void writeDocument(Document document, OutputStream documentOutputStream) throws TransformerConfigurationException, TransformerFactoryConfigurationError, TransformerException, IOException
TransformerConfigurationException
TransformerFactoryConfigurationError
TransformerException
IOException
protected void writeDocumentNoClosing(Document document, OutputStream documentOutputStream) throws TransformerConfigurationException, TransformerFactoryConfigurationError, TransformerException, IOException
TransformerConfigurationException
TransformerFactoryConfigurationError
TransformerException
IOException
protected void writeDocumentNoClosing(Document document, OutputStream documentOutputStream, boolean omitXmlDeclaration) throws TransformerConfigurationException, TransformerFactoryConfigurationError, TransformerException, IOException
TransformerConfigurationException
TransformerFactoryConfigurationError
TransformerException
IOException
protected Document loadDocument(InputStream documentInputStream) throws ParserConfigurationException, SAXException, IOException
ParserConfigurationException
SAXException
IOException
protected Document loadDocumentNoClose(InputStream documentInputStream) throws ParserConfigurationException, SAXException, IOException
ParserConfigurationException
SAXException
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |