diff --git a/OpenKeychain/build.gradle b/OpenKeychain/build.gradle
index dc4ef74f1..ffc9f758d 100644
--- a/OpenKeychain/build.gradle
+++ b/OpenKeychain/build.gradle
@@ -55,6 +55,7 @@ dependencies {
compile 'com.mikepenz.iconics:meteocons-typeface:1.1.1@aar'
compile 'com.mikepenz.iconics:community-material-typeface:1.0.0@aar'
compile 'com.nispok:snackbar:2.10.8'
+ compile 'com.squareup.okhttp:okhttp:2.4.0'
// libs as submodules
compile project(':extern:openpgp-api-lib:openpgp-api')
diff --git a/OpenKeychain/src/androidTest/java/org/sufficientlysecure/keychain/ui/MiscCryptOperationTests.java b/OpenKeychain/src/androidTest/java/org/sufficientlysecure/keychain/ui/MiscCryptOperationTests.java
index 7b4506986..9b26dfb15 100644
--- a/OpenKeychain/src/androidTest/java/org/sufficientlysecure/keychain/ui/MiscCryptOperationTests.java
+++ b/OpenKeychain/src/androidTest/java/org/sufficientlysecure/keychain/ui/MiscCryptOperationTests.java
@@ -29,8 +29,6 @@ import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.os.Build.VERSION_CODES;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.espresso.action.ViewActions;
import android.support.test.espresso.intent.Intents;
import android.support.test.espresso.intent.rule.IntentsTestRule;
import android.support.test.runner.AndroidJUnit4;
@@ -41,9 +39,9 @@ import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
+import org.sufficientlysecure.keychain.Constants;
import org.sufficientlysecure.keychain.R;
import org.sufficientlysecure.keychain.TestHelpers;
-import org.sufficientlysecure.keychain.compatibility.ClipboardReflection;
import org.sufficientlysecure.keychain.service.PassphraseCacheService;
import org.sufficientlysecure.keychain.ui.util.Notify.Style;
import org.sufficientlysecure.keychain.util.Preferences;
@@ -162,8 +160,9 @@ public class MiscCryptOperationTests {
public void testDecryptNonPgpClipboard() throws Exception {
// decrypt any non-pgp file
- ClipboardReflection.copyToClipboard(mActivity, randomString(0, 50));
-
+ ClipboardManager clipboard = (ClipboardManager) mActivity.getSystemService(Context.CLIPBOARD_SERVICE);
+ ClipData clip = ClipData.newPlainText(Constants.CLIPBOARD_LABEL, randomString(0, 50));
+ clipboard.setPrimaryClip(clip);
onView(withId(R.id.decrypt_from_clipboard)).perform(click());
{ // decrypt
diff --git a/OpenKeychain/src/main/AndroidManifest.xml b/OpenKeychain/src/main/AndroidManifest.xml
index 2dcdb3251..93c75cca6 100644
--- a/OpenKeychain/src/main/AndroidManifest.xml
+++ b/OpenKeychain/src/main/AndroidManifest.xml
@@ -682,6 +682,9 @@
+
+ "Enable Tor"
+ "Requires Orbot to be installed"
+ "Enable other proxy"
+ "Proxy Host"
+ "Proxy host cannot be empty"
+ "Proxy Port"
+ "Invalid port number entered"
+ "Proxy Type"
+
+
+ "HTTP"
+ "SOCKS"
+ "proxyHttp"
+ "proxySocks"
+
+
+ "Don\'t use Tor"
+
+
+ Install Orbot to use Tor?
+ "Install"
+ You must have Orbot installed and activated to proxy traffic through it. Would you like to install it?
+ "Cancel"
+ "Don\'t use Tor"
+
+
+ Start Orbot?
+ "Orbot doesn\'t appear to be running. Would you like to start it up and connect to Tor?"
+ "Start Orbot"
+ "Start Orbot"
+ "Cancel"
+ "Don\'t use Tor"
+
+
"<no name>"
"<none>"
@@ -1069,7 +1105,8 @@
"Integrity check error!"
"Missing integrity check! This can happen because the encrypting application is out of date, or from a downgrade attack."
"No valid OpenPGP encrypted or signed data found!"
- "Encountered IO Exception during operation!"
+ "Encountered an error reading input data!"
+ "Error opening input data stream!"
"No encrypted data found in stream!"
"No encrypted data with known secret key found in stream!"
"Encountered OpenPGP Exception during operation!"
@@ -1163,6 +1200,7 @@
"Key not found!"
"Certificate generation failed!"
"Save operation failed!"
+ "Upload operation failed!"
"Successfully uploaded key to server"
@@ -1192,6 +1230,7 @@
"Exporting all keys"
"Exporting public key %s"
+ "Uploading public key %s"
"Exporting secret key %s"
"No filename specified!"
"Error opening file!"
@@ -1201,7 +1240,9 @@
"Database error!"
"Input/output error!"
"Error preprocessing key data!"
+ "Error uploading key to server! Please check your internet connection"
"Export operation successful"
+ "Upload to keyserver successful"
"Nothing to delete!"
"Secret keys can only be deleted individually!"
@@ -1384,5 +1425,6 @@
"No file deleted! (Already deleted?)"
"Original file could not be deleted!"
"Clipboard is empty!"
+ "Error copying data to clipboard!"
diff --git a/OpenKeychain/src/main/res/xml/preference_headers.xml b/OpenKeychain/src/main/res/xml/preference_headers.xml
index e3447ff48..70e400567 100644
--- a/OpenKeychain/src/main/res/xml/preference_headers.xml
+++ b/OpenKeychain/src/main/res/xml/preference_headers.xml
@@ -5,4 +5,7 @@
+
diff --git a/OpenKeychain/src/main/res/xml/proxy_prefs.xml b/OpenKeychain/src/main/res/xml/proxy_prefs.xml
new file mode 100644
index 000000000..94e101cb6
--- /dev/null
+++ b/OpenKeychain/src/main/res/xml/proxy_prefs.xml
@@ -0,0 +1,34 @@
+
+
+
+
+
+
+
+
diff --git a/OpenKeychain/src/test/java/org/sufficientlysecure/keychain/operations/PromoteKeyOperationTest.java b/OpenKeychain/src/test/java/org/sufficientlysecure/keychain/operations/PromoteKeyOperationTest.java
index 4eaee4c48..a4854d7b9 100644
--- a/OpenKeychain/src/test/java/org/sufficientlysecure/keychain/operations/PromoteKeyOperationTest.java
+++ b/OpenKeychain/src/test/java/org/sufficientlysecure/keychain/operations/PromoteKeyOperationTest.java
@@ -17,21 +17,23 @@
package org.sufficientlysecure.keychain.operations;
+
+import java.io.PrintStream;
+import java.security.Security;
+import java.util.Iterator;
+
import org.junit.Assert;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.runner.RunWith;
-import org.robolectric.Robolectric;
import org.robolectric.RobolectricGradleTestRunner;
-import org.robolectric.RobolectricTestRunner;
import org.robolectric.RuntimeEnvironment;
import org.robolectric.annotation.Config;
import org.robolectric.shadows.ShadowLog;
import org.spongycastle.bcpg.sig.KeyFlags;
import org.spongycastle.jce.provider.BouncyCastleProvider;
import org.spongycastle.util.encoders.Hex;
-import org.sufficientlysecure.keychain.BuildConfig;
import org.sufficientlysecure.keychain.WorkaroundBuildConfig;
import org.sufficientlysecure.keychain.operations.results.PgpEditKeyResult;
import org.sufficientlysecure.keychain.operations.results.PromoteKeyResult;
@@ -43,6 +45,7 @@ import org.sufficientlysecure.keychain.pgp.UncachedKeyRing;
import org.sufficientlysecure.keychain.pgp.UncachedPublicKey;
import org.sufficientlysecure.keychain.provider.CachedPublicKeyRing;
import org.sufficientlysecure.keychain.provider.ProviderHelper;
+import org.sufficientlysecure.keychain.service.PromoteKeyringParcel;
import org.sufficientlysecure.keychain.service.SaveKeyringParcel;
import org.sufficientlysecure.keychain.service.SaveKeyringParcel.Algorithm;
import org.sufficientlysecure.keychain.service.SaveKeyringParcel.ChangeUnlockParcel;
@@ -51,10 +54,6 @@ import org.sufficientlysecure.keychain.util.Passphrase;
import org.sufficientlysecure.keychain.util.ProgressScaler;
import org.sufficientlysecure.keychain.util.TestingUtils;
-import java.io.PrintStream;
-import java.security.Security;
-import java.util.Iterator;
-
@RunWith(RobolectricGradleTestRunner.class)
@Config(constants = WorkaroundBuildConfig.class, sdk = 21, manifest = "src/main/AndroidManifest.xml")
public class PromoteKeyOperationTest {
@@ -110,7 +109,7 @@ public class PromoteKeyOperationTest {
PromoteKeyOperation op = new PromoteKeyOperation(RuntimeEnvironment.application,
new ProviderHelper(RuntimeEnvironment.application), null, null);
- PromoteKeyResult result = op.execute(mStaticRing.getMasterKeyId(), null, null);
+ PromoteKeyResult result = op.execute(new PromoteKeyringParcel(mStaticRing.getMasterKeyId(), null, null), null);
Assert.assertTrue("promotion must succeed", result.success());
@@ -136,7 +135,7 @@ public class PromoteKeyOperationTest {
byte[] aid = Hex.decode("D2760001240102000000012345670000");
- PromoteKeyResult result = op.execute(mStaticRing.getMasterKeyId(), aid, null);
+ PromoteKeyResult result = op.execute(new PromoteKeyringParcel(mStaticRing.getMasterKeyId(), aid, null), null);
Assert.assertTrue("promotion must succeed", result.success());
@@ -164,9 +163,9 @@ public class PromoteKeyOperationTest {
// only promote the first, rest stays dummy
long keyId = KeyringTestingHelper.getSubkeyId(mStaticRing, 1);
- PromoteKeyResult result = op.execute(mStaticRing.getMasterKeyId(), aid, new long[] {
+ PromoteKeyResult result = op.execute(new PromoteKeyringParcel(mStaticRing.getMasterKeyId(), aid, new long[] {
keyId
- });
+ }), null);
Assert.assertTrue("promotion must succeed", result.success());
diff --git a/extern/KeybaseLib b/extern/KeybaseLib
index 9615d90b1..22f44ec0b 160000
--- a/extern/KeybaseLib
+++ b/extern/KeybaseLib
@@ -1 +1 @@
-Subproject commit 9615d90b18d1aee4dad994aa45875adfdcfb3c34
+Subproject commit 22f44ec0bf5d6fba9a41d846b7d188bf900b7b3b