Java Code Examples for com.sun.org.apache.xml.internal.security.utils.resolver.ResourceResolver#resolve()

The following examples show how to use com.sun.org.apache.xml.internal.security.utils.resolver.ResourceResolver#resolve() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: Reference.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Returns the XMLSignatureInput which is created by de-referencing the URI attribute.
 * @return the XMLSignatureInput of the source of this reference
 * @throws ReferenceNotInitializedException If the resolver found any
 * problem resolving the reference
 */
public XMLSignatureInput getContentsBeforeTransformation()
    throws ReferenceNotInitializedException {
    try {
        Attr uriAttr =
            this.constructionElement.getAttributeNodeNS(null, Constants._ATT_URI);

        ResourceResolver resolver =
            ResourceResolver.getInstance(
                uriAttr, this.baseURI, this.manifest.getPerManifestResolvers(), secureValidation
            );
        resolver.addProperties(this.manifest.getResolverProperties());

        return resolver.resolve(uriAttr, this.baseURI, secureValidation);
    }  catch (ResourceResolverException ex) {
        throw new ReferenceNotInitializedException("empty", ex);
    }
}
 
Example 2
Source File: Reference.java    From jdk8u_jdk with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Returns the XMLSignatureInput which is created by de-referencing the URI attribute.
 * @return the XMLSignatureInput of the source of this reference
 * @throws ReferenceNotInitializedException If the resolver found any
 * problem resolving the reference
 */
public XMLSignatureInput getContentsBeforeTransformation()
    throws ReferenceNotInitializedException {
    try {
        Attr uriAttr =
            this.constructionElement.getAttributeNodeNS(null, Constants._ATT_URI);

        ResourceResolver resolver =
            ResourceResolver.getInstance(
                uriAttr, this.baseURI, this.manifest.getPerManifestResolvers(), secureValidation
            );
        resolver.addProperties(this.manifest.getResolverProperties());

        return resolver.resolve(uriAttr, this.baseURI, secureValidation);
    }  catch (ResourceResolverException ex) {
        throw new ReferenceNotInitializedException("empty", ex);
    }
}
 
Example 3
Source File: Reference.java    From dragonwell8_jdk with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Returns the XMLSignatureInput which is created by de-referencing the URI attribute.
 * @return the XMLSignatureInput of the source of this reference
 * @throws ReferenceNotInitializedException If the resolver found any
 * problem resolving the reference
 */
public XMLSignatureInput getContentsBeforeTransformation()
    throws ReferenceNotInitializedException {
    try {
        Attr uriAttr =
            this.constructionElement.getAttributeNodeNS(null, Constants._ATT_URI);

        ResourceResolver resolver =
            ResourceResolver.getInstance(
                uriAttr, this.baseURI, this.manifest.getPerManifestResolvers(), secureValidation
            );
        resolver.addProperties(this.manifest.getResolverProperties());

        return resolver.resolve(uriAttr, this.baseURI, secureValidation);
    }  catch (ResourceResolverException ex) {
        throw new ReferenceNotInitializedException("empty", ex);
    }
}
 
Example 4
Source File: RetrievalMethodResolver.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Resolves the input from the given retrieval method
 * @return
 * @throws XMLSecurityException
 */
private static XMLSignatureInput resolveInput(
    RetrievalMethod rm, String baseURI, boolean secureValidation
) throws XMLSecurityException {
    Attr uri = rm.getURIAttr();
    // Apply the transforms
    Transforms transforms = rm.getTransforms();
    ResourceResolver resRes = ResourceResolver.getInstance(uri, baseURI, secureValidation);
    XMLSignatureInput resource = resRes.resolve(uri, baseURI, secureValidation);
    if (transforms != null) {
        if (log.isLoggable(java.util.logging.Level.FINE)) {
            log.log(java.util.logging.Level.FINE, "We have Transforms");
        }
        resource = transforms.performTransforms(resource);
    }
    return resource;
}
 
