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()

        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()

    */
   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()

            try
            {
                Document oDoc = new DocumentImpl();
                KeyInfo oKeyInfo = new KeyInfo(oDoc);
                X509Data oData = new X509Data(oDoc);
                oData.addCertificate(oCertChain[oCertChain.length - 1]);
                oKeyInfo.add(oData);
                msKeyInfo =
                    DOMUtils.toString(oKeyInfo.getElement(), false, true);
            }
            catch (Exception oEx)
View Full Code Here

Examples of org.certificatetransparency.ctlog.comm.HttpLogClient.addCertificate()

    List<Certificate> certs = CryptoDataLoader.certificatesFromFile(new File(pemFile));
    System.out.println(String.format("Total number of certificates in chain: %d", certs.size()));

    HttpLogClient client = new HttpLogClient("http://ct.googleapis.com/pilot/ct/v1/");

    Ct.SignedCertificateTimestamp resp = client.addCertificate(certs);

    System.out.println(resp);
    if (args.length >= 2) {
      String outputFile = args[1];
      //TODO(eranm): Binary encoding compatible with the C++ code.
View Full Code Here

Examples of org.nasutekds.server.util.CertificateManager.addCertificate()

        trustManager = new CertificateManager(
            getTrustManagerPath(),
            CertificateManager.KEY_STORE_TYPE_JKS,
            pwd);
        trustManager.addCertificate(SELF_SIGNED_CERT_ALIAS,
            new File(getTemporaryCertificatePath()));
        createProtectedFile(getKeystorePinPath(), pwd);
        f = new File(getTemporaryCertificatePath());
        f.delete();
View Full Code Here

Examples of org.switchyard.security.callback.CertificateCallback.addCertificate()

                ((PasswordCallback)cb).setPassword(keyPassword.toCharArray());
            } else if (cb instanceof CertificateCallback) {
                CertificateCallback cert_cb = (CertificateCallback)cb;
                for (Credential cred : credentials) {
                    if (cred instanceof CertificateCredential) {
                        cert_cb.addCertificate(((CertificateCredential)cred).getCertificate());
                    }
                }
            }
        }
    }
View Full Code Here

Examples of sun.security.provider.SystemIdentity.addCertificate()

                        AccessController.doPrivileged(
                         new java.security.PrivilegedExceptionAction() {
                            public Object run()
                                throws java.security.KeyManagementException
                            {
                                id.addCertificate(oldC);
                                return null;
                            }
                        });
                    } catch (java.security.PrivilegedActionException pae) {
                        throw (java.security.KeyManagementException)
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.