tweak to exception handling to reduce real cause vanishing.
import java.security.Provider;
import java.security.cert.CertPath;
import java.security.cert.CertPathBuilder;
+import java.security.cert.CertPathBuilderException;
import java.security.cert.CertSelector;
import java.security.cert.CertStore;
import java.security.cert.CertStoreParameters;
@@ -308,6 +309,14 @@ private CertStoreParameters getCertStoreParameters(X509Certificate eeCert, X509C
return trustedChain;
}
+ catch (CertificateException e)
+ {
+ throw e;
+ }
+ catch (CertPathBuilderException e)
+ {
+ throw new CertificateException(e.getMessage(), e.getCause());
+ }
catch (GeneralSecurityException e)
{
throw new CertificateException("Unable to construct a valid chain", e);