Example 5
Source File: RetrievalMethodResolver.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Resolves the input from the given retrieval method
 * @return
 * @throws XMLSecurityException
 */
private static XMLSignatureInput resolveInput(
    RetrievalMethod rm, String baseURI, boolean secureValidation
) throws XMLSecurityException {
    Attr uri = rm.getURIAttr();
    // Apply the transforms
    Transforms transforms = rm.getTransforms();
    ResourceResolver resRes = ResourceResolver.getInstance(uri, baseURI, secureValidation);
    XMLSignatureInput resource = resRes.resolve(uri, baseURI, secureValidation);
    if (transforms != null) {
        if (log.isLoggable(java.util.logging.Level.FINE)) {
            log.log(java.util.logging.Level.FINE, "We have Transforms");
        }
        resource = transforms.performTransforms(resource);
    }
    return resource;
}
 
Example 6
Source File: RetrievalMethodResolver.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Resolves the input from the given retrieval method
 * @return
 * @throws XMLSecurityException
 */
private static XMLSignatureInput resolveInput(
    RetrievalMethod rm, String baseURI, boolean secureValidation
) throws XMLSecurityException {
    Attr uri = rm.getURIAttr();
    // Apply the transforms
    Transforms transforms = rm.getTransforms();
    ResourceResolver resRes = ResourceResolver.getInstance(uri, baseURI, secureValidation);
    XMLSignatureInput resource = resRes.resolve(uri, baseURI, secureValidation);
    if (transforms != null) {
        if (log.isLoggable(java.util.logging.Level.FINE)) {
            log.log(java.util.logging.Level.FINE, "We have Transforms");
        }
        resource = transforms.performTransforms(resource);
    }
    return resource;
}
 
Example 7
Source File: Reference.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Returns the XMLSignatureInput which is created by de-referencing the URI attribute.
 * @return the XMLSignatureInput of the source of this reference
 * @throws ReferenceNotInitializedException If the resolver found any
 * problem resolving the reference
 */
public XMLSignatureInput getContentsBeforeTransformation()
    throws ReferenceNotInitializedException {
    try {
        Attr uriAttr =
            this.constructionElement.getAttributeNodeNS(null, Constants._ATT_URI);

        ResourceResolver resolver =
            ResourceResolver.getInstance(
                uriAttr, this.baseURI, this.manifest.getPerManifestResolvers(), secureValidation
            );
        resolver.addProperties(this.manifest.getResolverProperties());

        return resolver.resolve(uriAttr, this.baseURI, secureValidation);
    }  catch (ResourceResolverException ex) {
        throw new ReferenceNotInitializedException("empty", ex);
    }
}
 
Example 8
Source File: Reference.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Returns the XMLSignatureInput which is created by de-referencing the URI attribute.
 * @return the XMLSignatureInput of the source of this reference
 * @throws ReferenceNotInitializedException If the resolver found any
 * problem resolving the reference
 */
public XMLSignatureInput getContentsBeforeTransformation()
    throws ReferenceNotInitializedException {
    try {
        Attr uriAttr =
            this.constructionElement.getAttributeNodeNS(null, Constants._ATT_URI);

        ResourceResolver resolver =
            ResourceResolver.getInstance(
                uriAttr, this.baseURI, this.manifest.getPerManifestResolvers(), secureValidation
            );
        resolver.addProperties(this.manifest.getResolverProperties());

        return resolver.resolve(uriAttr, this.baseURI, secureValidation);
    }  catch (ResourceResolverException ex) {
        throw new ReferenceNotInitializedException("empty", ex);
    }
}
 
Example 9
Source File: Reference.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Returns the XMLSignatureInput which is created by de-referencing the URI attribute.
 * @return the XMLSignatureInput of the source of this reference
 * @throws ReferenceNotInitializedException If the resolver found any
 * problem resolving the reference
 */
