From 2d0437a834449b4b4069933bad65f63471f9ac3a Mon Sep 17 00:00:00 2001 From: arrase Date: Sun, 4 Dec 2016 22:12:41 +0100 Subject: [PATCH] return auth cookie at intent service --- .../java/org/torproject/android/OrbotMainActivity.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/src/main/java/org/torproject/android/OrbotMainActivity.java b/app/src/main/java/org/torproject/android/OrbotMainActivity.java index 07d01993..caed0c3f 100644 --- a/app/src/main/java/org/torproject/android/OrbotMainActivity.java +++ b/app/src/main/java/org/torproject/android/OrbotMainActivity.java @@ -675,6 +675,13 @@ public class OrbotMainActivity extends AppCompatActivity nResult.putExtra("hs_host", hostname); + if (authCookie) { + nResult.putExtra( + "hs_auth_cookie", + onion.getString(onion.getColumnIndex(HSContentProvider.HiddenService.AUTH_COOKIE_VALUE)) + ); + } + if (backupToPackage != null && backupToPackage.length() > 0) { String servicePath = getFilesDir() + "/" + TorServiceConstants.HIDDEN_SERVICES_DIR + "/hs" + hsPort; File hidden_service_key = new File(servicePath, "private_key");