summaryrefslogtreecommitdiff
path: root/src/de/blinkt/openvpn/core/X509Utils.java
diff options
context:
space:
mode:
authorArne Schwabe <arne@rfc2549.org>2013-12-15 16:42:28 +0100
committerArne Schwabe <arne@rfc2549.org>2013-12-15 16:42:28 +0100
commit1e710399e226b4b18ea29e20c32c1aa7d5293dd4 (patch)
tree09788ce775856dfff2315efa4990fc2788b5af9f /src/de/blinkt/openvpn/core/X509Utils.java
parenta51eda3d7de8387316814cadddc1f5fde3c8b3aa (diff)
Always log Exception to log
Diffstat (limited to 'src/de/blinkt/openvpn/core/X509Utils.java')
-rw-r--r--src/de/blinkt/openvpn/core/X509Utils.java13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/de/blinkt/openvpn/core/X509Utils.java b/src/de/blinkt/openvpn/core/X509Utils.java
index f6bd7774..5781cbf5 100644
--- a/src/de/blinkt/openvpn/core/X509Utils.java
+++ b/src/de/blinkt/openvpn/core/X509Utils.java
@@ -79,6 +79,7 @@ public class X509Utils {
String friendlyName=null;
/* Hack so we do not have to ship a whole Spongy/bouncycastle */
+ Exception exp=null;
try {
Class X509NameClass = Class.forName("com.android.org.bouncycastle.asn1.x509.X509Name");
Method getInstance = X509NameClass.getMethod("getInstance",Object.class);
@@ -95,16 +96,18 @@ public class X509Utils {
friendlyName= (String) toString.invoke(subjectName,true,defaultSymbols);
} catch (ClassNotFoundException e) {
- e.printStackTrace();
+ exp =e ;
} catch (NoSuchMethodException e) {
- e.printStackTrace();
+ exp =e;
} catch (InvocationTargetException e) {
- e.printStackTrace();
+ exp =e;
} catch (IllegalAccessException e) {
- e.printStackTrace();
+ exp =e;
} catch (NoSuchFieldException e) {
- e.printStackTrace();
+ exp =e;
}
+ if (exp!=null)
+ VpnStatus.logException("Getting X509 Name from certificate", exp);
/* Fallback if the reflection method did not work */
if(friendlyName==null)