List of usage examples for org.bouncycastle.operator RuntimeOperatorException getCause
public Throwable getCause()
From source file:org.jscep.client.Client.java
License:Open Source License
private boolean isSelfSigned(final X509Certificate cert) throws ClientException { try {// ww w .j a v a 2 s. com JcaX509CertificateHolder holder = new JcaX509CertificateHolder(cert); ContentVerifierProvider verifierProvider = new JcaContentVerifierProviderBuilder().build(holder); return holder.isSignatureValid(verifierProvider); } catch (RuntimeOperatorException e) { if (e.getCause() instanceof SignatureException) { LOGGER.warn("SignatureException detected so we consider that the certificate is not self signed"); return false; } throw new ClientException(e); } catch (Exception e) { throw new ClientException(e); } }