From ab3f20ea5440af12c25e4c672020b78fec1b222b Mon Sep 17 00:00:00 2001 From: Paul Schaub Date: Tue, 7 Sep 2021 17:44:03 +0200 Subject: [PATCH] VerifyCleartextSignatures: Remove deprecated methods --- .../VerifyCleartextSignatures.java | 28 ------------------- .../VerifyCleartextSignaturesImpl.java | 15 ---------- 2 files changed, 43 deletions(-) diff --git a/pgpainless-core/src/main/java/org/pgpainless/signature/cleartext_signatures/VerifyCleartextSignatures.java b/pgpainless-core/src/main/java/org/pgpainless/signature/cleartext_signatures/VerifyCleartextSignatures.java index 43d391dd..3e2b0648 100644 --- a/pgpainless-core/src/main/java/org/pgpainless/signature/cleartext_signatures/VerifyCleartextSignatures.java +++ b/pgpainless-core/src/main/java/org/pgpainless/signature/cleartext_signatures/VerifyCleartextSignatures.java @@ -19,9 +19,6 @@ import java.io.File; import java.io.IOException; import java.io.InputStream; -import org.bouncycastle.openpgp.PGPException; -import org.bouncycastle.openpgp.PGPPublicKeyRing; -import org.bouncycastle.openpgp.PGPPublicKeyRingCollection; import org.pgpainless.decryption_verification.ConsumerOptions; /** @@ -63,30 +60,5 @@ public interface VerifyCleartextSignatures { */ CleartextSignatureProcessor withOptions(ConsumerOptions options) throws IOException; - /** - * Pass in the verification key ring. - * - * @param publicKey verification key - * @return processor - * @throws PGPException if the keys cannot be converted to a {@link PGPPublicKeyRingCollection}. - * @throws IOException if the keys cannot be parsed properly - * - * @deprecated use {@link #withOptions(ConsumerOptions)} instead. - */ - @Deprecated - CleartextSignatureProcessor verifyWith(PGPPublicKeyRing publicKey) throws PGPException, IOException; - - /** - * Pass in the verification key ring collection. - * - * @param publicKeys verification keys - * @return processor - * @throws IOException if the keys cannot be parsed properly - * - * @deprecated use {@link #withOptions(ConsumerOptions)} instead. - */ - @Deprecated - CleartextSignatureProcessor verifyWith(PGPPublicKeyRingCollection publicKeys) throws IOException; - } } diff --git a/pgpainless-core/src/main/java/org/pgpainless/signature/cleartext_signatures/VerifyCleartextSignaturesImpl.java b/pgpainless-core/src/main/java/org/pgpainless/signature/cleartext_signatures/VerifyCleartextSignaturesImpl.java index 73493023..66d83ca9 100644 --- a/pgpainless-core/src/main/java/org/pgpainless/signature/cleartext_signatures/VerifyCleartextSignaturesImpl.java +++ b/pgpainless-core/src/main/java/org/pgpainless/signature/cleartext_signatures/VerifyCleartextSignaturesImpl.java @@ -18,8 +18,6 @@ package org.pgpainless.signature.cleartext_signatures; import java.io.IOException; import java.io.InputStream; -import org.bouncycastle.openpgp.PGPPublicKeyRing; -import org.bouncycastle.openpgp.PGPPublicKeyRingCollection; import org.pgpainless.decryption_verification.ConsumerOptions; public class VerifyCleartextSignaturesImpl implements VerifyCleartextSignatures { @@ -52,18 +50,5 @@ public class VerifyCleartextSignaturesImpl implements VerifyCleartextSignatures return new CleartextSignatureProcessor(inputStream, options, multiPassStrategy); } - @Override - public CleartextSignatureProcessor verifyWith(PGPPublicKeyRing publicKey) throws IOException { - ConsumerOptions options = new ConsumerOptions(); - options.addVerificationCert(publicKey); - return new CleartextSignatureProcessor(inputStream, options, multiPassStrategy); - } - - @Override - public CleartextSignatureProcessor verifyWith(PGPPublicKeyRingCollection publicKeys) throws IOException { - ConsumerOptions options = new ConsumerOptions(); - options.addVerificationCerts(publicKeys); - return new CleartextSignatureProcessor(inputStream, options, multiPassStrategy); - } } }