public XMLSignatureInput getContentsBeforeTransformation()
    throws ReferenceNotInitializedException {
    try {
        Attr uriAttr =
            this.constructionElement.getAttributeNodeNS(null, Constants._ATT_URI);

        ResourceResolver resolver =
            ResourceResolver.getInstance(
                uriAttr, this.baseURI, this.manifest.getPerManifestResolvers(), secureValidation
            );
        resolver.addProperties(this.manifest.getResolverProperties());

        return resolver.resolve(uriAttr, this.baseURI, secureValidation);
    }  catch (ResourceResolverException ex) {
        throw new ReferenceNotInitializedException("empty", ex);
    }
}
 
Example 10
Source File: DOMURIDereferencer.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
public Data dereference(URIReference uriRef, XMLCryptoContext context)
    throws URIReferenceException {

    if (uriRef == null) {
        throw new NullPointerException("uriRef cannot be null");
    }
    if (context == null) {
        throw new NullPointerException("context cannot be null");
    }

    DOMURIReference domRef = (DOMURIReference) uriRef;
    Attr uriAttr = (Attr) domRef.getHere();
    String uri = uriRef.getURI();
    DOMCryptoContext dcc = (DOMCryptoContext) context;
    String baseURI = context.getBaseURI();

    boolean secVal = Utils.secureValidation(context);

    // Check if same-document URI and already registered on the context
    if (uri != null && uri.length() != 0 && uri.charAt(0) == '#') {
        String id = uri.substring(1);

        if (id.startsWith("xpointer(id(")) {
            int i1 = id.indexOf('\'');
            int i2 = id.indexOf('\'', i1+1);
            id = id.substring(i1+1, i2);
        }

        Node referencedElem = dcc.getElementById(id);
        if (referencedElem != null) {
            if (secVal) {
                Element start = referencedElem.getOwnerDocument().getDocumentElement();
                if (!XMLUtils.protectAgainstWrappingAttack(start, (Element)referencedElem, id)) {
                    String error = "Multiple Elements with the same ID " + id + " were detected";
                    throw new URIReferenceException(error);
                }
            }

            XMLSignatureInput result = new XMLSignatureInput(referencedElem);
            if (!uri.substring(1).startsWith("xpointer(id(")) {
                result.setExcludeComments(true);
            }

            result.setMIMEType("text/xml");
            if (baseURI != null && baseURI.length() > 0) {
                result.setSourceURI(baseURI.concat(uriAttr.getNodeValue()));
            } else {
                result.setSourceURI(uriAttr.getNodeValue());
            }
            return new ApacheNodeSetData(result);
        }
    }

    try {
        ResourceResolver apacheResolver =
            ResourceResolver.getInstance(uriAttr, baseURI, secVal);
        XMLSignatureInput in = apacheResolver.resolve(uriAttr, baseURI);
        if (in.isOctetStream()) {
            return new ApacheOctetStreamData(in);
        } else {
            return new ApacheNodeSetData(in);
        }
    } catch (Exception e) {
        throw new URIReferenceException(e);
    }
}
 
