1
0
Fork 0
mirror of https://github.com/pgpainless/pgpainless.git synced 2024-06-13 07:04:51 +02:00

VerifyCleartextSignatures: Remove deprecated methods

This commit is contained in:
Paul Schaub 2021-09-07 17:44:03 +02:00
parent 1a0635c71e
commit ab3f20ea54
Signed by: vanitasvitae
GPG key ID: 62BEE9264BF17311
2 changed files with 0 additions and 43 deletions

View file

@ -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;
}
}

View file

@ -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);
}
}
}