Examples of checkSignatureValue()


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

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

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

            }
        }

        if (pop != null && key != null) {
            try {
                pop.checkSignatureValue(key);
            } catch (XMLSignatureException se) {
                throw new XKMSException(
                        "Proof-Of-Pocession varification failed", se);
            }
        }
View Full Code Here

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

        Key key = pkb.getKeyValue();

        if (key != null) {
            try {
                proofOfPossession.checkSignatureValue(key);

            } catch (XMLSignatureException e) {
                LOG.error("", e);

                throw new XKMSException(
View Full Code Here

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

                .getKeyBindingAuthentication();

        Key keyBindingAuthenticationKey = authentication
                .getKeyBindingAuthenticationKey();
        try {
            if (!keyBindingAuthentication
                    .checkSignatureValue(keyBindingAuthenticationKey)) {
                throw new XKMSException(XKMSException.NO_AUTHENTICATION,
                        "invalidXMLSign");
            }
            System.out.println("success");
View Full Code Here

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

        XMLSignature signature = abstractType.getSignature();
        if (signature != null) {
            X509Certificate x509Certificate = abstractType.getSignCert();

            try {
                signature.checkSignatureValue(x509Certificate);
            } catch (XMLSignatureException e) {
                LOG.error("", e);
                throw new XKMSException(XKMSException.NO_AUTHENTICATION,
                        "failedXMLSign", e);
            }
View Full Code Here

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

                .buildElement(registerRequestElem);

        Authentication authentication = registerRequest.getAuthentication();
        XMLSignature keyBindingAuthentication = authentication
                .getKeyBindingAuthentication();
        assertTrue(keyBindingAuthentication.checkSignatureValue(authKey));

        PrototypeKeyBinding prototypeKeyBinding = registerRequest
                .getPrototypeKeyBinding();
        KeyInfo keyInfo = prototypeKeyBinding.getKeyInfo();
        PublicKey publicKey = keyInfo.getPublicKey();
View Full Code Here

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

        PrototypeKeyBinding prototypeKeyBinding = registerRequest
                .getPrototypeKeyBinding();
        KeyInfo keyInfo = prototypeKeyBinding.getKeyInfo();
        PublicKey publicKey = keyInfo.getPublicKey();
        XMLSignature proofOfPossession = registerRequest.getProofOfPossession();
        assertTrue(proofOfPossession.checkSignatureValue(publicKey));
    }
}
View Full Code Here

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

       
        Authentication authentication = recoverRequest.getAuthentication();
        XMLSignature keyBindingAuthentication = authentication
                .getKeyBindingAuthentication();
       
        assertTrue(keyBindingAuthentication.checkSignatureValue(authKey));
    }
}
View Full Code Here

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

          Transforms.TRANSFORM_ENVELOPED_SIGNATURE +
      " transform in signature");
    }
   
    // finally check the signature
    if (!oSig.checkSignatureValue(oPubKey))
    {
      throw new RuntimeException("Signature failed to verify.");
    }
   
  }
View Full Code Here

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

          Transforms.TRANSFORM_ENVELOPED_SIGNATURE +
      " transform in signature");
    }
   
    // finally check the signature
    if (!oSig.checkSignatureValue(oPubKey))
    {
      throw new XMLSecurityException("Signature failed to verify.");
    }
   
  }
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.