com.sun.org.apache.xml.internal.security.keys.content.X509Data Java Examples

The following examples show how to use com.sun.org.apache.xml.internal.security.keys.content.X509Data. 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: KeyInfo.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Method itemX509Data
 *
 * @param i
 * @return the asked X509Data element, null if the index is too big
 * @throws XMLSecurityException
 */
public X509Data itemX509Data(int i) throws XMLSecurityException {
    if (x509Datas != null) {
        return x509Datas.get(i);
    }
    Element e =
        XMLUtils.selectDsNode(
            this.constructionElement.getFirstChild(), Constants._TAG_X509DATA, i);

    if (e != null) {
        return new X509Data(e, this.baseURI);
    }
    return null;
}
 
Example #2
Source File: KeyInfo.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Method addX509Data
 *
 * @param x509data
 */
public void add(X509Data x509data) {
    if (x509Datas == null) {
        x509Datas = new ArrayList<X509Data>();
    }
    x509Datas.add(x509data);
    this.constructionElement.appendChild(x509data.getElement());
    XMLUtils.addReturnToElement(this.constructionElement);
}
 
Example #3
Source File: KeyInfo.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Method itemX509Data
 *
 * @param i
 * @return the asked X509Data element, null if the index is too big
 * @throws XMLSecurityException
 */
public X509Data itemX509Data(int i) throws XMLSecurityException {
    if (x509Datas != null) {
        return x509Datas.get(i);
    }
    Element e =
        XMLUtils.selectDsNode(
            this.constructionElement.getFirstChild(), Constants._TAG_X509DATA, i);

    if (e != null) {
        return new X509Data(e, this.baseURI);
    }
    return null;
}
 
Example #4
Source File: X509DigestResolver.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/** {@inheritDoc}. */
public boolean engineCanResolve(Element element, String baseURI, StorageResolver storage) {
    if (XMLUtils.elementIsInSignatureSpace(element, Constants._TAG_X509DATA)) {
        try {
            X509Data x509Data = new X509Data(element, baseURI);
            return x509Data.containsDigest();
        } catch (XMLSecurityException e) {
            return false;
        }
    } else {
        return false;
    }
}
 
Example #5
Source File: KeyInfo.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Method itemX509Data
 *
 * @param i
 * @return the asked X509Data element, null if the index is too big
 * @throws XMLSecurityException
 */
public X509Data itemX509Data(int i) throws XMLSecurityException {
    if (x509Datas != null) {
        return x509Datas.get(i);
    }
    Element e =
        XMLUtils.selectDsNode(
            this.constructionElement.getFirstChild(), Constants._TAG_X509DATA, i);

    if (e != null) {
        return new X509Data(e, this.baseURI);
    }
    return null;
}
 
Example #6
Source File: X509DigestResolver.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
/** {@inheritDoc}. */
public boolean engineCanResolve(Element element, String baseURI, StorageResolver storage) {
    if (XMLUtils.elementIsInSignatureSpace(element, Constants._TAG_X509DATA)) {
        try {
            X509Data x509Data = new X509Data(element, baseURI);
            return x509Data.containsDigest();
        } catch (XMLSecurityException e) {
            return false;
        }
    } else {
        return false;
    }
}
 
Example #7
Source File: KeyInfo.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Method addX509Data
 *
 * @param x509data
 */
public void add(X509Data x509data) {
    if (x509Datas == null) {
        x509Datas = new ArrayList<X509Data>();
    }
    x509Datas.add(x509data);
    this.constructionElement.appendChild(x509data.getElement());
    XMLUtils.addReturnToElement(this.constructionElement);
}
 
Example #8
Source File: KeyInfo.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Method itemX509Data
 *
 * @param i
 * @return the asked X509Data element, null if the index is too big
 * @throws XMLSecurityException
 */
public X509Data itemX509Data(int i) throws XMLSecurityException {
    if (x509Datas != null) {
        return x509Datas.get(i);
    }
    Element e =
        XMLUtils.selectDsNode(
            this.constructionElement.getFirstChild(), Constants._TAG_X509DATA, i);

    if (e != null) {
        return new X509Data(e, this.baseURI);
    }
    return null;
}
 
Example #9
Source File: X509DigestResolver.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
/** {@inheritDoc}. */
public boolean engineCanResolve(Element element, String baseURI, StorageResolver storage) {
    if (XMLUtils.elementIsInSignatureSpace(element, Constants._TAG_X509DATA)) {
        try {
            X509Data x509Data = new X509Data(element, baseURI);
            return x509Data.containsDigest();
        } catch (XMLSecurityException e) {
            return false;
        }
    } else {
        return false;
    }
}
 
Example #10
Source File: KeyInfo.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Method addX509Data
 *
 * @param x509data
 */
public void add(X509Data x509data) {
    if (x509Datas == null) {
        x509Datas = new ArrayList<X509Data>();
    }
    x509Datas.add(x509data);
    this.constructionElement.appendChild(x509data.getElement());
    XMLUtils.addReturnToElement(this.constructionElement);
}
 
