Examples of checkSignatureValue()


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

            }
        }
        try {
            boolean signatureOk = false;
            if (certs != null) {
                signatureOk = sig.checkSignatureValue(certs[0]);
            } else {
                signatureOk = sig.checkSignatureValue(sig
                        .createSecretKey(secretKey));
            }
            if (signatureOk) {
View Full Code Here

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

        try {
            boolean signatureOk = false;
            if (certs != null) {
                signatureOk = sig.checkSignatureValue(certs[0]);
            } else {
                signatureOk = sig.checkSignatureValue(sig
                        .createSecretKey(secretKey));
            }
            if (signatureOk) {
                if (tlog.isDebugEnabled()) {
                    t2 = System.currentTimeMillis();
View Full Code Here

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

                return;
            }

            XMLSignature sig = new XMLSignature(signatureElem, BaseURI);

            boolean verify = sig.checkSignatureValue(sig.getKeyInfo().getPublicKey());
            System.out.println("Server verification complete.");

            System.out.println("The signature is" + (verify
                    ? " "
                    : " not ") + "valid");
View Full Code Here

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

         (Element) doc.getElementsByTagNameNS(Constants.SignatureSpecNS,
                                              Constants._TAG_SIGNATURE).item(0);
      XMLSignature signature = new XMLSignature(sigElement,
                                                f.toURL().toString());
      boolean verify =
         signature.checkSignatureValue(signature.getKeyInfo().getPublicKey());

      log.debug("   signature.checkSignatureValue finished: " + verify);

      int failures = 0;
View Full Code Here

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

         (Element) doc.getElementsByTagNameNS(Constants.SignatureSpecNS,
                                              Constants._TAG_SIGNATURE).item(0);
      XMLSignature xmlSignature = new XMLSignature(signatureElement,
                                     fileIn.toURL().toString());
      boolean verify =
         xmlSignature
            .checkSignatureValue(xmlSignature.getKeyInfo().getPublicKey());
      int length = xmlSignature.getSignedInfo().getLength();
      int numberOfPositiveReferences = 0;

      for (int i = 0; i < length; i++) {
View Full Code Here

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

      signature.setFollowNestedManifests(followManifests);

      byte keybytes[] = hmacKey;
      javax.crypto.SecretKey sk = signature.createSecretKey(keybytes);

      return signature.checkSignatureValue(sk);
   }

   /**
    * Method verify
    *
 
View Full Code Here

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

      boolean result=false;
      if (ki != null) {
         X509Certificate cert = ki.getX509Certificate();

         if (cert != null) {
           result=signature.checkSignatureValue(cert);
         } else {
            PublicKey pk = ki.getPublicKey();

            if (pk != null) {
              result=signature.checkSignatureValue(pk);
View Full Code Here

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

           result=signature.checkSignatureValue(cert);
         } else {
            PublicKey pk = ki.getPublicKey();

            if (pk != null) {
              result=signature.checkSignatureValue(pk);
            } else {
               throw new RuntimeException(
                  "Did not find a public key, so I can't check the signature");
            }
         }
View Full Code Here

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

               if (cert != null) {

                  //check if the signature is valid using the cert
                  System.out.println("Check: "
                                     + signature.checkSignatureValue(cert));
               } else {

                  //Maybe it's a public key
                  PublicKey pk = signature.getKeyInfo().getPublicKey();
View Full Code Here

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

                  if (pk != null) {

                     //check if the signature is valid using the public key
                     System.out.println("Check: "
                                        + signature.checkSignatureValue(pk));
                  } else {

                     //No X509Cert or PublicKey could be found.
                     System.out
                        .println("Could not find Certificate or PublicKey");
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.