Examples of addCertificate()


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

        writer.writeStartElement("dsig", "KeyInfo", "http://www.w3.org/2000/09/xmldsig#");
        writer.writeNamespace("dsig", "http://www.w3.org/2000/09/xmldsig#");

        if (useCertificateForConfirmationKeyInfo) {
            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("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("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()

    */
   public void addKeyInfo(X509Certificate cert) throws XMLSecurityException {

      X509Data x509data = new X509Data(this._doc);

      x509data.addCertificate(cert);
      this.getKeyInfo().add(x509data);
   }

   /**
    * Add this public key to the KeyInfo. This will include the complete key in
View Full Code Here

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

      ki.addKeyValue(cert.getPublicKey());

      X509Data x509Data = new X509Data(doc);

      ki.add(x509Data);
      x509Data.addCertificate(cert);
      x509Data.addSubjectName("Subject name");
      x509Data.addIssuerSerial("Subject nfsdfhs", 6786);
      ki.add(new RSAKeyValue(doc, new BigInteger("678"),
                             new BigInteger("6870")));
      XMLUtils.outputDOMc14nWithComments(doc, System.out);
View Full Code Here

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

                            RSAKeyValue rsaKeyValue = new RSAKeyValue(instanceDoc, key);
                            ki.add(rsaKeyValue);
                        }
                    } else {
                        X509Data certElem = new X509Data(instanceDoc);
                        certElem.addCertificate(certs[0]);
                        ki.add(certElem);
                    }
                } catch (WSSecurityException ex) {
                    if (log.isDebugEnabled()) {
                        log.debug(ex.getMessage(), ex);
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("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("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("dsig", "KeyValue", "http://www.w3.org/2000/09/xmldsig#");
            PublicKey key = cert.getPublicKey();
            String pubKeyAlgo = key.getAlgorithm();
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.