Example 11
Source File: DOMURIDereferencer.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
public Data dereference(URIReference uriRef, XMLCryptoContext context)
    throws URIReferenceException {

    if (uriRef == null) {
        throw new NullPointerException("uriRef cannot be null");
    }
    if (context == null) {
        throw new NullPointerException("context cannot be null");
    }

    DOMURIReference domRef = (DOMURIReference) uriRef;
    Attr uriAttr = (Attr) domRef.getHere();
    String uri = uriRef.getURI();
    DOMCryptoContext dcc = (DOMCryptoContext) context;
    String baseURI = context.getBaseURI();

    boolean secVal = Utils.secureValidation(context);

    if (secVal && Policy.restrictReferenceUriScheme(uri)) {
        throw new URIReferenceException(
            "Uri " + uri + " is forbidden when secure validation is enabled");
    }

    // Check if same-document URI and already registered on the context
    if (uri != null && uri.length() != 0 && uri.charAt(0) == '#') {
        String id = uri.substring(1);

        if (id.startsWith("xpointer(id(")) {
            int i1 = id.indexOf('\'');
            int i2 = id.indexOf('\'', i1+1);
            id = id.substring(i1+1, i2);
        }

        // check if element is registered by Id
        Node referencedElem = uriAttr.getOwnerDocument().getElementById(id);
        if (referencedElem == null) {
           // see if element is registered in DOMCryptoContext
           referencedElem = dcc.getElementById(id);
        }
        if (referencedElem != null) {
            if (secVal && Policy.restrictDuplicateIds()) {
                Element start = referencedElem.getOwnerDocument().getDocumentElement();
                if (!XMLUtils.protectAgainstWrappingAttack(start, (Element)referencedElem, id)) {
                    String error = "Multiple Elements with the same ID "
                        + id + " detected when secure validation"
                        + " is enabled";
                    throw new URIReferenceException(error);
                }
            }

            XMLSignatureInput result = new XMLSignatureInput(referencedElem);
            if (!uri.substring(1).startsWith("xpointer(id(")) {
                result.setExcludeComments(true);
            }

            result.setMIMEType("text/xml");
            if (baseURI != null && baseURI.length() > 0) {
                result.setSourceURI(baseURI.concat(uriAttr.getNodeValue()));
            } else {
                result.setSourceURI(uriAttr.getNodeValue());
            }
            return new ApacheNodeSetData(result);
        }
    }

    try {
        ResourceResolver apacheResolver =
            ResourceResolver.getInstance(uriAttr, baseURI, false);
        XMLSignatureInput in = apacheResolver.resolve(uriAttr,
                                                      baseURI, false);
        if (in.isOctetStream()) {
            return new ApacheOctetStreamData(in);
        } else {
            return new ApacheNodeSetData(in);
        }
    } catch (Exception e) {
        throw new URIReferenceException(e);
    }
}
 
Example 12
Source File: DOMURIDereferencer.java    From jdk8u-dev-jdk with GNU General Public License v2.0 4 votes vote down vote up
public Data dereference(URIReference uriRef, XMLCryptoContext context)
    throws URIReferenceException {

    if (uriRef == null) {
        throw new NullPointerException("uriRef cannot be null");
    }
    if (context == null) {
        throw new NullPointerException("context cannot be null");
    }

    DOMURIReference domRef = (DOMURIReference) uriRef;
    Attr uriAttr = (Attr) domRef.getHere();
    String uri = uriRef.getURI();
    DOMCryptoContext dcc = (DOMCryptoContext) context;
    String baseURI = context.getBaseURI();

    boolean secVal = Utils.secureValidation(context);

    // Check if same-document URI and already registered on the context
    if (uri != null && uri.length() != 0 && uri.charAt(0) == '#') {
        String id = uri.substring(1);

        if (id.startsWith("xpointer(id(")) {
            int i1 = id.indexOf('\'');
            int i2 = id.indexOf('\'', i1+1);
            id = id.substring(i1+1, i2);
        }

        Node referencedElem = dcc.getElementById(id);
        if (referencedElem != null) {
            if (secVal) {
                Element start = referencedElem.getOwnerDocument().getDocumentElement();
                if (!XMLUtils.protectAgainstWrappingAttack(start, (Element)referencedElem, id)) {
                    String error = "Multiple Elements with the same ID " + id + " were detected";
                    throw new URIReferenceException(error);
                }
            }

            XMLSignatureInput result = new XMLSignatureInput(referencedElem);
            if (!uri.substring(1).startsWith("xpointer(id(")) {
                result.setExcludeComments(true);
            }

            result.setMIMEType("text/xml");
            if (baseURI != null && baseURI.length() > 0) {
                result.setSourceURI(baseURI.concat(uriAttr.getNodeValue()));
            } else {
                result.setSourceURI(uriAttr.getNodeValue());
            }
            return new ApacheNodeSetData(result);
        }
    }

    try {
        ResourceResolver apacheResolver =
            ResourceResolver.getInstance(uriAttr, baseURI, secVal);
        XMLSignatureInput in = apacheResolver.resolve(uriAttr, baseURI);
        if (in.isOctetStream()) {
            return new ApacheOctetStreamData(in);
        } else {
            return new ApacheNodeSetData(in);
        }
    } catch (Exception e) {
        throw new URIReferenceException(e);
    }
}
 
