diff options
author | Arne Schwabe <arne@rfc2549.org> | 2012-06-30 11:38:31 +0200 |
---|---|---|
committer | Arne Schwabe <arne@rfc2549.org> | 2012-06-30 11:38:31 +0200 |
commit | 9d79dda64fee6aee55bcd119773630fce194dd05 (patch) | |
tree | 540c0ec306dd2c0a1bdfd84252d23497a38224bb /src/de | |
parent | 73d3b9c032eae2074726cd3668546af1c44a8323 (diff) |
Relase version 0.5.9
Diffstat (limited to 'src/de')
-rw-r--r-- | src/de/blinkt/openvpn/OpenVpnManagementThread.java | 8 | ||||
-rw-r--r-- | src/de/blinkt/openvpn/VpnProfile.java | 9 |
2 files changed, 13 insertions, 4 deletions
diff --git a/src/de/blinkt/openvpn/OpenVpnManagementThread.java b/src/de/blinkt/openvpn/OpenVpnManagementThread.java index e1b37342..69129eb1 100644 --- a/src/de/blinkt/openvpn/OpenVpnManagementThread.java +++ b/src/de/blinkt/openvpn/OpenVpnManagementThread.java @@ -403,9 +403,12 @@ public class OpenVpnManagementThread implements Runnable { private void processSignCommand(String b64data) {
PrivateKey privkey = mProfile.getKeystoreKey();
Exception err =null;
+
try{
byte[] data = Base64.decode(b64data, Base64.DEFAULT);
- Cipher rsasinger = javax.crypto.Cipher.getInstance("RSA/ECB/PKCS1PADDING");
+
+ Cipher rsasinger = Cipher.getInstance("RSA/ECB/PKCS1PADDING");
+
rsasinger.init(Cipher.ENCRYPT_MODE, privkey);
byte[] signed_bytes = rsasinger.doFinal(data);
@@ -425,8 +428,9 @@ public class OpenVpnManagementThread implements Runnable { err =e;
}
if(err !=null) {
- OpenVPN.logError(R.string.error_rsa_sign,err.getLocalizedMessage());
+ OpenVPN.logError(R.string.error_rsa_sign,err.getClass().toString(),err.getLocalizedMessage());
}
+
}
}
diff --git a/src/de/blinkt/openvpn/VpnProfile.java b/src/de/blinkt/openvpn/VpnProfile.java index 8b758b3b..54eaae88 100644 --- a/src/de/blinkt/openvpn/VpnProfile.java +++ b/src/de/blinkt/openvpn/VpnProfile.java @@ -24,6 +24,7 @@ import org.spongycastle.util.io.pem.PemWriter; import android.content.Context; import android.content.Intent; import android.content.pm.ApplicationInfo; +import android.os.Build; import android.security.KeyChain; import android.security.KeyChainException; @@ -551,8 +552,12 @@ public class VpnProfile implements Serializable{ //! Return an error if somethign is wrong int checkProfile() { - if((mAuthenticationType==TYPE_KEYSTORE || mAuthenticationType==TYPE_USERPASS_KEYSTORE) && mAlias==null) - return R.string.no_keystore_cert_selected; + if(mAuthenticationType==TYPE_KEYSTORE || mAuthenticationType==TYPE_USERPASS_KEYSTORE) { + if(mAlias==null) + return R.string.no_keystore_cert_selected; + if(Build.VERSION.SDK_INT == 16) + return R.string.keychain_jellybeans; + } if(!mUsePull) { if(mIPv4Address == null || cidrToIPAndNetmask(mIPv4Address) == null) |