Remove queries from PgpKeyHelper, introduce encrypt to signer mode (not tested)

This commit is contained in:
Dominik Schürmann
2014-04-11 17:14:37 +02:00
parent a9281b129c
commit bbd97cf800
8 changed files with 66 additions and 66 deletions

View File

@@ -169,7 +169,7 @@ public class OpenPgpService extends RemoteService {
builder.enableAsciiArmorOutput(asciiArmor)
.signatureHashAlgorithm(accSettings.getHashAlgorithm())
.signatureForceV3(false)
.signatureKeyId(accSettings.getKeyId())
.signatureMasterKeyId(accSettings.getKeyId())
.signaturePassphrase(passphrase);
builder.build().execute();
} finally {
@@ -235,7 +235,7 @@ public class OpenPgpService extends RemoteService {
builder.enableAsciiArmorOutput(asciiArmor)
.compressionId(accSettings.getCompression())
.symmetricEncryptionAlgorithm(accSettings.getEncryptionAlgorithm())
.encryptionKeyIds(keyIds);
.encryptionMasterKeyIds(keyIds);
if (sign) {
String passphrase;
@@ -254,11 +254,11 @@ public class OpenPgpService extends RemoteService {
// sign and encrypt
builder.signatureHashAlgorithm(accSettings.getHashAlgorithm())
.signatureForceV3(false)
.signatureKeyId(accSettings.getKeyId())
.signatureMasterKeyId(accSettings.getKeyId())
.signaturePassphrase(passphrase);
} else {
// encrypt only
builder.signatureKeyId(Id.key.none);
builder.signatureMasterKeyId(Id.key.none);
}
// execute PGP operation!
builder.build().execute();