Example 13
Source File: DOMURIDereferencer.java    From jdk8u-jdk with GNU General Public License v2.0 4 votes vote down vote up
public Data dereference(URIReference uriRef, XMLCryptoContext context)
    throws URIReferenceException {

    if (uriRef == null) {
        throw new NullPointerException("uriRef cannot be null");
    }
    if (context == null) {
        throw new NullPointerException("context cannot be null");
    }

    DOMURIReference domRef = (DOMURIReference) uriRef;
    Attr uriAttr = (Attr) domRef.getHere();
    String uri = uriRef.getURI();
    DOMCryptoContext dcc = (DOMCryptoContext) context;
    String baseURI = context.getBaseURI();

    boolean secVal = Utils.secureValidation(context);

    // Check if same-document URI and already registered on the context
    if (uri != null && uri.length() != 0 && uri.charAt(0) == '#') {
        String id = uri.substring(1);

        if (id.startsWith("xpointer(id(")) {
            int i1 = id.indexOf('\'');
            int i2 = id.indexOf('\'', i1+1);
            id = id.substring(i1+1, i2);
        }

        Node referencedElem = dcc.getElementById(id);
        if (referencedElem != null) {
            if (secVal) {
                Element start = referencedElem.getOwnerDocument().getDocumentElement();
                if (!XMLUtils.protectAgainstWrappingAttack(start, (Element)referencedElem, id)) {
                    String error = "Multiple Elements with the same ID " + id + " were detected";
                    throw new URIReferenceException(error);
                }
            }

            XMLSignatureInput result = new XMLSignatureInput(referencedElem);
            if (!uri.substring(1).startsWith("xpointer(id(")) {
                result.setExcludeComments(true);
            }

            result.setMIMEType("text/xml");
            if (baseURI != null && baseURI.length() > 0) {
                result.setSourceURI(baseURI.concat(uriAttr.getNodeValue()));
            } else {
                result.setSourceURI(uriAttr.getNodeValue());
            }
            return new ApacheNodeSetData(result);
        }
    }

    try {
        ResourceResolver apacheResolver =
            ResourceResolver.getInstance(uriAttr, baseURI, secVal);
        XMLSignatureInput in = apacheResolver.resolve(uriAttr, baseURI);
        if (in.isOctetStream()) {
            return new ApacheOctetStreamData(in);
        } else {
            return new ApacheNodeSetData(in);
        }
    } catch (Exception e) {
        throw new URIReferenceException(e);
    }
}
 
