Examples of addCertificate()


Examples of org.apache.xml.security.keys.content.X509Data.addCertificate()

        if (useCertStr != null) {
            useCert = Boolean.parseBoolean(useCertStr);
        }
        if (useCert) {
            X509Data certElem = new X509Data(writer.getDocument());
            certElem.addCertificate(cert);
            writer.getCurrentNode().appendChild(certElem.getElement());
        } else {
            writer.writeStartElement("dsig", "KeyValue", "http://www.w3.org/2000/09/xmldsig#");
            PublicKey key = cert.getPublicKey();
            String pubKeyAlgo = key.getAlgorithm();
View Full Code Here

Examples of org.apache.xml.security.keys.content.X509Data.addCertificate()

        if (useCertStr != null) {
            useCert = Boolean.parseBoolean(useCertStr);
        }
        if (useCert) {
            X509Data certElem = new X509Data(writer.getDocument());
            certElem.addCertificate(cert);
            writer.getCurrentNode().appendChild(certElem.getElement());
        } else {
            writer.writeStartElement("ds", "KeyValue", "http://www.w3.org/2000/09/xmldsig#");
            PublicKey key = cert.getPublicKey();
            String pubKeyAlgo = key.getAlgorithm();
View Full Code Here

Examples of org.apache.xml.security.keys.content.X509Data.addCertificate()

        if (useCertStr != null) {
            useCert = Boolean.parseBoolean(useCertStr);
        }
        if (useCert) {
            X509Data certElem = new X509Data(writer.getDocument());
            certElem.addCertificate(cert);
            writer.getCurrentNode().appendChild(certElem.getElement());
        } else {
            writer.writeStartElement("ds", "KeyValue", "http://www.w3.org/2000/09/xmldsig#");
            PublicKey key = cert.getPublicKey();
            String pubKeyAlgo = key.getAlgorithm();
View Full Code Here

Examples of org.apache.xml.security.keys.content.X509Data.addCertificate()

        if (useCertStr != null) {
            useCert = Boolean.parseBoolean(useCertStr);
        }
        if (useCert) {
            X509Data certElem = new X509Data(writer.getDocument());
            certElem.addCertificate(cert);
            writer.getCurrentNode().appendChild(certElem.getElement());
        } else {
            writer.writeStartElement("ds", "KeyValue", "http://www.w3.org/2000/09/xmldsig#");
            PublicKey key = cert.getPublicKey();
            String pubKeyAlgo = key.getAlgorithm();
View Full Code Here

Examples of org.apache.xml.security.keys.content.X509Data.addCertificate()

    private void addX509Certificate(X509Certificate cert, KeyInfo keyInfo) {

        X509Data data = new X509Data(doc);
        try {
            data.addCertificate(cert);
        } catch (XMLSecurityException se) {
            throw new RuntimeException(
                    "Adding the X509Certificate to X509Data object failed", se);
        }
        keyInfo.add(data);
View Full Code Here

Examples of org.apache.xml.security.keys.content.X509Data.addCertificate()

        doc.appendChild(ki.getElement());

        X509Certificate cert = (X509Certificate) ks.getCertificate("kiss");
        X509Data x509Data = new X509Data(doc);
        x509Data.addCertificate(cert);
        ki.add(x509Data);

        ByteArrayOutputStream bos = new ByteArrayOutputStream();

View Full Code Here

Examples of org.apache.xml.security.keys.content.X509Data.addCertificate()

        doc.appendChild(ki.getElement());

        X509Certificate cert1 = (X509Certificate) ks1.getCertificate("kiss");

        X509Data x509Data = new X509Data(doc);
        x509Data.addCertificate(cert1);

        ki.add(x509Data);
        ByteArrayOutputStream bos = new ByteArrayOutputStream();
        XKMSUtil.outputDOM(doc, bos);
View Full Code Here

Examples of org.apache.xml.security.keys.content.X509Data.addCertificate()

        X509Certificate cert1 = (X509Certificate) ks1.getCertificate("kiss");
        X509Certificate cert2 = (X509Certificate) ks2.getCertificate("kiss2");

        X509Data x509Data = new X509Data(doc);
        x509Data.addCertificate(cert1);
        x509Data.addCertificate(cert2);
        ki.add(x509Data);
        ByteArrayOutputStream bos = new ByteArrayOutputStream();
        XKMSUtil.outputDOM(doc, bos);
View Full Code Here

Examples of org.apache.xml.security.keys.content.X509Data.addCertificate()

        X509Certificate cert1 = (X509Certificate) ks1.getCertificate("kiss");
        X509Certificate cert2 = (X509Certificate) ks2.getCertificate("kiss2");

        X509Data x509Data = new X509Data(doc);
        x509Data.addCertificate(cert1);
        x509Data.addCertificate(cert2);
        ki.add(x509Data);
        ByteArrayOutputStream bos = new ByteArrayOutputStream();
        XKMSUtil.outputDOM(doc, bos);

        XMLStreamReader reader = XMLInputFactory.newInstance()
View Full Code Here

Examples of org.apache.xml.security.keys.content.X509Data.addCertificate()

            }
           
            if (certValue != null) {
                X509Data data = new X509Data(doc);
                try {
                    data.addCertificate(certValue);
                    keyInfo.add(data);
                } catch (XMLSecurityException ex) {
                    throw new XKMSException(ex);
                }
            }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.