@Override public TrustKeyProcessingException keyStoreProcessingError(Throwable t) { return new TrustKeyProcessingException(t); }
protected boolean validate(String remoteAddress, String queryString, SessionHolder holder, boolean isPost) throws IOException, GeneralSecurityException { if (holder.samlRequest == null || holder.samlRequest.length() == 0) { return false; } if (!this.ignoreIncomingSignatures && !isPost) { String sig = holder.signature; if (sig == null || sig.length() == 0) { log.error("Signature received from SP is null:" + remoteAddress); return false; } // Check if there is a signature byte[] sigValue = RedirectBindingSignatureUtil.getSignatureValueFromSignedURL(queryString); if (sigValue == null) return false; PublicKey validatingKey; try { validatingKey = keyManager.getValidatingKey(remoteAddress); } catch (TrustKeyConfigurationException e) { throw new GeneralSecurityException(e.getCause()); } catch (TrustKeyProcessingException e) { throw new GeneralSecurityException(e.getCause()); } return RedirectBindingSignatureUtil.validateSignature(queryString, validatingKey, sigValue); } else { // Post binding no signature verification. The SAML message signature is verified return true; } }
protected boolean validate(String remoteAddress, String queryString, SessionHolder holder, boolean isPost) throws IOException, GeneralSecurityException { if (holder.samlRequest == null || holder.samlRequest.length() == 0) { return false; } if (!this.ignoreIncomingSignatures && !isPost) { String sig = holder.signature; if (sig == null || sig.length() == 0) { log.error("Signature received from SP is null:" + remoteAddress); return false; } // Check if there is a signature byte[] sigValue = RedirectBindingSignatureUtil.getSignatureValueFromSignedURL(queryString); if (sigValue == null) return false; PublicKey validatingKey; try { validatingKey = keyManager.getValidatingKey(remoteAddress); } catch (TrustKeyConfigurationException e) { throw new GeneralSecurityException(e.getCause()); } catch (TrustKeyProcessingException e) { throw new GeneralSecurityException(e.getCause()); } return RedirectBindingSignatureUtil.validateSignature(queryString, validatingKey, sigValue); } else { // Post binding no signature verification. The SAML message signature is verified return true; } }
@Override public TrustKeyProcessingException keyStoreProcessingError(Throwable t) { return new TrustKeyProcessingException(t); }
@Override public TrustKeyProcessingException keyStoreProcessingError(Throwable t) { return new TrustKeyProcessingException(t); }