Example 14
Source File: DOMURIDereferencer.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
public Data dereference(URIReference uriRef, XMLCryptoContext context)
    throws URIReferenceException {

    if (uriRef == null) {
        throw new NullPointerException("uriRef cannot be null");
    }
    if (context == null) {
        throw new NullPointerException("context cannot be null");
    }

    DOMURIReference domRef = (DOMURIReference) uriRef;
    Attr uriAttr = (Attr) domRef.getHere();
    String uri = uriRef.getURI();
    DOMCryptoContext dcc = (DOMCryptoContext) context;
    String baseURI = context.getBaseURI();

    boolean secVal = Utils.secureValidation(context);

    if (secVal && Policy.restrictReferenceUriScheme(uri)) {
        throw new URIReferenceException(
            "Uri " + uri + " is forbidden when secure validation is enabled");
    }

    // Check if same-document URI and already registered on the context
    if (uri != null && uri.length() != 0 && uri.charAt(0) == '#') {
        String id = uri.substring(1);

        if (id.startsWith("xpointer(id(")) {
            int i1 = id.indexOf('\'');
            int i2 = id.indexOf('\'', i1+1);
            id = id.substring(i1+1, i2);
        }

        // check if element is registered by Id
        Node referencedElem = uriAttr.getOwnerDocument().getElementById(id);
        if (referencedElem == null) {
           // see if element is registered in DOMCryptoContext
           referencedElem = dcc.getElementById(id);
        }
        if (referencedElem != null) {
            if (secVal && Policy.restrictDuplicateIds()) {
                Element start = referencedElem.getOwnerDocument().getDocumentElement();
                if (!XMLUtils.protectAgainstWrappingAttack(start, (Element)referencedElem, id)) {
                    String error = "Multiple Elements with the same ID "
                        + id + " detected when secure validation"
                        + " is enabled";
                    throw new URIReferenceException(error);
                }
            }

            XMLSignatureInput result = new XMLSignatureInput(referencedElem);
            if (!uri.substring(1).startsWith("xpointer(id(")) {
                result.setExcludeComments(true);
            }

            result.setMIMEType("text/xml");
            if (baseURI != null && baseURI.length() > 0) {
                result.setSourceURI(baseURI.concat(uriAttr.getNodeValue()));
            } else {
                result.setSourceURI(uriAttr.getNodeValue());
            }
            return new ApacheNodeSetData(result);
        }
    }

    try {
        ResourceResolver apacheResolver =
            ResourceResolver.getInstance(uriAttr, baseURI, false);
        XMLSignatureInput in = apacheResolver.resolve(uriAttr,
                                                      baseURI, false);
        if (in.isOctetStream()) {
            return new ApacheOctetStreamData(in);
        } else {
            return new ApacheNodeSetData(in);
        }
    } catch (Exception e) {
        throw new URIReferenceException(e);
    }
}
 
Example 15
Source File: DOMURIDereferencer.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
public Data dereference(URIReference uriRef, XMLCryptoContext context)
    throws URIReferenceException {

    if (uriRef == null) {
        throw new NullPointerException("uriRef cannot be null");
    }
    if (context == null) {
        throw new NullPointerException("context cannot be null");
    }

    DOMURIReference domRef = (DOMURIReference) uriRef;
    Attr uriAttr = (Attr) domRef.getHere();
    String uri = uriRef.getURI();
    DOMCryptoContext dcc = (DOMCryptoContext) context;
    String baseURI = context.getBaseURI();

    boolean secVal = Utils.secureValidation(context);

    if (secVal && Policy.restrictReferenceUriScheme(uri)) {
        throw new URIReferenceException(
            "Uri " + uri + " is forbidden when secure validation is enabled");
    }

    // Check if same-document URI and already registered on the context
    if (uri != null && uri.length() != 0 && uri.charAt(0) == '#') {
        String id = uri.substring(1);

        if (id.startsWith("xpointer(id(")) {
            int i1 = id.indexOf('\'');
            int i2 = id.indexOf('\'', i1+1);
            id = id.substring(i1+1, i2);
        }

        // check if element is registered by Id
        Node referencedElem = uriAttr.getOwnerDocument().getElementById(id);
        if (referencedElem == null) {
           // see if element is registered in DOMCryptoContext
           referencedElem = dcc.getElementById(id);
        }
        if (referencedElem != null) {
            if (secVal && Policy.restrictDuplicateIds()) {
                Element start = referencedElem.getOwnerDocument().getDocumentElement();
                if (!XMLUtils.protectAgainstWrappingAttack(start, (Element)referencedElem, id)) {
                    String error = "Multiple Elements with the same ID "
                        + id + " detected when secure validation"
                        + " is enabled";
                    throw new URIReferenceException(error);
                }
            }

            XMLSignatureInput result = new XMLSignatureInput(referencedElem);
            if (!uri.substring(1).startsWith("xpointer(id(")) {
                result.setExcludeComments(true);
            }

            result.setMIMEType("text/xml");
            if (baseURI != null && baseURI.length() > 0) {
                result.setSourceURI(baseURI.concat(uriAttr.getNodeValue()));
            } else {
                result.setSourceURI(uriAttr.getNodeValue());
            }
            return new ApacheNodeSetData(result);
        }
    }

    try {
        ResourceResolver apacheResolver =
            ResourceResolver.getInstance(uriAttr, baseURI, false);
        XMLSignatureInput in = apacheResolver.resolve(uriAttr,
                                                      baseURI, false);
        if (in.isOctetStream()) {
            return new ApacheOctetStreamData(in);
        } else {
            return new ApacheNodeSetData(in);
        }
    } catch (Exception e) {
        throw new URIReferenceException(e);
    }
}
 
