0N/A * reserved comment block 0N/A * DO NOT REMOVE OR ALTER! 0N/A * Copyright 1999-2004 The Apache Software Foundation. 0N/A * Licensed under the Apache License, Version 2.0 (the "License"); 0N/A * you may not use this file except in compliance with the License. 0N/A * You may obtain a copy of the License at 0N/A * Unless required by applicable law or agreed to in writing, software 0N/A * distributed under the License is distributed on an "AS IS" BASIS, 0N/A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 0N/A * See the License for the specific language governing permissions and 0N/A * limitations under the License. 0N/A * Handles <code><ds:Manifest></code> elements. 0N/A * <p> This element holds the <code>Reference</code> elements</p> 0N/A * @author $author: $ 0N/A /** {@link java.util.logging} logging facility */ 0N/A /** Field _references */ 0N/A /** Field verificationResults[] */ 0N/A /** Field _resolverProperties */ 0N/A /** Field _perManifestResolvers */ 0N/A * Consturts {@link Manifest} 0N/A * @param doc the {@link Document} in which <code>XMLsignature</code> is placed 0N/A * Constructor Manifest 0N/A * @throws XMLSecurityException 0N/A // check out Reference children 0N/A // At least one Reference must be present. Bad. 0N/A for (
int i =
0; i <
le; i++) {
0N/A * This <code>addDocument</code> method is used to add a new resource to the 0N/A * from the supplied values. 0N/A * @param BaseURI the URI of the resource where the XML instance was stored 0N/A * @param referenceURI <code>URI</code> attribute in <code>Reference</code> for specifing where data is 0N/A * @param transforms com.sun.org.apache.xml.internal.security.signature.Transforms object with an ordered list of transformations to be performed. 0N/A * @param digestURI The digest algorthim URI to be used. 0N/A * @param ReferenceId 0N/A * @param ReferenceType 0N/A * @throws XMLSignatureException 0N/A // the this._doc is handed implicitly by the this.getOwnerDocument() 0N/A // add Reference object to our cache vector 0N/A * The calculation of the DigestValues in the References must be after the 0N/A * References are already added to the document and during the signing 0N/A * process. This ensures that all neccesary data is in place. 0N/A * @throws ReferenceNotInitializedException 0N/A * @throws XMLSignatureException 0N/A // update the cached Reference object, the Element content is automatically updated 0N/A * Return the nonnegative number of added references. 0N/A * @return the number of references 0N/A * Return the <it>i</it><sup>th</sup> reference. Valid <code>i</code> 0N/A * values are 0 to <code>{link@ getSize}-1</code>. 0N/A * @param i Index of the requested {@link Reference} 0N/A * @return the <it>i</it><sup>th</sup> reference 0N/A * @throws XMLSecurityException 0N/A // not yet constructed, so _we_ have to 0N/A * Sets the <code>Id</code> attribute 0N/A * @param Id the <code>Id</code> attribute in <code>ds:Manifest</code> 0N/A * Returns the <code>Id</code> attribute 0N/A * @return the <code>Id</code> attribute in <code>ds:Manifest</code> 0N/A * validation</A> of all enclosed references using the {@link Reference#verify} method. 0N/A * <p>This step loops through all {@link Reference}s and does verify the hash 0N/A * values. If one or more verifications fail, the method returns 0N/A * <code>false</code>. If <i>all</i> verifications are successful, 0N/A * it returns <code>true</code>. The results of the individual reference 0N/A * validations are available by using the {@link #getVerificationResult(int)} method 0N/A * @return true if all References verify, false if one or more do not verify. 0N/A * @throws MissingResourceFailureException if a {@link Reference} does not verify (throws a {@link com.sun.org.apache.xml.internal.security.signature.ReferenceNotInitializedException} because of an uninitialized {@link XMLSignatureInput} 0N/A * @throws XMLSecurityException 0N/A * validation</A> of all enclosed references using the {@link Reference#verify} method. 0N/A * <p>This step loops through all {@link Reference}s and does verify the hash 0N/A * values. If one or more verifications fail, the method returns 0N/A * <code>false</code>. If <i>all</i> verifications are successful, 0N/A * it returns <code>true</code>. The results of the individual reference 0N/A * validations are available by using the {@link #getVerificationResult(int)} method 0N/A * @param followManifests 0N/A * @return true if all References verify, false if one or more do not verify. 0N/A * @throws MissingResourceFailureException if a {@link Reference} does not verify (throws a {@link com.sun.org.apache.xml.internal.security.signature.ReferenceNotInitializedException} because of an uninitialized {@link XMLSignatureInput} 0N/A * @throws XMLSecurityException 0N/A :
"not") +
" requested to follow nested Manifests");
0N/A /* if only one item does not verify, the whole verification fails */ 0N/A // was verification successful till now and do we want to verify the Manifest? 0N/A // Hm, seems not to be a ds:Manifest 0N/A // The Reference stated that it points to a ds:Manifest 0N/A // but we did not find a ds:Manifest in the signed area 0N/A "signature.Verification.Reference.NoInput",
exArgs,
ex,
0N/A * Method setVerificationResult 0N/A * After verifying a {@link Manifest} or a {@link SignedInfo} using the 0N/A * {@link Manifest#verifyReferences()} or {@link SignedInfo#verify()} methods, 0N/A * the individual results can be retrieved with this method. 0N/A * @param index an index of into a {@link Manifest} or a {@link SignedInfo} 0N/A * @return the results of reference validation at the specified index 0N/A * @throws XMLSecurityException 0N/A * Adds Resource Resolver for retrieving resources at specified <code>URI</code> attribute in <code>reference</code> element 0N/A * @param resolver {@link ResourceResolver} can provide the implemenatin subclass of {@link ResourceResolverSpi} for retrieving resource. 0N/A * Adds Resource Resolver for retrieving resources at specified <code>URI</code> attribute in <code>reference</code> element 0N/A * @param resolverSpi the implemenatin subclass of {@link ResourceResolverSpi} for retrieving resource. 0N/A * Used to pass parameters like proxy servers etc to the ResourceResolver 0N/A * @param key the key 0N/A * @param value the value 0N/A * Returns the value at specified key 0N/A * @param key the key 0N/A * Method getSignedContentItem 0N/A * @return The signed content of the i reference. 0N/A * @throws XMLSignatureException 0N/A * Method getReferencedContentPriorTransformsItem 0N/A * @return The contents before transformation of the reference i. 0N/A * @throws XMLSecurityException 0N/A * Method getReferencedContentAfterTransformsItem 0N/A * @return The contents after transformation of the reference i. 0N/A * @throws XMLSecurityException 0N/A * Method getSignedContentLength 0N/A * @return The nu,ber of references contained in this reference. 0N/A * Method getBaseLocalName