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 | 0f4891bf42455d634e9b013e4bf09672ac1586d2 (patch) | |
tree | 17128ab6f693202652979190e05ab8af096a518b /src/de/blinkt/openvpn/VpnProfile.java | |
parent | 701534f7cf7f9d39917841190f46b0c8aa93fcd4 (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); |