NIFIREG-346 - fix build issue after bouncycastle upgrade (#303)
diff --git a/nifi-registry-core/nifi-registry-security-utils/src/main/java/org/apache/nifi/registry/security/util/CertificateUtils.java b/nifi-registry-core/nifi-registry-security-utils/src/main/java/org/apache/nifi/registry/security/util/CertificateUtils.java
index 30e77db..d766b57 100644
--- a/nifi-registry-core/nifi-registry-security-utils/src/main/java/org/apache/nifi/registry/security/util/CertificateUtils.java
+++ b/nifi-registry-core/nifi-registry-security-utils/src/main/java/org/apache/nifi/registry/security/util/CertificateUtils.java
@@ -39,7 +39,6 @@
import org.bouncycastle.cert.X509v3CertificateBuilder;
import org.bouncycastle.cert.jcajce.JcaX509CertificateConverter;
import org.bouncycastle.cert.jcajce.JcaX509ExtensionUtils;
-import org.bouncycastle.crypto.tls.TlsException;
import org.bouncycastle.jce.provider.BouncyCastleProvider;
import org.bouncycastle.operator.ContentSigner;
import org.bouncycastle.operator.OperatorCreationException;
@@ -51,7 +50,6 @@
import javax.naming.InvalidNameException;
import javax.naming.ldap.LdapName;
import javax.naming.ldap.Rdn;
-import javax.net.ssl.SSLException;
import javax.net.ssl.SSLPeerUnverifiedException;
import javax.net.ssl.SSLSocket;
import java.io.ByteArrayInputStream;
@@ -609,26 +607,6 @@
}
/**
- * Returns {@code true} if this exception is due to a TLS problem (either directly or because of its cause, if present). Traverses the cause chain recursively.
- *
- * @param e the exception to evaluate
- * @return true if the direct or indirect cause of this exception was TLS-related
- */
- public static boolean isTlsError(Throwable e) {
- if (e == null) {
- return false;
- } else {
- if (e instanceof CertificateException || e instanceof TlsException || e instanceof SSLException) {
- return true;
- } else if (e.getCause() != null) {
- return isTlsError(e.getCause());
- } else {
- return false;
- }
- }
- }
-
- /**
* Returns the JVM Java major version based on the System properties (e.g. {@code JVM 1.8.0.231} -> {code 8}).
*
* @return the Java major version