aboutsummaryrefslogtreecommitdiffstats
path: root/OpenPGP-Keychain
diff options
context:
space:
mode:
authorDominik Schürmann <dominik@dominikschuermann.de>2013-10-02 19:08:33 +0200
committerDominik Schürmann <dominik@dominikschuermann.de>2013-10-02 19:08:33 +0200
commit2a0df5b75abc35978abbe669177662b4d66fbf18 (patch)
treed69198bf734255cb2d5229674554ee9d2b0e96bd /OpenPGP-Keychain
parent224faa42ac855776a8494decfcac9d23dbfcec09 (diff)
downloadopen-keychain-2a0df5b75abc35978abbe669177662b4d66fbf18.tar.gz
open-keychain-2a0df5b75abc35978abbe669177662b4d66fbf18.tar.bz2
open-keychain-2a0df5b75abc35978abbe669177662b4d66fbf18.zip
API update
Diffstat (limited to 'OpenPGP-Keychain')
-rw-r--r--OpenPGP-Keychain/src/org/openintents/openpgp/IOpenPgpCallback.aidl3
-rw-r--r--OpenPGP-Keychain/src/org/openintents/openpgp/IOpenPgpService.aidl22
-rw-r--r--OpenPGP-Keychain/src/org/sufficientlysecure/keychain/service/remote/OpenPgpService.java31
3 files changed, 30 insertions, 26 deletions
diff --git a/OpenPGP-Keychain/src/org/openintents/openpgp/IOpenPgpCallback.aidl b/OpenPGP-Keychain/src/org/openintents/openpgp/IOpenPgpCallback.aidl
index 68773afb9..ca00c8ce1 100644
--- a/OpenPGP-Keychain/src/org/openintents/openpgp/IOpenPgpCallback.aidl
+++ b/OpenPGP-Keychain/src/org/openintents/openpgp/IOpenPgpCallback.aidl
@@ -25,7 +25,8 @@ interface IOpenPgpCallback {
* onSuccess returns on successful OpenPGP operations.
*
* @param outputBytes
- * contains resulting output bytes (decrypted content/content without signature)
+ * contains resulting output bytes (decrypted content (when input was encrypted)
+ * or content without signature (when input was signed-only))
* @param signatureResult
* signatureResult is only non-null if decryptAndVerify() was called and the content
* was encrypted or signed-and-encrypted.
diff --git a/OpenPGP-Keychain/src/org/openintents/openpgp/IOpenPgpService.aidl b/OpenPGP-Keychain/src/org/openintents/openpgp/IOpenPgpService.aidl
index 4ddad8e4e..ab7ec8b1a 100644
--- a/OpenPGP-Keychain/src/org/openintents/openpgp/IOpenPgpService.aidl
+++ b/OpenPGP-Keychain/src/org/openintents/openpgp/IOpenPgpService.aidl
@@ -34,14 +34,14 @@ interface IOpenPgpService {
* @param encryptionUserIds
* User Ids (emails) of recipients
* @param asciiArmor
- * Encode for ASCII (Radix-64, 33 percent overhead compared to binary)
+ * Encode result for ASCII (Radix-64, 33 percent overhead compared to binary)
* @param allowUserInteraction
* Allows the OpenPGP Provider to handle missing keys by showing activities
* @param callback
* Callback where to return results
*/
- oneway void encrypt(in byte[] inputBytes, in String[] encryptionUserIds,
- in boolean asciiArmor, in boolean allowUserInteraction, in IOpenPgpCallback callback);
+ oneway void encrypt(in byte[] inputBytes, in String[] encryptionUserIds, in boolean asciiArmor,
+ in IOpenPgpCallback callback);
/**
* Sign
@@ -51,14 +51,13 @@ interface IOpenPgpService {
* @param inputBytes
* Byte array you want to sign
* @param asciiArmor
- * Encode for ASCII (Radix-64, 33 percent overhead compared to binary)
+ * Encode result for ASCII (Radix-64, 33 percent overhead compared to binary)
* @param allowUserInteraction
* Allows the OpenPGP Provider to handle missing keys by showing activities
* @param callback
* Callback where to return results
*/
- oneway void sign(in byte[] inputBytes, in boolean asciiArmor, in boolean allowUserInteraction,
- in IOpenPgpCallback callback);
+ oneway void sign(in byte[] inputBytes, in boolean asciiArmor, in IOpenPgpCallback callback);
/**
* Sign then encrypt
@@ -70,14 +69,14 @@ interface IOpenPgpService {
* @param encryptionUserIds
* User Ids (emails) of recipients
* @param asciiArmor
- * Encode for ASCII (Radix-64, 33 percent overhead compared to binary)
+ * Encode result for ASCII (Radix-64, 33 percent overhead compared to binary)
* @param allowUserInteraction
* Allows the OpenPGP Provider to handle missing keys by showing activities
* @param callback
* Callback where to return results
*/
- oneway void signAndEncrypt(in byte[] inputBytes, in String[] encryptionUserIds,
- in boolean asciiArmor, in boolean allowUserInteraction, in IOpenPgpCallback callback);
+ oneway void signAndEncrypt(in byte[] inputBytes, in String[] encryptionUserIds, in boolean asciiArmor,
+ in IOpenPgpCallback callback);
/**
* Decrypts and verifies given input bytes. This methods handles encrypted-only, signed-and-encrypted,
@@ -93,7 +92,8 @@ interface IOpenPgpService {
* @param callback
* Callback where to return results
*/
- oneway void decryptAndVerify(in byte[] inputBytes, in boolean allowUserInteraction,
- in IOpenPgpCallback callback);
+ oneway void decryptAndVerify(in byte[] inputBytes, in IOpenPgpCallback callback);
+
+ boolean isKeyAvailable(in String[] userIds);
} \ No newline at end of file
diff --git a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/service/remote/OpenPgpService.java b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/service/remote/OpenPgpService.java
index 01d7ac252..50e49a2ab 100644
--- a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/service/remote/OpenPgpService.java
+++ b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/service/remote/OpenPgpService.java
@@ -456,15 +456,14 @@ public class OpenPgpService extends RemoteService {
@Override
public void encrypt(final byte[] inputBytes, final String[] encryptionUserIds,
- final boolean asciiArmor, final boolean allowUserInteraction,
- final IOpenPgpCallback callback) throws RemoteException {
+ final boolean asciiArmor, final IOpenPgpCallback callback) throws RemoteException {
final AppSettings settings = getAppSettings();
Runnable r = new Runnable() {
@Override
public void run() {
- encryptAndSignSafe(inputBytes, encryptionUserIds, asciiArmor,
- allowUserInteraction, callback, settings, false);
+ encryptAndSignSafe(inputBytes, encryptionUserIds, asciiArmor, true, callback,
+ settings, false);
}
};
@@ -473,15 +472,14 @@ public class OpenPgpService extends RemoteService {
@Override
public void signAndEncrypt(final byte[] inputBytes, final String[] encryptionUserIds,
- final boolean asciiArmor, final boolean allowUserInteraction,
- final IOpenPgpCallback callback) throws RemoteException {
+ final boolean asciiArmor, final IOpenPgpCallback callback) throws RemoteException {
final AppSettings settings = getAppSettings();
Runnable r = new Runnable() {
@Override
public void run() {
- encryptAndSignSafe(inputBytes, encryptionUserIds, asciiArmor,
- allowUserInteraction, callback, settings, true);
+ encryptAndSignSafe(inputBytes, encryptionUserIds, asciiArmor, true, callback,
+ settings, true);
}
};
@@ -490,14 +488,13 @@ public class OpenPgpService extends RemoteService {
@Override
public void sign(final byte[] inputBytes, boolean asciiArmor,
- final boolean allowUserInteraction, final IOpenPgpCallback callback)
- throws RemoteException {
+ final IOpenPgpCallback callback) throws RemoteException {
final AppSettings settings = getAppSettings();
Runnable r = new Runnable() {
@Override
public void run() {
- signSafe(inputBytes, allowUserInteraction, callback, settings);
+ signSafe(inputBytes, true, callback, settings);
}
};
@@ -505,21 +502,27 @@ public class OpenPgpService extends RemoteService {
}
@Override
- public void decryptAndVerify(final byte[] inputBytes, final boolean allowUserInteraction,
- final IOpenPgpCallback callback) throws RemoteException {
+ public void decryptAndVerify(final byte[] inputBytes, final IOpenPgpCallback callback)
+ throws RemoteException {
final AppSettings settings = getAppSettings();
Runnable r = new Runnable() {
@Override
public void run() {
- decryptAndVerifySafe(inputBytes, allowUserInteraction, callback, settings);
+ decryptAndVerifySafe(inputBytes, true, callback, settings);
}
};
checkAndEnqueue(r);
}
+ @Override
+ public boolean isKeyAvailable(String[] userIds) throws RemoteException {
+ // TODO
+ return false;
+ }
+
};
@Override