Skip to content

Commit

Permalink
Add RuntimeOperatorException to catch for CSCA validation (#37)
Browse files Browse the repository at this point in the history
  • Loading branch information
f11h authored May 4, 2021
1 parent 946abde commit 38cc373
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
import org.bouncycastle.cert.X509CertificateHolder;
import org.bouncycastle.operator.ContentVerifierProvider;
import org.bouncycastle.operator.OperatorCreationException;
import org.bouncycastle.operator.RuntimeOperatorException;
import org.bouncycastle.operator.jcajce.JcaContentVerifierProviderBuilder;
import org.springframework.stereotype.Service;

Expand Down Expand Up @@ -243,8 +244,9 @@ private boolean certificateSignedByCa(X509CertificateHolder certificate, Trusted

try {
return certificate.isSignatureValid(verifier);
} catch (CertException e) {
} catch (CertException | RuntimeOperatorException e) {
log.error("Could not verify certificate issuance.");
log.debug("Could not verify certificate issuance: {}", e.getMessage());
return false;
}
}
Expand Down

0 comments on commit 38cc373

Please sign in to comment.