Example #11
Source File: KeyInfo.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Method itemX509Data
 *
 * @param i
 * @return the asked X509Data element, null if the index is too big
 * @throws XMLSecurityException
 */
public X509Data itemX509Data(int i) throws XMLSecurityException {
    if (x509Datas != null) {
        return x509Datas.get(i);
    }
    Element e =
        XMLUtils.selectDsNode(
            this.constructionElement.getFirstChild(), Constants._TAG_X509DATA, i);

    if (e != null) {
        return new X509Data(e, this.baseURI);
    }
    return null;
}
 
Example #12
Source File: X509DigestResolver.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
/** {@inheritDoc}. */
public boolean engineCanResolve(Element element, String baseURI, StorageResolver storage) {
    if (XMLUtils.elementIsInSignatureSpace(element, Constants._TAG_X509DATA)) {
        try {
            X509Data x509Data = new X509Data(element, baseURI);
            return x509Data.containsDigest();
        } catch (XMLSecurityException e) {
            return false;
        }
    } else {
        return false;
    }
}
 
Example #13
Source File: KeyInfo.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Method addX509Data
 *
 * @param x509data
 */
public void add(X509Data x509data) {
    if (x509Datas == null) {
        x509Datas = new ArrayList<X509Data>();
    }
    x509Datas.add(x509data);
    this.constructionElement.appendChild(x509data.getElement());
    XMLUtils.addReturnToElement(this.constructionElement);
}
 
Example #14
Source File: KeyInfo.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Method addX509Data
 *
 * @param x509data
 */
public void add(X509Data x509data) {
    if (x509Datas == null) {
        x509Datas = new ArrayList<X509Data>();
    }
    x509Datas.add(x509data);
    this.constructionElement.appendChild(x509data.getElement());
    XMLUtils.addReturnToElement(this.constructionElement);
}
 
Example #15
Source File: X509DigestResolver.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
/** {@inheritDoc}. */
public boolean engineCanResolve(Element element, String baseURI, StorageResolver storage) {
    if (XMLUtils.elementIsInSignatureSpace(element, Constants._TAG_X509DATA)) {
        try {
            X509Data x509Data = new X509Data(element, baseURI);
            return x509Data.containsDigest();
        } catch (XMLSecurityException e) {
            return false;
        }
    } else {
        return false;
    }
}
 
Example #16
Source File: KeyInfo.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Method addX509Data
 *
 * @param x509data
 */
public void add(X509Data x509data) {
    if (x509Datas == null) {
        x509Datas = new ArrayList<X509Data>();
    }
    x509Datas.add(x509data);
    this.constructionElement.appendChild(x509data.getElement());
    XMLUtils.addReturnToElement(this.constructionElement);
}
 
Example #17
Source File: KeyInfo.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Method itemX509Data
 *
 * @param i
 * @return the asked X509Data element, null if the index is too big
 * @throws XMLSecurityException
 */
public X509Data itemX509Data(int i) throws XMLSecurityException {
    if (x509Datas != null) {
        return x509Datas.get(i);
    }
    Element e =
        XMLUtils.selectDsNode(
            this.constructionElement.getFirstChild(), Constants._TAG_X509DATA, i);

    if (e != null) {
        return new X509Data(e, this.baseURI);
    }
    return null;
}
 
Example #18
Source File: X509DigestResolver.java    From jdk8u_jdk with GNU General Public License v2.0 5 votes vote down vote up
/** {@inheritDoc}. */
public boolean engineCanResolve(Element element, String baseURI, StorageResolver storage) {
    if (XMLUtils.elementIsInSignatureSpace(element, Constants._TAG_X509DATA)) {
        try {
            X509Data x509Data = new X509Data(element, baseURI);
            return x509Data.containsDigest();
        } catch (XMLSecurityException e) {
            return false;
        }
    } else {
        return false;
    }
}
 
Example #19
Source File: KeyInfo.java    From jdk8u_jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Method addX509Data
 *
 * @param x509data
 */
public void add(X509Data x509data) {
    if (x509Datas == null) {
        x509Datas = new ArrayList<X509Data>();
    }
    x509Datas.add(x509data);
    this.constructionElement.appendChild(x509data.getElement());
    XMLUtils.addReturnToElement(this.constructionElement);
}
 
Example #20
Source File: KeyInfo.java    From jdk8u_jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Method itemX509Data
 *
 * @param i
 * @return the asked X509Data element, null if the index is too big
 * @throws XMLSecurityException
 */
public X509Data itemX509Data(int i) throws XMLSecurityException {
    if (x509Datas != null) {
        return x509Datas.get(i);
    }
    Element e =
        XMLUtils.selectDsNode(
            this.constructionElement.getFirstChild(), Constants._TAG_X509DATA, i);

    if (e != null) {
        return new X509Data(e, this.baseURI);
    }
    return null;
}
 
Example #21
Source File: X509DigestResolver.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
/** {@inheritDoc}. */
public boolean engineCanResolve(Element element, String baseURI, StorageResolver storage) {
    if (XMLUtils.elementIsInSignatureSpace(element, Constants._TAG_X509DATA)) {
        try {
            X509Data x509Data = new X509Data(element, baseURI);
            return x509Data.containsDigest();
        } catch (XMLSecurityException e) {
            return false;
        }
    } else {
        return false;
    }
}
 
Example #22
Source File: KeyInfo.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Method addX509Data
 *
 * @param x509data
 */
public void add(X509Data x509data) {
    if (x509Datas == null) {
        x509Datas = new ArrayList<X509Data>();
    }
    x509Datas.add(x509data);
    this.constructionElement.appendChild(x509data.getElement());
    XMLUtils.addReturnToElement(this.constructionElement);
}
 
Example #23
Source File: KeyInfo.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Method itemX509Data
 *
 * @param i
 * @return the asked X509Data element, null if the index is too big
 * @throws XMLSecurityException
 */
public X509Data itemX509Data(int i) throws XMLSecurityException {
    if (x509Datas != null) {
        return x509Datas.get(i);
    }
    Element e =
        XMLUtils.selectDsNode(
            this.constructionElement.getFirstChild(), Constants._TAG_X509DATA, i);

    if (e != null) {
        return new X509Data(e, this.baseURI);
    }
    return null;
}
 
Example #24
Source File: X509DigestResolver.java    From jdk8u-dev-jdk with GNU General Public License v2.0 5 votes vote down vote up
/** {@inheritDoc}. */
public boolean engineCanResolve(Element element, String baseURI, StorageResolver storage) {
    if (XMLUtils.elementIsInSignatureSpace(element, Constants._TAG_X509DATA)) {
        try {
            X509Data x509Data = new X509Data(element, baseURI);
            return x509Data.containsDigest();
        } catch (XMLSecurityException e) {
            return false;
        }
    } else {
        return false;
    }
}
 
Example #25
Source File: KeyInfo.java    From jdk8u-dev-jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Method addX509Data
 *
 * @param x509data
 */
public void add(X509Data x509data) {
    if (x509Datas == null) {
        x509Datas = new ArrayList<X509Data>();
    }
    x509Datas.add(x509data);
    this.constructionElement.appendChild(x509data.getElement());
    XMLUtils.addReturnToElement(this.constructionElement);
}
 
Example #26
Source File: KeyInfo.java    From jdk8u-dev-jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Method itemX509Data
 *
 * @param i
 * @return the asked X509Data element, null if the index is too big
 * @throws XMLSecurityException
 */
public X509Data itemX509Data(int i) throws XMLSecurityException {
    if (x509Datas != null) {
        return x509Datas.get(i);
    }
    Element e =
        XMLUtils.selectDsNode(
            this.constructionElement.getFirstChild(), Constants._TAG_X509DATA, i);

    if (e != null) {
        return new X509Data(e, this.baseURI);
    }
    return null;
}
 
Example #27
Source File: X509DigestResolver.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
/** {@inheritDoc}. */
public boolean engineCanResolve(Element element, String baseURI, StorageResolver storage) {
    if (XMLUtils.elementIsInSignatureSpace(element, Constants._TAG_X509DATA)) {
        try {
            X509Data x509Data = new X509Data(element, baseURI);
            return x509Data.containsDigest();
        } catch (XMLSecurityException e) {
            return false;
        }
    } else {
        return false;
    }
}
 
Example #28
Source File: X509DigestResolver.java    From jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
/** {@inheritDoc}. */
public boolean engineCanResolve(Element element, String baseURI, StorageResolver storage) {
    if (XMLUtils.elementIsInSignatureSpace(element, Constants._TAG_X509DATA)) {
        try {
            X509Data x509Data = new X509Data(element, baseURI);
            return x509Data.containsDigest();
        } catch (XMLSecurityException e) {
            return false;
        }
    } else {
        return false;
    }
}
 
Example #29
Source File: KeyInfo.java    From jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
/**
 * Method addX509Data
 *
 * @param x509data
 */
public void add(X509Data x509data) {
    if (x509Datas == null) {
        x509Datas = new ArrayList<X509Data>();
    }
    x509Datas.add(x509data);
    this.constructionElement.appendChild(x509data.getElement());
    XMLUtils.addReturnToElement(this.constructionElement);
}
 
Example #30
Source File: KeyInfo.java    From jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
/**
 * Method itemX509Data
 *
 * @param i
 * @return the asked X509Data element, null if the index is too big
 * @throws XMLSecurityException
 */
public X509Data itemX509Data(int i) throws XMLSecurityException {
    if (x509Datas != null) {
        return x509Datas.get(i);
    }
    Element e =
        XMLUtils.selectDsNode(
            this.constructionElement.getFirstChild(), Constants._TAG_X509DATA, i);

    if (e != null) {
        return new X509Data(e, this.baseURI);
    }
    return null;
}