Java Code Examples for com.sun.org.apache.xml.internal.security.utils.XMLUtils#selectDsNodes()
The following examples show how to use
com.sun.org.apache.xml.internal.security.utils.XMLUtils#selectDsNodes() .
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: Transforms.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
/** * Return the nonnegative number of transformations. * * @return the number of transformations */ public int getLength() { if (transforms == null) { transforms = XMLUtils.selectDsNodes(this.constructionElement.getFirstChild(), "Transform"); } return transforms.length; }
Example 2
Source File: X509CertificateResolver.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 5 votes |
/** * Method engineResolveX509Certificate * @inheritDoc * @param element * @param BaseURI * @param storage * * @throws KeyResolverException */ public X509Certificate engineLookupResolveX509Certificate( Element element, String BaseURI, StorageResolver storage ) throws KeyResolverException { try { Element[] els = XMLUtils.selectDsNodes(element.getFirstChild(), Constants._TAG_X509CERTIFICATE); if ((els == null) || (els.length == 0)) { Element el = XMLUtils.selectDsNode(element.getFirstChild(), Constants._TAG_X509DATA, 0); if (el != null) { return engineLookupResolveX509Certificate(el, BaseURI, storage); } return null; } // populate Object array for (int i = 0; i < els.length; i++) { XMLX509Certificate xmlCert = new XMLX509Certificate(els[i], BaseURI); X509Certificate cert = xmlCert.getX509Certificate(); if (cert != null) { return cert; } } return null; } catch (XMLSecurityException ex) { if (log.isLoggable(java.util.logging.Level.FINE)) { log.log(java.util.logging.Level.FINE, "XMLSecurityException", ex); } throw new KeyResolverException("generic.EmptyMessage", ex); } }
Example 3
Source File: SignatureProperties.java From JDKSourceCode1.8 with MIT License | 5 votes |
/** * Return the nonnegative number of added SignatureProperty elements. * * @return the number of SignatureProperty elements */ public int getLength() { Element[] propertyElems = XMLUtils.selectDsNodes(this.constructionElement, Constants._TAG_SIGNATUREPROPERTY); return propertyElems.length; }
Example 4
Source File: Transforms.java From JDKSourceCode1.8 with MIT License | 5 votes |
/** * Return the <it>i</it><sup>th</sup> <code>{@link Transform}</code>. * Valid <code>i</code> values are 0 to <code>{@link #getLength}-1</code>. * * @param i index of {@link Transform} to return * @return the <it>i</it><sup>th</sup> Transform * @throws TransformationException */ public Transform item(int i) throws TransformationException { try { if (transforms == null) { transforms = XMLUtils.selectDsNodes(this.constructionElement.getFirstChild(), "Transform"); } return new Transform(transforms[i], this.baseURI); } catch (XMLSecurityException ex) { throw new TransformationException("empty", ex); } }
Example 5
Source File: SignatureProperties.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
/** * Return the nonnegative number of added SignatureProperty elements. * * @return the number of SignatureProperty elements */ public int getLength() { Element[] propertyElems = XMLUtils.selectDsNodes(this.constructionElement, Constants._TAG_SIGNATUREPROPERTY); return propertyElems.length; }
Example 6
Source File: X509CertificateResolver.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
/** * Method engineResolveX509Certificate * @inheritDoc * @param element * @param BaseURI * @param storage * * @throws KeyResolverException */ public X509Certificate engineLookupResolveX509Certificate( Element element, String BaseURI, StorageResolver storage ) throws KeyResolverException { try { Element[] els = XMLUtils.selectDsNodes(element.getFirstChild(), Constants._TAG_X509CERTIFICATE); if ((els == null) || (els.length == 0)) { Element el = XMLUtils.selectDsNode(element.getFirstChild(), Constants._TAG_X509DATA, 0); if (el != null) { return engineLookupResolveX509Certificate(el, BaseURI, storage); } return null; } // populate Object array for (int i = 0; i < els.length; i++) { XMLX509Certificate xmlCert = new XMLX509Certificate(els[i], BaseURI); X509Certificate cert = xmlCert.getX509Certificate(); if (cert != null) { return cert; } } return null; } catch (XMLSecurityException ex) { if (log.isLoggable(java.util.logging.Level.FINE)) { log.log(java.util.logging.Level.FINE, "XMLSecurityException", ex); } throw new KeyResolverException("generic.EmptyMessage", ex); } }
Example 7
Source File: Transforms.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 5 votes |
/** * Return the nonnegative number of transformations. * * @return the number of transformations */ public int getLength() { if (transforms == null) { transforms = XMLUtils.selectDsNodes(this.constructionElement.getFirstChild(), "Transform"); } return transforms.length; }
Example 8
Source File: Transforms.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
/** * Return the <it>i</it><sup>th</sup> <code>{@link Transform}</code>. * Valid <code>i</code> values are 0 to <code>{@link #getLength}-1</code>. * * @param i index of {@link Transform} to return * @return the <it>i</it><sup>th</sup> Transform * @throws TransformationException */ public Transform item(int i) throws TransformationException { try { if (transforms == null) { transforms = XMLUtils.selectDsNodes(this.constructionElement.getFirstChild(), "Transform"); } return new Transform(transforms[i], this.baseURI); } catch (XMLSecurityException ex) { throw new TransformationException("empty", ex); } }
Example 9
Source File: Transforms.java From jdk8u_jdk with GNU General Public License v2.0 | 5 votes |
/** * Return the <it>i</it><sup>th</sup> <code>{@link Transform}</code>. * Valid <code>i</code> values are 0 to <code>{@link #getLength}-1</code>. * * @param i index of {@link Transform} to return * @return the <it>i</it><sup>th</sup> Transform * @throws TransformationException */ public Transform item(int i) throws TransformationException { try { if (transforms == null) { transforms = XMLUtils.selectDsNodes(this.constructionElement.getFirstChild(), "Transform"); } return new Transform(transforms[i], this.baseURI); } catch (XMLSecurityException ex) { throw new TransformationException("empty", ex); } }
Example 10
Source File: X509CertificateResolver.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
/** * Method engineResolveX509Certificate * @inheritDoc * @param element * @param BaseURI * @param storage * * @throws KeyResolverException */ public X509Certificate engineLookupResolveX509Certificate( Element element, String BaseURI, StorageResolver storage ) throws KeyResolverException { try { Element[] els = XMLUtils.selectDsNodes(element.getFirstChild(), Constants._TAG_X509CERTIFICATE); if ((els == null) || (els.length == 0)) { Element el = XMLUtils.selectDsNode(element.getFirstChild(), Constants._TAG_X509DATA, 0); if (el != null) { return engineLookupResolveX509Certificate(el, BaseURI, storage); } return null; } // populate Object array for (int i = 0; i < els.length; i++) { XMLX509Certificate xmlCert = new XMLX509Certificate(els[i], BaseURI); X509Certificate cert = xmlCert.getX509Certificate(); if (cert != null) { return cert; } } return null; } catch (XMLSecurityException ex) { if (log.isLoggable(java.util.logging.Level.FINE)) { log.log(java.util.logging.Level.FINE, "XMLSecurityException", ex); } throw new KeyResolverException("generic.EmptyMessage", ex); } }
Example 11
Source File: X509CertificateResolver.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
/** * Method engineResolveX509Certificate * @inheritDoc * @param element * @param BaseURI * @param storage * * @throws KeyResolverException */ public X509Certificate engineLookupResolveX509Certificate( Element element, String BaseURI, StorageResolver storage ) throws KeyResolverException { try { Element[] els = XMLUtils.selectDsNodes(element.getFirstChild(), Constants._TAG_X509CERTIFICATE); if ((els == null) || (els.length == 0)) { Element el = XMLUtils.selectDsNode(element.getFirstChild(), Constants._TAG_X509DATA, 0); if (el != null) { return engineLookupResolveX509Certificate(el, BaseURI, storage); } return null; } // populate Object array for (int i = 0; i < els.length; i++) { XMLX509Certificate xmlCert = new XMLX509Certificate(els[i], BaseURI); X509Certificate cert = xmlCert.getX509Certificate(); if (cert != null) { return cert; } } return null; } catch (XMLSecurityException ex) { if (log.isLoggable(java.util.logging.Level.FINE)) { log.log(java.util.logging.Level.FINE, "XMLSecurityException", ex); } throw new KeyResolverException("generic.EmptyMessage", ex); } }
Example 12
Source File: Transforms.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
/** * Return the <it>i</it><sup>th</sup> <code>{@link Transform}</code>. * Valid <code>i</code> values are 0 to <code>{@link #getLength}-1</code>. * * @param i index of {@link Transform} to return * @return the <it>i</it><sup>th</sup> Transform * @throws TransformationException */ public Transform item(int i) throws TransformationException { try { if (transforms == null) { transforms = XMLUtils.selectDsNodes(this.constructionElement.getFirstChild(), "Transform"); } return new Transform(transforms[i], this.baseURI); } catch (XMLSecurityException ex) { throw new TransformationException("empty", ex); } }
Example 13
Source File: SignatureProperties.java From hottub with GNU General Public License v2.0 | 5 votes |
/** * Return the nonnegative number of added SignatureProperty elements. * * @return the number of SignatureProperty elements */ public int getLength() { Element[] propertyElems = XMLUtils.selectDsNodes(this.constructionElement, Constants._TAG_SIGNATUREPROPERTY); return propertyElems.length; }
Example 14
Source File: X509CertificateResolver.java From dragonwell8_jdk with GNU General Public License v2.0 | 5 votes |
/** * Method engineResolveX509Certificate * @inheritDoc * @param element * @param BaseURI * @param storage * * @throws KeyResolverException */ public X509Certificate engineLookupResolveX509Certificate( Element element, String BaseURI, StorageResolver storage ) throws KeyResolverException { try { Element[] els = XMLUtils.selectDsNodes(element.getFirstChild(), Constants._TAG_X509CERTIFICATE); if ((els == null) || (els.length == 0)) { Element el = XMLUtils.selectDsNode(element.getFirstChild(), Constants._TAG_X509DATA, 0); if (el != null) { return engineLookupResolveX509Certificate(el, BaseURI, storage); } return null; } // populate Object array for (int i = 0; i < els.length; i++) { XMLX509Certificate xmlCert = new XMLX509Certificate(els[i], BaseURI); X509Certificate cert = xmlCert.getX509Certificate(); if (cert != null) { return cert; } } return null; } catch (XMLSecurityException ex) { if (log.isLoggable(java.util.logging.Level.FINE)) { log.log(java.util.logging.Level.FINE, "XMLSecurityException", ex); } throw new KeyResolverException("generic.EmptyMessage", ex); } }
Example 15
Source File: SignatureProperties.java From dragonwell8_jdk with GNU General Public License v2.0 | 5 votes |
/** * Return the nonnegative number of added SignatureProperty elements. * * @return the number of SignatureProperty elements */ public int getLength() { Element[] propertyElems = XMLUtils.selectDsNodes(this.constructionElement, Constants._TAG_SIGNATUREPROPERTY); return propertyElems.length; }
Example 16
Source File: SignatureProperties.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
/** * Return the nonnegative number of added SignatureProperty elements. * * @return the number of SignatureProperty elements */ public int getLength() { Element[] propertyElems = XMLUtils.selectDsNodes(this.constructionElement, Constants._TAG_SIGNATUREPROPERTY); return propertyElems.length; }
Example 17
Source File: Transforms.java From dragonwell8_jdk with GNU General Public License v2.0 | 5 votes |
/** * Return the nonnegative number of transformations. * * @return the number of transformations */ public int getLength() { if (transforms == null) { transforms = XMLUtils.selectDsNodes(this.constructionElement.getFirstChild(), "Transform"); } return transforms.length; }
Example 18
Source File: X509CertificateResolver.java From hottub with GNU General Public License v2.0 | 5 votes |
/** * Method engineResolveX509Certificate * @inheritDoc * @param element * @param BaseURI * @param storage * * @throws KeyResolverException */ public X509Certificate engineLookupResolveX509Certificate( Element element, String BaseURI, StorageResolver storage ) throws KeyResolverException { try { Element[] els = XMLUtils.selectDsNodes(element.getFirstChild(), Constants._TAG_X509CERTIFICATE); if ((els == null) || (els.length == 0)) { Element el = XMLUtils.selectDsNode(element.getFirstChild(), Constants._TAG_X509DATA, 0); if (el != null) { return engineLookupResolveX509Certificate(el, BaseURI, storage); } return null; } // populate Object array for (int i = 0; i < els.length; i++) { XMLX509Certificate xmlCert = new XMLX509Certificate(els[i], BaseURI); X509Certificate cert = xmlCert.getX509Certificate(); if (cert != null) { return cert; } } return null; } catch (XMLSecurityException ex) { if (log.isLoggable(java.util.logging.Level.FINE)) { log.log(java.util.logging.Level.FINE, "XMLSecurityException", ex); } throw new KeyResolverException("generic.EmptyMessage", ex); } }
Example 19
Source File: Transforms.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
/** * Return the nonnegative number of transformations. * * @return the number of transformations */ public int getLength() { if (transforms == null) { transforms = XMLUtils.selectDsNodes(this.constructionElement.getFirstChild(), "Transform"); } return transforms.length; }
Example 20
Source File: X509CertificateResolver.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
/** * Method engineResolveX509Certificate * @inheritDoc * @param element * @param BaseURI * @param storage * * @throws KeyResolverException */ public X509Certificate engineLookupResolveX509Certificate( Element element, String BaseURI, StorageResolver storage ) throws KeyResolverException { try { Element[] els = XMLUtils.selectDsNodes(element.getFirstChild(), Constants._TAG_X509CERTIFICATE); if ((els == null) || (els.length == 0)) { Element el = XMLUtils.selectDsNode(element.getFirstChild(), Constants._TAG_X509DATA, 0); if (el != null) { return engineLookupResolveX509Certificate(el, BaseURI, storage); } return null; } // populate Object array for (int i = 0; i < els.length; i++) { XMLX509Certificate xmlCert = new XMLX509Certificate(els[i], BaseURI); X509Certificate cert = xmlCert.getX509Certificate(); if (cert != null) { return cert; } } return null; } catch (XMLSecurityException ex) { if (log.isLoggable(java.util.logging.Level.FINE)) { log.log(java.util.logging.Level.FINE, "XMLSecurityException", ex); } throw new KeyResolverException("generic.EmptyMessage", ex); } }