summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArne Schwabe <arne@rfc2549.org>2013-02-02 16:08:52 +0100
committerArne Schwabe <arne@rfc2549.org>2013-02-02 16:08:52 +0100
commitf4b9c3edf8d35c7246853dac72eecd57b248e97f (patch)
treee940fee50b74f5fe378c7ca76b368471b71b5954
parentefcb835eb288c383d30d0c600c3c86decedac630 (diff)
Give the hint of android bug with alphanumeric Keystore Aliases. (closes issue #132)
-rwxr-xr-xres/values/strings.xml1
-rw-r--r--src/de/blinkt/openvpn/OpenVpnManagementThread.java2
-rw-r--r--src/de/blinkt/openvpn/VpnProfile.java6
3 files changed, 8 insertions, 1 deletions
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 1d1a15e5..ff9db139 100755
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -255,4 +255,5 @@
<string name="state_nonetwork">Waiting for usable network</string>
<string name="statusline_bytecount">In: %8$1s %8$2s/s Out: %8$3s %8$4s/s</string>
<string name="notifcation_title_notconnect">Not connected</string>
+ <string name="jelly_keystore_alphanumeric_bug">Some versions of Android 4.1 have problem if the name of the keystore certificate contains non alphanumeric character (like spaces or dashes)</string>
</resources>
diff --git a/src/de/blinkt/openvpn/OpenVpnManagementThread.java b/src/de/blinkt/openvpn/OpenVpnManagementThread.java
index dd3708cf..c67d027d 100644
--- a/src/de/blinkt/openvpn/OpenVpnManagementThread.java
+++ b/src/de/blinkt/openvpn/OpenVpnManagementThread.java
@@ -483,7 +483,7 @@ public class OpenVpnManagementThread implements Runnable {
// The Jelly Bean *evil* Hack
// 4.2 implements the RSA/ECB/PKCS1PADDING in the OpenSSLprovider
- if(Build.VERSION.SDK_INT==16){
+ if(Build.VERSION.SDK_INT==Build.VERSION_CODES.JELLY_BEAN){
processSignJellyBeans(privkey,data);
return;
}
diff --git a/src/de/blinkt/openvpn/VpnProfile.java b/src/de/blinkt/openvpn/VpnProfile.java
index d8b22ae6..74f01a3b 100644
--- a/src/de/blinkt/openvpn/VpnProfile.java
+++ b/src/de/blinkt/openvpn/VpnProfile.java
@@ -25,6 +25,7 @@ import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.pm.ApplicationInfo;
+import android.os.Build;
import android.preference.PreferenceManager;
import android.security.KeyChain;
import android.security.KeyChainException;
@@ -577,6 +578,11 @@ public class VpnProfile implements Serializable{
e.printStackTrace();
} catch (KeyChainException e) {
OpenVPN.logMessage(0,"",context.getString(R.string.keychain_access));
+ if(Build.VERSION.SDK_INT==Build.VERSION_CODES.JELLY_BEAN){
+ if(!mAlias.matches("^[a-zA-Z0-9]$")) {
+ OpenVPN.logError(R.string.jelly_keystore_alphanumeric_bug);
+ }
+ }
}
return false;
}