You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by bb...@apache.org on 2020/09/14 13:26:02 UTC

[nifi-registry] branch main updated: NIFIREG-346 - fix build issue after bouncycastle upgrade (#303)

This is an automated email from the ASF dual-hosted git repository.

bbende pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/nifi-registry.git


The following commit(s) were added to refs/heads/main by this push:
     new f3663e1  NIFIREG-346 - fix build issue after bouncycastle upgrade (#303)
f3663e1 is described below

commit f3663e12111341d6582b545ca0e03f1ad9432b3e
Author: Pierre Villard <pi...@gmail.com>
AuthorDate: Mon Sep 14 15:25:56 2020 +0200

    NIFIREG-346 - fix build issue after bouncycastle upgrade (#303)
---
 .../registry/security/util/CertificateUtils.java   | 22 ----------------------
 1 file changed, 22 deletions(-)

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.X509CertificateHolder;
 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 org.slf4j.LoggerFactory;
 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 @@ public final class CertificateUtils {
     }
 
     /**
-     * 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