|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--com.sun.identity.saml.xmlsig.XMLSignatureManager
The class XMLSignatureManager provides methods
to sign and verify xml signature.
| Method Summary | |
static XMLSignatureManager |
getInstance()
Gets the singleton instance of XMLSignatureManager with default KeyProvider and SignatureProvider |
static XMLSignatureManager |
getInstance(KeyProvider keyProvider,
SignatureProvider sigProvider)
Get an instance of XMLSignatureManager with specified KeyProvider and SignatureProvider |
KeyProvider |
getKeyProvider()
Get KeyProvider |
org.w3c.dom.Element |
signXML(org.w3c.dom.Document doc,
java.lang.String certAlias)
Sign the xml document using enveloped signatures. |
org.w3c.dom.Element |
signXML(org.w3c.dom.Document doc,
java.lang.String certAlias,
java.lang.String algorithm)
Sign the xml document using enveloped signatures. |
org.w3c.dom.Element |
signXML(org.w3c.dom.Document doc,
java.lang.String certAlias,
java.lang.String algorithm,
java.lang.String id)
Sign part of the xml document referered by the supplied id attribute using enveloped signatures and use exclusive xml canonicalization. |
org.w3c.dom.Element |
signXML(org.w3c.dom.Document doc,
java.lang.String certAlias,
java.lang.String algorithm,
java.lang.String id,
java.lang.String xpath)
Sign part of the xml document referered by the supplied id attribute using enveloped signatures and use exclusive xml canonicalization. |
java.lang.String |
signXML(java.lang.String XML,
java.lang.String certAlias)
Sign the xml string using enveloped signatures. |
java.lang.String |
signXML(java.lang.String XML,
java.lang.String certAlias,
java.lang.String algorithm)
Sign the xml string using enveloped signatures. |
java.lang.String |
signXML(java.lang.String xmlString,
java.lang.String certAlias,
java.lang.String algorithm,
java.lang.String id)
Sign the xml string using enveloped signatures. |
boolean |
verifyXMLSignature(org.w3c.dom.Document document)
Verify all the signatures of the xml document |
boolean |
verifyXMLSignature(org.w3c.dom.Document document,
java.lang.String certAlias)
Verify all the signatures of the xml document |
boolean |
verifyXMLSignature(org.w3c.dom.Element element)
Verify the signature of the xml document |
boolean |
verifyXMLSignature(org.w3c.dom.Element element,
java.lang.String certAlias)
Verify the signature of the xml document |
boolean |
verifyXMLSignature(java.lang.String XML)
Verify the signature of the xml string |
boolean |
verifyXMLSignature(java.lang.String XML,
java.lang.String certAlias)
Verify the signature of the xml string |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public static XMLSignatureManager getInstance()
public static XMLSignatureManager getInstance(KeyProvider keyProvider,
SignatureProvider sigProvider)
keyProvider - KeyProvidersigProvider - SignatureProvider
public org.w3c.dom.Element signXML(org.w3c.dom.Document doc,
java.lang.String certAlias)
throws XMLSignatureException
doc - XML dom objectcertAlias - Signer's certificate alias nameXMLSignatureException - if the document could not be signed
public org.w3c.dom.Element signXML(org.w3c.dom.Document doc,
java.lang.String certAlias,
java.lang.String algorithm)
throws XMLSignatureException
doc - XML dom objectcertAlias - Signer's certificate alias namealgorithm - signature algorithmXMLSignatureException - if the document could not be signed
public java.lang.String signXML(java.lang.String XML,
java.lang.String certAlias)
throws XMLSignatureException
xmlString - xml string to be signedcertAlias - Signer's certificate alias nameXMLSignatureException - if the xml string could not be signed
public java.lang.String signXML(java.lang.String XML,
java.lang.String certAlias,
java.lang.String algorithm)
throws XMLSignatureException
xmlString - xml string to be signedcertAlias - Signer's certificate alias namealgorithm - signature algorithmXMLSignatureException - if the xml string could not be signed
public org.w3c.dom.Element signXML(org.w3c.dom.Document doc,
java.lang.String certAlias,
java.lang.String algorithm,
java.lang.String id,
java.lang.String xpath)
throws XMLSignatureException
doc - XML dom objectcertAlias - Signer's certificate alias namealgorithm - XML signature algorithmid - id attribute value of the node to be signedxpath - expression should uniquly identify a node before which
the signature node will be insertedXMLSignatureException - if the document could not be signed
public org.w3c.dom.Element signXML(org.w3c.dom.Document doc,
java.lang.String certAlias,
java.lang.String algorithm,
java.lang.String id)
throws XMLSignatureException
doc - XML dom objectcertAlias - Signer's certificate alias namealgorithm - XML signature algorithmid - id attribute value of the node to be signedXMLSignatureException - if the document could not be signed
public java.lang.String signXML(java.lang.String xmlString,
java.lang.String certAlias,
java.lang.String algorithm,
java.lang.String id)
throws XMLSignatureException
xmlString - xml string to be signedcertAlias - Signer's certificate alias namealgorithm - XML Signature algorithmid - id attribute value of the node to be signedXMLSignatureException - if the xml string could not be signed
public boolean verifyXMLSignature(org.w3c.dom.Document document)
throws XMLSignatureException
doc - XML dom document whose signature to be verifiedXMLSignatureException - if problem occurs during verification
public boolean verifyXMLSignature(org.w3c.dom.Document document,
java.lang.String certAlias)
throws XMLSignatureException
doc - XML dom document whose signature to be verifiedcertAlias - alias for Signer's certificate, this is used to search
signer's public certificate if it is not presented in ds:KeyInfoXMLSignatureException - if problem occurs during verification
public boolean verifyXMLSignature(org.w3c.dom.Element element)
throws XMLSignatureException
doc - XML dom document whose signature to be verifiedXMLSignatureException - if problem occurs during verification
public boolean verifyXMLSignature(org.w3c.dom.Element element,
java.lang.String certAlias)
throws XMLSignatureException
doc - XML dom document whose signature to be verifiedcertAlias - alias for Signer's certificate, this is used to search
signer's public certificate if it is not presented in ds:KeyInfoXMLSignatureException - if problem occurs during verification
public boolean verifyXMLSignature(java.lang.String XML)
throws XMLSignatureException
xmlString - XML string whose signature to be verifiedXMLSignatureException - if problem occurs during verification
public boolean verifyXMLSignature(java.lang.String XML,
java.lang.String certAlias)
throws XMLSignatureException
xmlString - XML string whose signature to be verifiedcertAlias - alias for Signer's certificate, this is used to search
signer's public certificate if it is not presented in ds:KeyInfoXMLSignatureException - if problem occurs during verificationpublic KeyProvider getKeyProvider()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||