1
0
Fork 0
mirror of https://github.com/pgpainless/pgpainless.git synced 2024-12-23 03:17:58 +01:00

Use *Options.get() factory methods in SOP module

This commit is contained in:
Paul Schaub 2022-08-29 13:22:44 +02:00
parent 4efe8fb468
commit a2bfb55d87
Signed by: vanitasvitae
GPG key ID: 62BEE9264BF17311
6 changed files with 6 additions and 6 deletions

View file

@ -35,7 +35,7 @@ import sop.operation.Decrypt;
public class DecryptImpl implements Decrypt {
private final ConsumerOptions consumerOptions = new ConsumerOptions();
private final ConsumerOptions consumerOptions = ConsumerOptions.get();
private final MatchMakingSecretKeyRingProtector protector = new MatchMakingSecretKeyRingProtector();
@Override

View file

@ -39,7 +39,7 @@ public class DetachedSignImpl implements DetachedSign {
private boolean armor = true;
private SignAs mode = SignAs.Binary;
private final SigningOptions signingOptions = new SigningOptions();
private final SigningOptions signingOptions = SigningOptions.get();
private final MatchMakingSecretKeyRingProtector protector = new MatchMakingSecretKeyRingProtector();
@Override

View file

@ -24,7 +24,7 @@ import sop.operation.DetachedVerify;
public class DetachedVerifyImpl implements DetachedVerify {
private final ConsumerOptions options = new ConsumerOptions();
private final ConsumerOptions options = ConsumerOptions.get();
@Override
public DetachedVerify notBefore(Date timestamp) throws SOPGPException.UnsupportedOption {

View file

@ -36,7 +36,7 @@ import sop.util.ProxyOutputStream;
public class EncryptImpl implements Encrypt {
EncryptionOptions encryptionOptions = new EncryptionOptions();
EncryptionOptions encryptionOptions = EncryptionOptions.get();
SigningOptions signingOptions = null;
MatchMakingSecretKeyRingProtector protector = new MatchMakingSecretKeyRingProtector();
private final Set<PGPSecretKeyRing> signingKeys = new HashSet<>();

View file

@ -80,7 +80,7 @@ public class InlineSignImpl implements InlineSign {
for (PGPSecretKeyRing key : signingKeys) {
try {
if (mode == InlineSignAs.CleartextSigned) {
signingOptions.addDetachedSignature(protector, key, DocumentSignatureType.BINARY_DOCUMENT);
signingOptions.addDetachedSignature(protector, key);
} else {
signingOptions.addInlineSignature(protector, key, modeToSigType(mode));
}

View file

@ -26,7 +26,7 @@ import sop.operation.InlineVerify;
public class InlineVerifyImpl implements InlineVerify {
private final ConsumerOptions options = new ConsumerOptions();
private final ConsumerOptions options = ConsumerOptions.get();
@Override
public InlineVerify notBefore(Date timestamp) throws SOPGPException.UnsupportedOption {