mirror of
https://github.com/pgpainless/pgpainless.git
synced 2024-11-18 02:12:06 +01:00
Use *Options.get() factory methods in SOP module
This commit is contained in:
parent
4efe8fb468
commit
a2bfb55d87
6 changed files with 6 additions and 6 deletions
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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 {
|
||||||
|
|
|
@ -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<>();
|
||||||
|
|
|
@ -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));
|
||||||
}
|
}
|
||||||
|
|
|
@ -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 {
|
||||||
|
|
Loading…
Reference in a new issue