aboutsummaryrefslogtreecommitdiffstats
path: root/OpenPGP-Keychain
diff options
context:
space:
mode:
authorDominik Schürmann <dominik@dominikschuermann.de>2014-02-24 01:24:46 +0100
committerDominik Schürmann <dominik@dominikschuermann.de>2014-02-24 01:24:46 +0100
commitc7c45a80fa15651864d349b351d3ff0407c24b2e (patch)
treee4b7e4f81a804ebee59c9a9eb332e793541b9d45 /OpenPGP-Keychain
parent16284f0cfd382185ffb00b8c979e775f49aeb921 (diff)
downloadopen-keychain-c7c45a80fa15651864d349b351d3ff0407c24b2e.tar.gz
open-keychain-c7c45a80fa15651864d349b351d3ff0407c24b2e.tar.bz2
open-keychain-c7c45a80fa15651864d349b351d3ff0407c24b2e.zip
fix signature passing and verify in demo
Diffstat (limited to 'OpenPGP-Keychain')
-rw-r--r--OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/service/remote/OpenPgpService.java11
1 files changed, 6 insertions, 5 deletions
diff --git a/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/service/remote/OpenPgpService.java b/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/service/remote/OpenPgpService.java
index 34213bd3b..11b3b2f87 100644
--- a/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/service/remote/OpenPgpService.java
+++ b/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/service/remote/OpenPgpService.java
@@ -281,7 +281,8 @@ public class OpenPgpService extends RemoteService {
// Get Input- and OutputStream from ParcelFileDescriptor
InputStream is = new ParcelFileDescriptor.AutoCloseInputStream(input);
OutputStream os = new ParcelFileDescriptor.AutoCloseOutputStream(output);
- OpenPgpSignatureResult sigResult = null;
+
+ Bundle result = new Bundle();
try {
// PGPUtil.getDecoderStream(is)
@@ -403,9 +404,10 @@ public class OpenPgpService extends RemoteService {
// byte[] outputBytes = ((ByteArrayOutputStream) outputStream).toByteArray();
+
+
// get signature informations from bundle
boolean signature = outputBundle.getBoolean(KeychainIntentService.RESULT_SIGNATURE, false);
-
if (signature) {
long signatureKeyId = outputBundle
.getLong(KeychainIntentService.RESULT_SIGNATURE_KEY_ID, 0);
@@ -425,17 +427,16 @@ public class OpenPgpService extends RemoteService {
signatureStatus = OpenPgpSignatureResult.SIGNATURE_UNKNOWN_PUB_KEY;
}
- sigResult = new OpenPgpSignatureResult(signatureStatus, signatureUserId,
+ OpenPgpSignatureResult sigResult = new OpenPgpSignatureResult(signatureStatus, signatureUserId,
signatureOnly, signatureKeyId);
+ result.putParcelable(OpenPgpConstants.RESULT_SIGNATURE, sigResult);
}
} finally {
is.close();
os.close();
}
- Bundle result = new Bundle();
result.putInt(OpenPgpConstants.RESULT_CODE, OpenPgpConstants.RESULT_CODE_SUCCESS);
- result.putParcelable(OpenPgpConstants.RESULT_SIGNATURE, sigResult);
return result;
} catch (Exception e) {
Bundle result = new Bundle();