public class SignedInfo extends Manifest
<ds:SignedInfo> elements
This SignedInfo element includes the canonicalization algorithm,
a signature algorithm, and one or more references.MAXIMUM_REFERENCE_COUNTbaseURI, constructionElement, doc| Constructor and Description |
|---|
SignedInfo(org.w3c.dom.Document doc)
Overwrites
Manifest.addDocument(java.lang.String, java.lang.String, org.apache.xml.security.transforms.Transforms, java.lang.String, java.lang.String, java.lang.String) because it creates another
Element. |
SignedInfo(org.w3c.dom.Document doc,
org.w3c.dom.Element signatureMethodElem,
org.w3c.dom.Element canonicalizationMethodElem) |
SignedInfo(org.w3c.dom.Document doc,
java.lang.String signatureMethodURI,
int hMACOutputLength,
java.lang.String canonicalizationMethodURI)
Constructor SignedInfo
|
SignedInfo(org.w3c.dom.Document doc,
java.lang.String signatureMethodURI,
java.lang.String canonicalizationMethodURI)
Constructs
SignedInfo using given Canonicalization algorithm and
Signature algorithm. |
SignedInfo(org.w3c.dom.Element element,
java.lang.String baseURI)
Build a
SignedInfo from an Element |
SignedInfo(org.w3c.dom.Element element,
java.lang.String baseURI,
boolean secureValidation)
Build a
SignedInfo from an Element |
| Modifier and Type | Method and Description |
|---|---|
javax.crypto.SecretKey |
createSecretKey(byte[] secretKeyBytes)
Creates a SecretKey for the appropriate Mac algorithm based on a
byte[] array password.
|
java.lang.String |
getBaseLocalName()
Method getBaseLocalName
|
java.lang.String |
getCanonicalizationMethodURI()
Returns the Canonicalization method URI
|
byte[] |
getCanonicalizedOctetStream()
Returns getCanonicalizedOctetStream
|
java.lang.String |
getInclusiveNamespaces() |
protected SignatureAlgorithm |
getSignatureAlgorithm() |
org.w3c.dom.Element |
getSignatureMethodElement()
Method getSignatureMethodElement
|
java.lang.String |
getSignatureMethodURI()
Returns the Signature method URI
|
void |
signInOctetStream(java.io.OutputStream os)
Output the C14n stream to the given OutputStream.
|
boolean |
verify()
Tests core validation process
|
boolean |
verify(boolean followManifests)
Tests core validation process
|
addDocument, addResourceResolver, addResourceResolver, generateDigestValues, getId, getLength, getPerManifestResolvers, getReferencedContentAfterTransformsItem, getReferencedContentBeforeTransformsItem, getResolverProperties, getResolverProperty, getSignedContentItem, getSignedContentLength, getVerificationResult, item, setId, setResolverProperty, verifyReferences, verifyReferencesgetBaseNamespaceaddBase64Element, addBase64Text, addBigIntegerElement, addText, addTextElement, createElementForFamily, createElementForFamilyLocal, getBaseURI, getBigIntegerFromChildElement, getBytesFromChildElement, getBytesFromTextChild, getDefaultPrefix, getDocument, getElement, getElementPlusReturns, getTextFromChildElement, getTextFromTextChild, length, registerDefaultPrefixes, setDefaultPrefix, setElement, setXPathNamespaceContextpublic SignedInfo(org.w3c.dom.Document doc)
throws XMLSecurityException
Manifest.addDocument(java.lang.String, java.lang.String, org.apache.xml.security.transforms.Transforms, java.lang.String, java.lang.String, java.lang.String) because it creates another
Element.doc - the Document in which XMLsignature will
be placedXMLSecurityExceptionpublic SignedInfo(org.w3c.dom.Document doc,
java.lang.String signatureMethodURI,
java.lang.String canonicalizationMethodURI)
throws XMLSecurityException
SignedInfo using given Canonicalization algorithm and
Signature algorithm.doc - SignedInfo is placed in this documentsignatureMethodURI - URI representation of the Digest and
Signature algorithmcanonicalizationMethodURI - URI representation of the
Canonicalization methodXMLSecurityExceptionpublic SignedInfo(org.w3c.dom.Document doc,
java.lang.String signatureMethodURI,
int hMACOutputLength,
java.lang.String canonicalizationMethodURI)
throws XMLSecurityException
doc - SignedInfo is placed in this documentsignatureMethodURI - URI representation of the Digest and
Signature algorithmhMACOutputLength - canonicalizationMethodURI - URI representation of the
Canonicalization methodXMLSecurityExceptionpublic SignedInfo(org.w3c.dom.Document doc,
org.w3c.dom.Element signatureMethodElem,
org.w3c.dom.Element canonicalizationMethodElem)
throws XMLSecurityException
doc - signatureMethodElem - canonicalizationMethodElem - XMLSecurityExceptionpublic SignedInfo(org.w3c.dom.Element element,
java.lang.String baseURI)
throws XMLSecurityException
SignedInfo from an Elementelement - SignedInfobaseURI - the URI of the resource where the XML instance was storedXMLSecurityExceptionpublic SignedInfo(org.w3c.dom.Element element,
java.lang.String baseURI,
boolean secureValidation)
throws XMLSecurityException
SignedInfo from an Elementelement - SignedInfobaseURI - the URI of the resource where the XML instance was storedsecureValidation - whether secure validation is enabled or notXMLSecurityExceptionpublic boolean verify()
throws MissingResourceFailureException,
XMLSecurityException
MissingResourceFailureExceptionXMLSecurityExceptionpublic boolean verify(boolean followManifests)
throws MissingResourceFailureException,
XMLSecurityException
followManifests - defines whether the verification process has to verify referenced ds:Manifests, tooMissingResourceFailureExceptionXMLSecurityExceptionpublic byte[] getCanonicalizedOctetStream()
throws CanonicalizationException,
InvalidCanonicalizerException,
XMLSecurityException
SignedInfo elementCanonicalizationExceptionInvalidCanonicalizerExceptionXMLSecurityExceptionpublic void signInOctetStream(java.io.OutputStream os)
throws CanonicalizationException,
InvalidCanonicalizerException,
XMLSecurityException
os - CanonicalizationExceptionInvalidCanonicalizerExceptionXMLSecurityExceptionpublic java.lang.String getCanonicalizationMethodURI()
public java.lang.String getSignatureMethodURI()
public org.w3c.dom.Element getSignatureMethodElement()
public javax.crypto.SecretKey createSecretKey(byte[] secretKeyBytes)
secretKeyBytes - protected SignatureAlgorithm getSignatureAlgorithm()
public java.lang.String getBaseLocalName()
getBaseLocalName in class Manifestpublic java.lang.String getInclusiveNamespaces()