From 2a9037c749d3395ac65105604ab4936c4af0fc56 Mon Sep 17 00:00:00 2001 From: Arne Schwabe Date: Mon, 20 May 2013 09:55:50 +0200 Subject: Add certificate CN print Need to fix string for email and order --HG-- extra : rebase_source : c3d5858d53d2f8f340b0d4a07434021f194a247a --- src/de/blinkt/openvpn/VpnProfile.java | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) (limited to 'src/de/blinkt/openvpn/VpnProfile.java') diff --git a/src/de/blinkt/openvpn/VpnProfile.java b/src/de/blinkt/openvpn/VpnProfile.java index 9d183897..03fcbc1b 100644 --- a/src/de/blinkt/openvpn/VpnProfile.java +++ b/src/de/blinkt/openvpn/VpnProfile.java @@ -45,6 +45,7 @@ import de.blinkt.openvpn.R; import de.blinkt.openvpn.core.NativeUtils; import de.blinkt.openvpn.core.OpenVPN; import de.blinkt.openvpn.core.OpenVpnService; +import de.blinkt.openvpn.core.X509Utils; public class VpnProfile implements Serializable{ // Note that this class cannot be moved to core where it belongs since @@ -52,7 +53,7 @@ public class VpnProfile implements Serializable{ // The Serializable documentation mentions that class name change are possible // but the how is unclear // - + private static final long serialVersionUID = 7085688938959334563L; public static final int TYPE_CERTIFICATES=0; public static final int TYPE_PKCS12=1; @@ -79,7 +80,7 @@ public class VpnProfile implements Serializable{ public transient String mTransientPW=null; public transient String mTransientPCKS12PW=null; private transient PrivateKey mPrivateKey; - + // variable named wrong and should haven beeen transient // but needs to keep wrong name to guarante loading of old // profiles @@ -590,7 +591,7 @@ public class VpnProfile implements Serializable{ if(nonNull(mCaFilename)) { try { - Certificate cacert = getCacertFromFile(); + Certificate cacert = X509Utils.getCertificateFromFile(mCaFilename); X509Certificate[] newcachain = new X509Certificate[cachain.length+1]; for(int i=0;i