diff options
author | Dominik Schürmann <dominik@dominikschuermann.de> | 2013-09-14 02:08:06 +0200 |
---|---|---|
committer | Dominik Schürmann <dominik@dominikschuermann.de> | 2013-09-14 02:08:06 +0200 |
commit | bf7fb08bca2abe85c9ed16592b1dc20fc51772eb (patch) | |
tree | f79fe4c3d01d71aa6a779642f367e80cce84413f /OpenPGP-Keychain/src/org/sufficientlysecure | |
parent | a4ae97628434b5b2e86e09b2718fda9559ea9c7f (diff) | |
download | open-keychain-bf7fb08bca2abe85c9ed16592b1dc20fc51772eb.tar.gz open-keychain-bf7fb08bca2abe85c9ed16592b1dc20fc51772eb.tar.bz2 open-keychain-bf7fb08bca2abe85c9ed16592b1dc20fc51772eb.zip |
API update
Diffstat (limited to 'OpenPGP-Keychain/src/org/sufficientlysecure')
-rw-r--r-- | OpenPGP-Keychain/src/org/sufficientlysecure/keychain/openpgp_api/OpenPgpService.java | 29 |
1 files changed, 18 insertions, 11 deletions
diff --git a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/openpgp_api/OpenPgpService.java b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/openpgp_api/OpenPgpService.java index beefa56b4..0a4847e81 100644 --- a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/openpgp_api/OpenPgpService.java +++ b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/openpgp_api/OpenPgpService.java @@ -461,19 +461,26 @@ public class OpenPgpService extends Service { // get signature informations from bundle boolean signature = outputBundle.getBoolean(KeychainIntentService.RESULT_SIGNATURE); - long signatureKeyId = outputBundle - .getLong(KeychainIntentService.RESULT_SIGNATURE_KEY_ID); - String signatureUserId = outputBundle - .getString(KeychainIntentService.RESULT_SIGNATURE_USER_ID); - boolean signatureSuccess = outputBundle - .getBoolean(KeychainIntentService.RESULT_SIGNATURE_SUCCESS); - boolean signatureUnknown = outputBundle - .getBoolean(KeychainIntentService.RESULT_SIGNATURE_UNKNOWN); OpenPgpSignatureResult sigResult = null; if (signature) { - sigResult = new OpenPgpSignatureResult(signatureUserId, signatureSuccess, - signatureUnknown); + long signatureKeyId = outputBundle + .getLong(KeychainIntentService.RESULT_SIGNATURE_KEY_ID); + String signatureUserId = outputBundle + .getString(KeychainIntentService.RESULT_SIGNATURE_USER_ID); + boolean signatureSuccess = outputBundle + .getBoolean(KeychainIntentService.RESULT_SIGNATURE_SUCCESS); + boolean signatureUnknown = outputBundle + .getBoolean(KeychainIntentService.RESULT_SIGNATURE_UNKNOWN); + + int signatureStatus = OpenPgpSignatureResult.SIGNATURE_ERROR; + if (signatureSuccess) { + signatureStatus = OpenPgpSignatureResult.SIGNATURE_SUCCESS; + } else if (signatureUnknown) { + signatureStatus = OpenPgpSignatureResult.SIGNATURE_UNKNOWN; + } + + sigResult = new OpenPgpSignatureResult(signatureStatus, signatureUserId, signedOnly); } // return over handler on client side @@ -514,7 +521,7 @@ public class OpenPgpService extends Service { } @Override - public void encryptAndSign(final byte[] inputBytes, final String[] encryptionUserIds, + public void signAndEncrypt(final byte[] inputBytes, final String[] encryptionUserIds, final boolean asciiArmor, final IOpenPgpCallback callback) throws RemoteException { final AppSettings settings = getAppSettings(); |