List<? extends Certificate> certificates = certPath .getCertificates(); int index = certException.getIndex(); if (index >= 0) { Certificate pbCertificate = certificates.get(index);
"Certificate path validation failed on certificate number " + e.getIndex() + ", details: " + e .getMessage(), e); } catch (Exception e) {
} catch (CertPathValidatorException e) { throw new CertificateVerificationException("Certificate Path Validation failed on certificate number " + e.getIndex() + ", details: " + e.getMessage(), e); } catch (Exception e) { throw new CertificateVerificationException("Certificate Path Validation failed", e);