diff options
author | Arne Schwabe <arne@rfc2549.org> | 2012-07-02 17:29:08 +0200 |
---|---|---|
committer | Arne Schwabe <arne@rfc2549.org> | 2012-07-02 17:29:08 +0200 |
commit | a142f5a6ebeeaa6b4f8e8ac559b3ea08d0677bf1 (patch) | |
tree | a36907b4ff206527720d4a414a021e4f5211461f | |
parent | 6a4ba5d3976f6d219400a46c634dd479bc5981a5 (diff) | |
parent | 6ae2a24edf3255f998ffee8cd6d79e25557f5572 (diff) |
Merge
-rw-r--r-- | AndroidManifest.xml | 7 | ||||
-rw-r--r-- | openvpn/src/openvpn/options.c | 2 | ||||
-rw-r--r-- | res/values-de/strings.xml | 15 | ||||
-rw-r--r-- | res/values/strings.xml | 4 | ||||
-rw-r--r-- | src/de/blinkt/openvpn/OpenVpnManagementThread.java | 8 | ||||
-rw-r--r-- | src/de/blinkt/openvpn/VpnProfile.java | 9 |
6 files changed, 30 insertions, 15 deletions
diff --git a/AndroidManifest.xml b/AndroidManifest.xml index 3a2b458..e601f11 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -17,8 +17,8 @@ <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="de.blinkt.openvpn" - android:versionCode="31" - android:versionName="0.5.9" > + android:versionCode="33" + android:versionName="0.5.9b" > <uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> @@ -53,6 +53,7 @@ </intent-filter> </service> + <activity android:name=".ConfigConverter" android:label="Convert Config File" > @@ -92,7 +93,7 @@ android:pathPattern=".*\\.ovpn" android:scheme="file" /> </intent-filter> - </activity> + </activity> <activity android:name=".LaunchVPN" android:label="@string/vpn_launch_title" > diff --git a/openvpn/src/openvpn/options.c b/openvpn/src/openvpn/options.c index b83c1de..b3a41d7 100644 --- a/openvpn/src/openvpn/options.c +++ b/openvpn/src/openvpn/options.c @@ -2732,7 +2732,7 @@ options_postprocess_filechecks (struct options *options) "--extra-certs"); #ifdef MANAGMENT_EXTERNAL_KEY - if(!(options->management_flags | MF_EXTERNAL_KEY)) + if(!(options->management_flags & MF_EXTERNAL_KEY)) #endif errs |= check_file_access (CHKACC_FILE|CHKACC_INLINE, options->priv_key_file, R_OK, "--key"); diff --git a/res/values-de/strings.xml b/res/values-de/strings.xml index aebfe35..f0be67e 100644 --- a/res/values-de/strings.xml +++ b/res/values-de/strings.xml @@ -146,9 +146,7 @@ <string name="copied_entry">Log Eintrag in die Zwischenablage kopiert</string> <string name="tap_mode">Tap Mode</string> <string name="faq_tap_mode">Die VPN API von Android, die ohne rooten des Telefons funktioniert, unterstützt nur den tun modus. Das Unterstützen des Tap Modus ist daher nicht möglich.</string> - <string name="tap_faq2">Again? Are you kidding? No tap mode is really not supported and sending more mail aksing if it will be supported will not help.</string> - <string name="tap_faq3">A third time? Actually one could write a a tap emulator based on tun that would add layer2 information on send and strip layer2 information on receive. But this tap emulator would have to implement also ARP and possible a DHCP client. I am not aware of anybody doing any work in this direction. Contact me if you want to start coding on this.</string> - <string name="faq">FAQ</string> + <string name="faq">FAQ</string> <string name="faq_summary">häufig gestellte Fragen und Hinweise</string> <string name="copying_log_entries">Kopieren von Log Einträgen</string> <string name="faq_copying">To copy a single log entry press and and hold on the log entry. To copy/send the whole log use the Send Log option. Use the hardware menu button if not visible in the gui.</string> @@ -175,5 +173,12 @@ <string name="keychain_nocacert">Beim Abfragen des Android KeyStore wurde kein CA Zertifikat zurückgegeben. Überprüfen des Serverzertifikat wird warscheinlich fehlschlagen. Geben Sie manuell ein CA Zertifikat an.</string> <string name="cert_from_keystore">Zertifikat (KeyStore): \'%s\' </string> <string name="extracahint">Das CA Zertifikat wird meist aus dem Zertifikatsspeicher automatisch ausgewählt. Sollte dies nicht funktionieren und Sie Verifizierungsprobleme erhalten(self signed certificate), wählen Sie manuell ein Zertifikat aus.</string> - -</resources>
\ No newline at end of file + <string name="show_log_summary">Zeigt das Status Log, wenn ein VPN verbunden wird. Das Status log kann immer über die Benachrichtigung aufgerufen werden.</string> + <string name="show_log_window">Zeige Log</string> + <string name="keppstatus_summary">Zeige die OpenVPN Benachrichtung nach Verbinden zusätzlich zu der System Benachrichtigung an um Traffic Statistiken anzuzeigen.</string> + <string name="keepstatus">Traffic Statistiken</string> + <string name="mobile_info">Modell %1$s (%2$s) %3$s, Android API %4$d</string> + <string name="error_rsa_sign">Fehler beim Zugriff auf den Android Keystore %1$s: %2$s</string> +</resources> +<!-- LocalWords: OpenVPN +--> diff --git a/res/values/strings.xml b/res/values/strings.xml index ba4f6b0..59b8904 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -33,7 +33,6 @@ <string name="client_key_title">Client Certificate Key</string> <string name="client_pkcs12_title">PKCS12 File</string> <string name="ca_title">CA Certificate</string> - <string name="select_certificate">Select</string> <string name="no_certificate">Nothing selected</string> <string name="opevpn_copyright" translatable="false">Copyright © 2002–2010 OpenVPN Technologies, Inc. <sales@openvpn.net>\n @@ -220,6 +219,7 @@ <string name="keppstatus_summary">Keep the notification displayed after the connection is established to show traffic statistics.</string> <string name="keepstatus">Show Traffic Statistics</string> <string name="mobile_info">Running on %1$s (%2$s) %3$s, Android API %4$d</string> - <string name="error_rsa_sign">Error signing with Android keystore key %s</string> + <string name="error_rsa_sign">Error signing with Android keystore key %1$s: %2$s</string> + <string name="keychain_jellybeans">Reading from Android Keystore does not work in Jelly Beans (Google change the way private keys are returned)</string> </resources> diff --git a/src/de/blinkt/openvpn/OpenVpnManagementThread.java b/src/de/blinkt/openvpn/OpenVpnManagementThread.java index e1b3734..69129eb 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 8b758b3..54eaae8 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) |