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| Constructor and Description |
|---|
SignedInfo(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(Document doc,
Element signatureMethodElem,
Element canonicalizationMethodElem) |
SignedInfo(Document doc,
Element signatureMethodElem,
Element canonicalizationMethodElem,
Provider provider) |
SignedInfo(Document doc,
String signatureMethodURI,
int hMACOutputLength,
String canonicalizationMethodURI)
Constructor SignedInfo
|
SignedInfo(Document doc,
String signatureMethodURI,
int hMACOutputLength,
String canonicalizationMethodURI,
Provider provider,
AlgorithmParameterSpec spec)
Constructs
SignedInfo using given Canonicalization algorithm and
Signature algorithm. |
SignedInfo(Document doc,
String signatureMethodURI,
String canonicalizationMethodURI)
Constructs
SignedInfo using given Canonicalization algorithm and
Signature algorithm. |
SignedInfo(Document doc,
String signatureMethodURI,
String canonicalizationMethodURI,
Provider provider)
Constructs
SignedInfo using given Canonicalization algorithm and
Signature algorithm. |
SignedInfo(Element element,
String baseURI)
Build a
SignedInfo from an Element |
SignedInfo(Element element,
String baseURI,
boolean secureValidation)
Build a
SignedInfo from an Element |
SignedInfo(Element element,
String baseURI,
boolean secureValidation,
Provider provider)
Build a
SignedInfo from an Element |
| Modifier and Type | Method and Description |
|---|---|
SecretKey |
createSecretKey(byte[] secretKeyBytes)
Creates a SecretKey for the appropriate Mac algorithm based on a
byte[] array password.
|
String |
getBaseLocalName()
Method getBaseLocalName
Method getBaseLocalName
Returns the localname of the Elements of the sub-class.
|
String |
getCanonicalizationMethodURI()
Returns the Canonicalization method URI
|
byte[] |
getCanonicalizedOctetStream()
Returns getCanonicalizedOctetStream
|
String |
getInclusiveNamespaces() |
SignatureAlgorithm |
getSignatureAlgorithm() |
Element |
getSignatureMethodElement()
Method getSignatureMethodElement
|
String |
getSignatureMethodURI()
Returns the Signature method URI
|
void |
signInOctetStream(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, generateDigestValues, getId, getLength, getPerManifestResolvers, getReferencedContentAfterTransformsItem, getReferencedContentBeforeTransformsItem, getResolverProperties, getResolverProperty, getSignedContentItem, getSignedContentLength, getVerificationResult, getVerificationResults, isSecureValidation, item, setId, setResolverProperty, verifyReferences, verifyReferencesgetBaseNamespaceaddBase64Element, addBase64Text, addBigIntegerElement, addReturnToSelf, addText, addTextElement, appendOther, appendSelf, appendSelf, createElementForFamily, createElementForFamilyLocal, createText, getBaseURI, getBigIntegerFromChildElement, getBytesFromTextChild, getDefaultPrefix, getDocument, getElement, getElementPlusReturns, getFirstChild, getLocalAttribute, getTextFromChildElement, getTextFromTextChild, length, registerDefaultPrefixes, setDefaultPrefix, setDocument, setElement, setElement, setLocalAttribute, setLocalIdAttribute, setXPathNamespaceContextpublic SignedInfo(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(Document doc, String signatureMethodURI, 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(Document doc, String signatureMethodURI, String canonicalizationMethodURI, Provider provider) 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 methodprovider - security provider to useXMLSecurityExceptionpublic SignedInfo(Document doc, String signatureMethodURI, int hMACOutputLength, 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(Document doc, String signatureMethodURI, int hMACOutputLength, String canonicalizationMethodURI, Provider provider, AlgorithmParameterSpec spec) throws XMLSecurityException
SignedInfo using given Canonicalization algorithm and
Signature algorithm.doc - SignedInfo is placed in this documentsignatureMethodURI - URI representation of the Digest and
Signature algorithmhMACOutputLength - canonicalizationMethodURI - URI representation of the
Canonicalization methodprovider - security provider to usespec - AlgorithmParameterSpec to useXMLSecurityExceptionpublic SignedInfo(Document doc, Element signatureMethodElem, Element canonicalizationMethodElem) throws XMLSecurityException
doc - signatureMethodElem - canonicalizationMethodElem - XMLSecurityExceptionpublic SignedInfo(Document doc, Element signatureMethodElem, Element canonicalizationMethodElem, Provider provider) throws XMLSecurityException
XMLSecurityExceptionpublic SignedInfo(Element element, String baseURI) throws XMLSecurityException
SignedInfo from an Elementelement - SignedInfobaseURI - the URI of the resource where the XML instance was storedXMLSecurityExceptionpublic SignedInfo(Element element, 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 SignedInfo(Element element, String baseURI, boolean secureValidation, Provider provider) throws XMLSecurityException
SignedInfo from an Elementelement - SignedInfobaseURI - the URI of the resource where the XML instance was storedsecureValidation - whether secure validation is enabled or notprovider - security provider to useXMLSecurityExceptionpublic 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,
IOException
SignedInfo elementCanonicalizationExceptionInvalidCanonicalizerExceptionXMLSecurityExceptionIOExceptionpublic void signInOctetStream(OutputStream os) throws CanonicalizationException, InvalidCanonicalizerException, XMLSecurityException
os - CanonicalizationExceptionInvalidCanonicalizerExceptionXMLSecurityExceptionpublic String getCanonicalizationMethodURI()
public String getSignatureMethodURI()
public Element getSignatureMethodElement()
public SecretKey createSecretKey(byte[] secretKeyBytes)
secretKeyBytes - public SignatureAlgorithm getSignatureAlgorithm()
public String getBaseLocalName()
getBaseLocalName in class Manifestpublic String getInclusiveNamespaces()
Copyright © 2000–2020 The Apache Software Foundation. All rights reserved.