|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.xml.security.utils.ElementProxy | +--org.apache.xml.security.utils.SignatureElementProxy | +--org.apache.xml.security.signature.Manifest
Handles <ds:Manifest>
elements.
This element holds the Reference
elements
Field Summary |
Fields inherited from class org.apache.xml.security.utils.ElementProxy |
_baseURI, _constructionElement, _doc, _state, MODE_CREATE, MODE_DECRYPT, MODE_ENCRYPT, MODE_PROCESS, MODE_SIGN, MODE_UNKNOWN, MODE_VERIFY |
Constructor Summary | |
Manifest(org.w3c.dom.Document doc)
Consturts Manifest |
|
Manifest(org.w3c.dom.Element element,
java.lang.String BaseURI)
Constructor Manifest |
Method Summary | |
void |
addDocument(java.lang.String BaseURI,
java.lang.String referenceURI,
Transforms transforms,
java.lang.String digestURI,
java.lang.String ReferenceId,
java.lang.String ReferenceType)
This addDocument method is used to add a new resource to the
signed info. |
void |
addResourceResolver(ResourceResolver resolver)
Adds Resource Resolver for retrieving resources at specified URI attribute in reference element |
void |
addResourceResolver(ResourceResolverSpi resolverSpi)
Adds Resource Resolver for retrieving resources at specified URI attribute in reference element |
void |
generateDigestValues()
The calculation of the DigestValues in the References must be after the References are already added to the document and during the signing process. |
java.lang.String |
getBaseLocalName()
Method getBaseLocalName |
java.lang.String |
getId()
Returns the Id attribute |
int |
getLength()
Return the nonnegative number of added references. |
XMLSignatureInput |
getReferencedContentAfterTransformsItem(int i)
Method getReferencedContentAfterTransformsItem |
XMLSignatureInput |
getReferencedContentBeforeTransformsItem(int i)
Method getReferencedContentPriorTransformsItem |
java.lang.String |
getResolverProperty(java.lang.String key)
Returns the value at specified key |
byte[] |
getSignedContentItem(int i)
Method getSignedContentItem |
int |
getSignedContentLength()
Method getSignedContentLength |
boolean |
getVerificationResult(int index)
After verifying a Manifest or a SignedInfo using the
verifyReferences() or SignedInfo.verify() methods,
the individual results can be retrieved with this method. |
Reference |
item(int i)
Return the |
void |
setId(java.lang.String Id)
Sets the Id attribute |
void |
setResolverProperty(java.lang.String key,
java.lang.String value)
Used to pass parameters like proxy servers etc to the ResourceResolver implementation. |
boolean |
verifyReferences()
Used to do a reference validation of all enclosed references using the Reference.verify() method.
|
boolean |
verifyReferences(boolean followManifests)
Used to do a reference validation of all enclosed references using the Reference.verify() method.
|
Methods inherited from class org.apache.xml.security.utils.SignatureElementProxy |
getBaseNamespace |
Methods inherited from class org.apache.xml.security.utils.ElementProxy |
addBase64Element, addBase64Text, addBigIntegerElement, addText, addTextElement, createElementForFamily, getBaseURI, getBigIntegerFromChildElement, getBytesFromChildElement, getBytesFromTextChild, getChildElementLocalName, getDefaultPrefix, getDocument, getElement, getElementPlusReturns, getTextFromChildElement, getTextFromTextChild, guaranteeThatElementInCorrectSpace, length, setDefaultPrefix, setElement, setXPathNamespaceContext |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Manifest(org.w3c.dom.Document doc)
Manifest
doc
- the Document
in which XMLsignature
is placedpublic Manifest(org.w3c.dom.Element element, java.lang.String BaseURI) throws XMLSecurityException
element
- BaseURI
-
XMLSecurityException
Method Detail |
public void addDocument(java.lang.String BaseURI, java.lang.String referenceURI, Transforms transforms, java.lang.String digestURI, java.lang.String ReferenceId, java.lang.String ReferenceType) throws XMLSignatureException
addDocument
method is used to add a new resource to the
signed info. A Reference
is built
from the supplied values.
BaseURI
- the URI of the resource where the XML instance was storedreferenceURI
- URI
attribute in Reference
for specifing where data istransforms
- org.apache.xml.security.signature.Transforms object with an ordered list of transformations to be performed.digestURI
- The digest algorthim URI to be used.ReferenceId
- ReferenceType
-
XMLSignatureException
public void generateDigestValues() throws XMLSignatureException, ReferenceNotInitializedException
ReferenceNotInitializedException
XMLSignatureException
public int getLength()
public Reference item(int i) throws XMLSecurityException
i
values are 0 to {link@ getSize}-1
.
i
- Index of the requested Reference
XMLSecurityException
public void setId(java.lang.String Id)
Id
attribute
Id
- the Id
attribute in ds:Manifest
public java.lang.String getId()
Id
attribute
Id
attribute in ds:Manifest
public boolean verifyReferences() throws MissingResourceFailureException, XMLSecurityException
Reference.verify()
method.
This step loops through all Reference
s and does verify the hash
values. If one or more verifications fail, the method returns
false
. If all verifications are successful,
it returns true
. The results of the individual reference
validations are available by using the getVerificationResult(int)
method
MissingResourceFailureException
- if a Reference
does not verify (throws a ReferenceNotInitializedException
because of an uninitialized XMLSignatureInput
XMLSecurityException
Reference.verify()
,
SignedInfo.verify()
,
MissingResourceFailureException
public boolean verifyReferences(boolean followManifests) throws MissingResourceFailureException, XMLSecurityException
Reference.verify()
method.
This step loops through all Reference
s and does verify the hash
values. If one or more verifications fail, the method returns
false
. If all verifications are successful,
it returns true
. The results of the individual reference
validations are available by using the getVerificationResult(int)
method
followManifests
-
MissingResourceFailureException
- if a Reference
does not verify (throws a ReferenceNotInitializedException
because of an uninitialized XMLSignatureInput
XMLSecurityException
Reference.verify()
,
SignedInfo.verify()
,
MissingResourceFailureException
public boolean getVerificationResult(int index) throws XMLSecurityException
Manifest
or a SignedInfo
using the
verifyReferences()
or SignedInfo.verify()
methods,
the individual results can be retrieved with this method.
index
- an index of into a Manifest
or a SignedInfo
XMLSecurityException
public void addResourceResolver(ResourceResolver resolver)
URI
attribute in reference
element
resolver
- ResourceResolver
can provide the implemenatin subclass of ResourceResolverSpi
for retrieving resource.public void addResourceResolver(ResourceResolverSpi resolverSpi)
URI
attribute in reference
element
resolverSpi
- the implemenatin subclass of ResourceResolverSpi
for retrieving resource.public void setResolverProperty(java.lang.String key, java.lang.String value)
key
- the keyvalue
- the valuepublic java.lang.String getResolverProperty(java.lang.String key)
key
- the key
public byte[] getSignedContentItem(int i) throws XMLSignatureException
i
-
XMLSignatureException
public XMLSignatureInput getReferencedContentBeforeTransformsItem(int i) throws XMLSecurityException
i
-
XMLSecurityException
public XMLSignatureInput getReferencedContentAfterTransformsItem(int i) throws XMLSecurityException
i
-
XMLSecurityException
public int getSignedContentLength()
public java.lang.String getBaseLocalName()
getBaseLocalName
in class ElementProxy
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |