diff options
author | Arne Schwabe <arne@rfc2549.org> | 2012-06-13 23:23:49 +0200 |
---|---|---|
committer | Arne Schwabe <arne@rfc2549.org> | 2012-06-13 23:23:49 +0200 |
commit | 6709f66650ec4cc4a22d7bb4d0e809eab119cbe9 (patch) | |
tree | e67897cf3097900838ba68296b8a9a6be941b593 /src/de/blinkt/openvpn/VpnProfile.java | |
parent | 7dfa673e931656924ce4a85bec84441c46c5a5f5 (diff) |
Correct network state message
Improve logging framework a bit
Add logging of certificates received from Keystore
Diffstat (limited to 'src/de/blinkt/openvpn/VpnProfile.java')
-rw-r--r-- | src/de/blinkt/openvpn/VpnProfile.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/de/blinkt/openvpn/VpnProfile.java b/src/de/blinkt/openvpn/VpnProfile.java index d74701f5..e9cb994a 100644 --- a/src/de/blinkt/openvpn/VpnProfile.java +++ b/src/de/blinkt/openvpn/VpnProfile.java @@ -23,6 +23,7 @@ import android.content.Intent; import android.content.pm.ApplicationInfo; import android.security.KeyChain; import android.security.KeyChainException; +import android.util.Log; public class VpnProfile implements Serializable{ // Parcable @@ -473,7 +474,14 @@ public class VpnProfile implements Serializable{ try { privateKey = KeyChain.getPrivateKey(context,mAlias); cachain = KeyChain.getCertificateChain(context, mAlias); + if(cachain.length <= 1) + OpenVPN.logMessage(0, "", context.getString(R.string.keychain_nocacert)); + + for(X509Certificate cert:cachain) { + OpenVPN.logInfo(R.string.cert_from_keystore,cert.getSubjectDN()); + } + KeyStore ks = KeyStore.getInstance("PKCS12"); ks.load(null, null); ks.setKeyEntry("usercert", privateKey, null, cachain); |