diff --git a/src/main/java8/net/runelite/launcher/CertPathExtractor.java b/src/main/java8/net/runelite/launcher/CertPathExtractor.java index 52931d04..ef734bd3 100644 --- a/src/main/java8/net/runelite/launcher/CertPathExtractor.java +++ b/src/main/java8/net/runelite/launcher/CertPathExtractor.java @@ -24,7 +24,6 @@ */ package net.runelite.launcher; -import javax.net.ssl.SSLHandshakeException; import sun.security.provider.certpath.AdjacencyList; import sun.security.provider.certpath.SunCertPathBuilderException; import sun.security.validator.ValidatorException; @@ -33,22 +32,12 @@ class CertPathExtractor { static String extract(Throwable ex) { + // IOException -> SSLHandshakeException -> ValidatorException -> SunCertPathBuilderException try { - if (ex instanceof SSLHandshakeException) - { - ex = ex.getCause(); - if (ex instanceof ValidatorException) - { - ex = ex.getCause(); - if (ex instanceof SunCertPathBuilderException) - { - SunCertPathBuilderException pathBuilderEx = (SunCertPathBuilderException) ex; - AdjacencyList adjList = pathBuilderEx.getAdjacencyList(); - return adjList.toString(); - } - } - } + SunCertPathBuilderException pathBuilderEx = (SunCertPathBuilderException) ex.getCause().getCause().getCause(); + AdjacencyList adjList = pathBuilderEx.getAdjacencyList(); + return adjList.toString(); } catch (Throwable ex_) {