Examples of unmarshalXMLSignature()


Examples of javax.xml.crypto.dsig.XMLSignatureFactory.unmarshalXMLSignature()

        DOMValidateContext valContext = new DOMValidateContext(new CloudsealKeySelector(idpPublicKey), nl.item(0));

        XMLSignatureFactory factory = XMLSignatureFactory.getInstance("DOM");
        boolean valid = false;
        try {
            XMLSignature signature = factory.unmarshalXMLSignature(valContext);
            valid = signature.validate(valContext);
        } catch (MarshalException ex) {
            throw new VerificationException("Response verification failed");
        } catch (XMLSignatureException ex) {
            throw new VerificationException("Response verification failed");
View Full Code Here

Examples of javax.xml.crypto.dsig.XMLSignatureFactory.unmarshalXMLSignature()

        DOMValidateContext valContext = new DOMValidateContext(new CloudsealKeySelector(idpPublicKey), nl.item(0));

        XMLSignatureFactory factory = XMLSignatureFactory.getInstance("DOM");
        boolean valid = false;
        try {
            XMLSignature signature = factory.unmarshalXMLSignature(valContext);
            valid = signature.validate(valContext);
        } catch (MarshalException ex) {
            throw new VerificationException("Response verification failed");
        } catch (XMLSignatureException ex) {
            throw new VerificationException("Response verification failed");
View Full Code Here

Examples of javax.xml.crypto.dsig.XMLSignatureFactory.unmarshalXMLSignature()

        }
        setUriDereferencerAndBaseUri(valContext);

        setCryptoContextProperties(valContext);

        final XMLSignature signature = fac.unmarshalXMLSignature(valContext);

        executeApplicationCheck(out, doc, signature);

        boolean coreValidity;
        try {
View Full Code Here

Examples of javax.xml.crypto.dsig.XMLSignatureFactory.unmarshalXMLSignature()

//    }

    X509Certificate cert = certificate.getX509Cert();   
    DOMValidateContext ctx = new DOMValidateContext(cert.getPublicKey(), nodes.item(0));   
    XMLSignatureFactory sigF = XMLSignatureFactory.getInstance("DOM");   
    XMLSignature xmlSignature = sigF.unmarshalXMLSignature(ctx);   

    return xmlSignature.validate(ctx);
  }

  public String getNameId() throws Exception {
View Full Code Here

Examples of javax.xml.crypto.dsig.XMLSignatureFactory.unmarshalXMLSignature()

            Element signElement = (Element) nl.item(0);
            DOMValidateContext validationContext = new DOMValidateContext(pubKey, signElement);
            XMLSignatureFactory signatureFactory = WSSPolicyConsumerImpl.getInstance().getSignatureFactory();

            // unmarshal the XMLSignature
            XMLSignature xmlSignature = signatureFactory.unmarshalXMLSignature(validationContext);
            validationContext.setURIDereferencer(new DSigResolver(map, samlAssertion));
            boolean coreValidity = xmlSignature.validate(validationContext);
            return coreValidity;
        } catch (Exception ex) {
            throw new XWSSecurityException(ex);
View Full Code Here

Examples of javax.xml.crypto.dsig.XMLSignatureFactory.unmarshalXMLSignature()

                return 0;
            }
            DOMValidateContext validationContext = new DOMValidateContext(KeySelectorImpl.getInstance(), signElement);
            XMLSignatureFactory signatureFactory = WSSPolicyConsumerImpl.getInstance().getSignatureFactory();
            // unmarshal the XMLSignature
            XMLSignature signature = signatureFactory.unmarshalXMLSignature(validationContext);
            verifySignatureAlgorithm(signature);
           
            //For SignatureConfirmation
            List scList = (ArrayList)context.getExtraneousProperty("receivedSignValues");
            if(scList != null){
View Full Code Here

Examples of javax.xml.crypto.dsig.XMLSignatureFactory.unmarshalXMLSignature()

           
            DOMValidateContext validationContext =
                    new DOMValidateContext(KeySelectorImpl.getInstance(), signElement);
            XMLSignatureFactory signatureFactory = WSSPolicyConsumerImpl.getInstance().getSignatureFactory();
            // unmarshal the XMLSignature
            XMLSignature signature = signatureFactory.unmarshalXMLSignature(validationContext);
            validationContext.setURIDereferencer(DSigResolver.getInstance());
            // Validate the XMLSignature (generated above)
            validationContext.put(MessageConstants.WSS_PROCESSING_CONTEXT, context);
            boolean coreValidity = signature.validate(validationContext);
            if (coreValidity == false){
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.