1
0
Fork 0
mirror of https://github.com/pgpainless/pgpainless.git synced 2024-11-17 18:02:05 +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 { public class DecryptImpl implements Decrypt {
private final ConsumerOptions consumerOptions = new ConsumerOptions(); private final ConsumerOptions consumerOptions = ConsumerOptions.get();
private final MatchMakingSecretKeyRingProtector protector = new MatchMakingSecretKeyRingProtector(); private final MatchMakingSecretKeyRingProtector protector = new MatchMakingSecretKeyRingProtector();
@Override @Override

View file

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

View file

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

View file

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

View file

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

View file

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