summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArne Schwabe <arne@rfc2549.org>2022-01-09 19:00:18 +0100
committerArne Schwabe <arne@rfc2549.org>2022-01-09 19:00:18 +0100
commit4b00e839c0fcbd6bd7eb21ec34f4e7a0aed1232c (patch)
treee00e1d4e7e8e67e37f0c210de39bc650d17409b4
parent964de806fa43452a26f3da37697792532c41d0a6 (diff)
Ignore "no such method" (closes #1265)
-rw-r--r--main/src/main/java/de/blinkt/openvpn/core/X509Utils.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/main/src/main/java/de/blinkt/openvpn/core/X509Utils.java b/main/src/main/java/de/blinkt/openvpn/core/X509Utils.java
index 4c8a226b..21a7f1ae 100644
--- a/main/src/main/java/de/blinkt/openvpn/core/X509Utils.java
+++ b/main/src/main/java/de/blinkt/openvpn/core/X509Utils.java
@@ -151,14 +151,16 @@ public class X509Utils {
} catch (NoSuchMethodException e) {
exp =e;
} catch (InvocationTargetException e) {
- exp =e;
+ /* Ignore this. Modern Android versions do not expose this */
+ exp = null;
} catch (IllegalAccessException e) {
exp =e;
} catch (NoSuchFieldException e) {
exp =e;
}
- if (exp!=null)
+ if (exp!=null) {
VpnStatus.logException("Getting X509 Name from certificate", exp);
+ }
/* Fallback if the reflection method did not work */
if(friendlyName==null)