mirror of
https://github.com/pgpainless/pgpainless.git
synced 2024-11-26 22:32:07 +01:00
Remove unused class and move detached sig initialization in own method
This commit is contained in:
parent
e3ff1403a3
commit
200e00990b
2 changed files with 5 additions and 11 deletions
|
@ -24,6 +24,7 @@ import java.util.HashMap;
|
|||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import org.bouncycastle.bcpg.ArmoredInputStream;
|
||||
|
@ -88,8 +89,11 @@ public final class DecryptionStreamFactory {
|
|||
|
||||
public DecryptionStreamFactory(ConsumerOptions options) {
|
||||
this.options = options;
|
||||
initializeDetachedSignatures(options.getDetachedSignatures());
|
||||
}
|
||||
|
||||
for (PGPSignature signature : options.getDetachedSignatures()) {
|
||||
private void initializeDetachedSignatures(Set<PGPSignature> signatures) {
|
||||
for (PGPSignature signature : signatures) {
|
||||
long issuerKeyId = SignatureUtils.determineIssuerKeyId(signature);
|
||||
PGPPublicKeyRing signingKeyRing = findSignatureVerificationKeyRing(issuerKeyId);
|
||||
if (signingKeyRing == null) {
|
||||
|
|
|
@ -146,16 +146,6 @@ public class OpenPgpMetadata {
|
|||
return false;
|
||||
}
|
||||
|
||||
public static class Signature {
|
||||
protected final PGPSignature signature;
|
||||
protected final OpenPgpV4Fingerprint fingerprint;
|
||||
|
||||
public Signature(PGPSignature signature, OpenPgpV4Fingerprint fingerprint) {
|
||||
this.signature = signature;
|
||||
this.fingerprint = fingerprint;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the name of the encrypted / signed file.
|
||||
*
|
||||
|
|
Loading…
Reference in a new issue