BC upgrade refactoring in
ECA-3992 broke the SCEP stress test.
java.lang.ClassCastException: org.bouncycastle.cert.X509CertificateHolder cannot be cast to java.security.cert.X509Certificate
JcaX509CertificateConverter should be used instead. And since this is something that happens quite a bit in the code now, a new CertTools method for this conversion would be nice.
Also, the X509CRLHolder parsing in SCEPTest will try to cast to X509CRL which will fail if this code runs .