Examples of addKeyInfo()


Examples of org.apache.xml.security.signature.XMLSignature.addKeyInfo()

            sig = prepareEnvelopedSignature(doc, id, referenceId, sigAlgo);
        }
       
       
        sig.addKeyInfo(issuerCerts[0]);
        sig.addKeyInfo(issuerCerts[0].getPublicKey());
        sig.sign(privateKey);
        return sig.getElement().getOwnerDocument();
    }
   
    private XMLSignature prepareEnvelopingSignature(Document doc,
View Full Code Here

Examples of org.apache.xml.security.signature.XMLSignature.addKeyInfo()

  transforms.addTransform(Transforms.TRANSFORM_C14N_WITH_COMMENTS);
  signature.addDocument("", transforms,
        MessageDigestAlgorithm.ALGO_ID_DIGEST_SHA1);

  if (cert) {
      signature.addKeyInfo(signingCert);
  } else {
      signature.addKeyInfo(publicKey);
  }

  Element nsElement = testDocument.createElementNS(null, "nsElement");
View Full Code Here

Examples of org.apache.xml.security.signature.XMLSignature.addKeyInfo()

        MessageDigestAlgorithm.ALGO_ID_DIGEST_SHA1);

  if (cert) {
      signature.addKeyInfo(signingCert);
  } else {
      signature.addKeyInfo(publicKey);
  }

  Element nsElement = testDocument.createElementNS(null, "nsElement");
  nsElement.setAttributeNS(Constants.NamespaceSpecNS, "xmlns:ds",
        Constants.SignatureSpecNS);
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.