Examples of SignatureValidator


Examples of javax.xml.crypto.test.dsig.SignatureValidator

        String fs = System.getProperty("file.separator");
        String base = System.getProperty("basedir") == null ? "./": System.getProperty("basedir");
       
        dir = new File(base + fs + "src/test/resources" + fs
            + "at" + fs + "iaik" + fs + "ixsil" + fs + "coreFeatures", "signatures");
        validator = new SignatureValidator(dir);
    }
View Full Code Here

Examples of javax.xml.crypto.test.dsig.SignatureValidator

        String fs = System.getProperty("file.separator");
        String base = System.getProperty("basedir") == null ? "./": System.getProperty("basedir");
       
        dir = new File(base + fs + "src/test/resources" + fs
            + "javax" + fs + "xml" + fs + "crypto", "dsig");
        validator = new SignatureValidator(dir);
    }
View Full Code Here

Examples of javax.xml.crypto.test.dsig.SignatureValidator

        String fs = System.getProperty("file.separator");
        String base = System.getProperty("basedir") == null ? "./": System.getProperty("basedir");
       
        dir = new File(base + fs + "src/test/resources" + fs
            + "at" + fs + "iaik" + fs + "ixsil" + fs + "coreFeatures", "signatures");
        validator = new SignatureValidator(dir);
    }
View Full Code Here

Examples of org.opensaml.xml.signature.SignatureValidator

                throw new WSSecurityException(
                    WSSecurityException.FAILURE, "invalidSAMLsecurity",
                    new Object[]{"cannot get certificate or key"}
                );
            }
            SignatureValidator sigValidator = new SignatureValidator(credential);
            try {
                sigValidator.validate(sig);
            } catch (ValidationException ex) {
                throw new WSSecurityException("SAML signature validation failed", ex);
            }
            signatureKeyInfo = samlKeyInfo;
        } else {
View Full Code Here

Examples of org.opensaml.xml.signature.SignatureValidator

            credential.setPublicKey(samlKeyInfo.getPublicKey());
        } else {
            LOG.fine("Can't get X509Certificate or PublicKey to verify signature");
            throw new WSSecurityException(WSSecurityException.FAILURE, "invalidSAMLsecurity");
        }
        SignatureValidator sigValidator = new SignatureValidator(credential);
        try {
            sigValidator.validate(signature);
        } catch (ValidationException ex) {
            LOG.log(Level.FINE, "Error in validating the SAML Signature: " + ex.getMessage(), ex);
            throw new WSSecurityException(WSSecurityException.FAILURE, "invalidSAMLsecurity");
        }
    }
View Full Code Here

Examples of org.opensaml.xml.signature.SignatureValidator

                throw new WSSecurityException(
                    WSSecurityException.FAILURE, "invalidSAMLsecurity",
                    new Object[]{"cannot get certificate or key"}
                );
            }
            SignatureValidator sigValidator = new SignatureValidator(credential);
            try {
                sigValidator.validate(sig);
            } catch (ValidationException ex) {
                throw new WSSecurityException("SAML signature validation failed", ex);
            }
            signatureKeyInfo = samlKeyInfo;
        } else {
View Full Code Here

Examples of org.opensaml.xml.signature.SignatureValidator

            credential.setPublicKey(samlKeyInfo.getPublicKey());
        } else {
            LOG.fine("Can't get X509Certificate or PublicKey to verify signature");
            throw new WSSecurityException(WSSecurityException.ErrorCode.FAILURE, "invalidSAMLsecurity");
        }
        SignatureValidator sigValidator = new SignatureValidator(credential);
        try {
            sigValidator.validate(signature);
        } catch (ValidationException ex) {
            LOG.log(Level.FINE, "Error in validating the SAML Signature: " + ex.getMessage(), ex);
            throw new WSSecurityException(WSSecurityException.ErrorCode.FAILURE, "invalidSAMLsecurity");
        }
    }
View Full Code Here

Examples of org.opensaml.xml.signature.SignatureValidator

                throw new WSSecurityException(
                    WSSecurityException.FAILURE, "invalidSAMLsecurity",
                    new Object[]{"cannot get certificate or key"}
                );
            }
            SignatureValidator sigValidator = new SignatureValidator(credential);
            try {
                sigValidator.validate(sig);
            } catch (ValidationException ex) {
                throw new WSSecurityException("SAML signature validation failed", ex);
            }
            signatureKeyInfo = samlKeyInfo;
        } else {
View Full Code Here

Examples of org.opensaml.xml.signature.SignatureValidator

            }
          }
        }
      }

      SignatureValidator validator = new SignatureValidator(credential);
      validator.validate(sig);
      holder.populateAttributeTable(this.attributeTable);

    } catch (Exception e) {
      log.debug(e);
      throw new RelyingPartyException("errorInTokenVerification", e);
View Full Code Here

Examples of org.opensaml.xml.signature.SignatureValidator

                                                     String domainName) {
        boolean isSignatureValid = false;

        if (assertion.getSignature() != null) {
            try {
                SignatureValidator validator = new SignatureValidator(SAMLSSOUtil.getX509CredentialImplForTenant(domainName, alias));
                validator.validate(assertion.getSignature());
                isSignatureValid = true;
            } catch (IdentitySAML2SSOException ignore) {
                log.warn("Signature validation failed for the SAML Assertion : Failed to construct the X509CredentialImpl for the alias " + alias);
            } catch (ValidationException ignore) {
                log.warn("Signature Validation Failed for the SAML Assertion : Signature is invalid.");
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.