Skip to content
Snippets Groups Projects
Commit 9db92581 authored by Henry Borasch's avatar Henry Borasch
Browse files

make JWKValidator throw always exceptions if something fails

parent 1e8ccf22
No related branches found
No related tags found
2 merge requests!143901 - More precise Validations with `JWKValidator`,!117Feature/808 validate root certificates
...@@ -213,11 +213,7 @@ public class DefaultValidationService implements ValidationService { ...@@ -213,11 +213,7 @@ public class DefaultValidationService implements ValidationService {
} }
private JWKValidator addLogLevel(final JWKValidatorBuilder.JWKValidatorX5CErrorHandling validator) { private JWKValidator addLogLevel(final JWKValidatorBuilder.JWKValidatorX5CErrorHandling validator) {
if (config.getCurrentEnvironment().isAllowInsecurePublicKey()) { return validator.withThrowingExceptions().withErrorLogLevel(LogLevel.ERROR).build();
return validator.withoutThrowingExceptions().withErrorLogLevel(LogLevel.WARN).build();
} else {
return validator.withThrowingExceptions().withErrorLogLevel(LogLevel.ERROR).build();
}
} }
private void validateWithoutCertChain(final RSAKey publicKey, final KeyOperation purpose) throws JWKValidationException { private void validateWithoutCertChain(final RSAKey publicKey, final KeyOperation purpose) throws JWKValidationException {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment