make getSignId a secret key operation, and respect unavailable keys
This one should remedy #811, but waiting for a test
This commit is contained in:
@@ -293,7 +293,7 @@ public class OpenPgpService extends RemoteService {
|
||||
// Find the appropriate subkey to sign with
|
||||
CachedPublicKeyRing signingRing =
|
||||
new ProviderHelper(this).getCachedPublicKeyRing(accSettings.getKeyId());
|
||||
final long sigSubKeyId = signingRing.getSignId();
|
||||
final long sigSubKeyId = signingRing.getSecretSignId();
|
||||
|
||||
// sign-only
|
||||
PgpSignEncrypt.Builder builder = new PgpSignEncrypt.Builder(
|
||||
@@ -405,7 +405,7 @@ public class OpenPgpService extends RemoteService {
|
||||
// Find the appropriate subkey to sign with
|
||||
CachedPublicKeyRing signingRing =
|
||||
new ProviderHelper(this).getCachedPublicKeyRing(accSettings.getKeyId());
|
||||
final long sigSubKeyId = signingRing.getSignId();
|
||||
final long sigSubKeyId = signingRing.getSecretSignId();
|
||||
|
||||
String passphrase;
|
||||
if (data.hasExtra(OpenPgpApi.EXTRA_PASSPHRASE)) {
|
||||
|
||||
Reference in New Issue
Block a user