Example 16
Source File: KeyInfoReferenceResolver.java    From openjdk-jdk9 with GNU General Public License v2.0 3 votes vote down vote up
/**
 * Resolve the XML signature input represented by the specified URI.
 *
 * @param uri
 * @param baseURI
 * @param secureValidation
 * @return
 * @throws XMLSecurityException
 */
private XMLSignatureInput resolveInput(Attr uri, String baseURI, boolean secureValidation)
    throws XMLSecurityException {
    ResourceResolver resRes = ResourceResolver.getInstance(uri, baseURI, secureValidation);
    XMLSignatureInput resource = resRes.resolve(uri, baseURI, secureValidation);
    return resource;
}
 
Example 17
Source File: KeyInfoReferenceResolver.java    From jdk8u-jdk with GNU General Public License v2.0 3 votes vote down vote up
/**
 * Resolve the XML signature input represented by the specified URI.
 *
 * @param uri
 * @param baseURI
 * @param secureValidation
 * @return
 * @throws XMLSecurityException
 */
private XMLSignatureInput resolveInput(Attr uri, String baseURI, boolean secureValidation)
    throws XMLSecurityException {
    ResourceResolver resRes = ResourceResolver.getInstance(uri, baseURI, secureValidation);
    XMLSignatureInput resource = resRes.resolve(uri, baseURI, secureValidation);
    return resource;
}
 
Example 18
Source File: KeyInfoReferenceResolver.java    From TencentKona-8 with GNU General Public License v2.0 3 votes vote down vote up
/**
 * Resolve the XML signature input represented by the specified URI.
 *
 * @param uri
 * @param baseURI
 * @param secureValidation
 * @return
 * @throws XMLSecurityException
 */
private XMLSignatureInput resolveInput(Attr uri, String baseURI, boolean secureValidation)
    throws XMLSecurityException {
    ResourceResolver resRes = ResourceResolver.getInstance(uri, baseURI, secureValidation);
    XMLSignatureInput resource = resRes.resolve(uri, baseURI, secureValidation);
    return resource;
}
 
Example 19
Source File: KeyInfoReferenceResolver.java    From JDKSourceCode1.8 with MIT License 3 votes vote down vote up
/**
 * Resolve the XML signature input represented by the specified URI.
 *
 * @param uri
 * @param baseURI
 * @param secureValidation
 * @return
 * @throws XMLSecurityException
 */
private XMLSignatureInput resolveInput(Attr uri, String baseURI, boolean secureValidation)
    throws XMLSecurityException {
    ResourceResolver resRes = ResourceResolver.getInstance(uri, baseURI, secureValidation);
    XMLSignatureInput resource = resRes.resolve(uri, baseURI, secureValidation);
    return resource;
}
 
Example 20
Source File: KeyInfoReferenceResolver.java    From hottub with GNU General Public License v2.0 3 votes vote down vote up
/**
 * Resolve the XML signature input represented by the specified URI.
 *
 * @param uri
 * @param baseURI
 * @param secureValidation
 * @return
 * @throws XMLSecurityException
 */
private XMLSignatureInput resolveInput(Attr uri, String baseURI, boolean secureValidation)
    throws XMLSecurityException {
    ResourceResolver resRes = ResourceResolver.getInstance(uri, baseURI, secureValidation);
    XMLSignatureInput resource = resRes.resolve(uri, baseURI, secureValidation);
    return resource;
}