1
0
Fork 0
mirror of https://github.com/pgpainless/pgpainless.git synced 2024-11-26 14:22:05 +01:00

Rename verifySignatureCreationTimeIsInBounds method

This commit is contained in:
Paul Schaub 2021-08-18 14:50:01 +02:00
parent 3bee3e5916
commit 03efb5e14c
Signed by: vanitasvitae
GPG key ID: 62BEE9264BF17311
4 changed files with 6 additions and 6 deletions

View file

@ -15,7 +15,7 @@
*/
package org.pgpainless.decryption_verification;
import static org.pgpainless.signature.SignatureValidator.verifySignatureCreationTimeIsInBounds;
import static org.pgpainless.signature.SignatureValidator.signatureWasCreatedInBounds;
import java.io.IOException;
import java.io.InputStream;
@ -104,7 +104,7 @@ public class DecryptionStream extends InputStream {
private void maybeVerifyDetachedSignatures() {
for (DetachedSignature s : resultBuilder.getDetachedSignatures()) {
try {
verifySignatureCreationTimeIsInBounds(options.getVerifyNotBefore(), options.getVerifyNotAfter()).verify(s.getSignature());
signatureWasCreatedInBounds(options.getVerifyNotBefore(), options.getVerifyNotAfter()).verify(s.getSignature());
boolean verified = CertificateValidator.validateCertificateAndVerifyInitializedSignature(s.getSignature(), (PGPPublicKeyRing) s.getSigningKeyRing(), PGPainless.getPolicy());
s.setVerified(verified);
} catch (SignatureValidationException e) {

View file

@ -15,7 +15,7 @@
*/
package org.pgpainless.decryption_verification;
import static org.pgpainless.signature.SignatureValidator.verifySignatureCreationTimeIsInBounds;
import static org.pgpainless.signature.SignatureValidator.signatureWasCreatedInBounds;
import java.io.FilterInputStream;
import java.io.IOException;
@ -112,7 +112,7 @@ public class SignatureVerifyingInputStream extends FilterInputStream {
private void verifySignatureOrThrowSignatureException(PGPSignature signature, OnePassSignature onePassSignature)
throws SignatureValidationException {
Policy policy = PGPainless.getPolicy();
verifySignatureCreationTimeIsInBounds(options.getVerifyNotBefore(), options.getVerifyNotAfter()).verify(signature);
signatureWasCreatedInBounds(options.getVerifyNotBefore(), options.getVerifyNotAfter()).verify(signature);
CertificateValidator.validateCertificateAndVerifyOnePassSignature(signature, onePassSignature, policy);
}

View file

@ -619,7 +619,7 @@ public abstract class SignatureValidator {
};
}
public static SignatureValidator verifySignatureCreationTimeIsInBounds(Date notBefore, Date notAfter) {
public static SignatureValidator signatureWasCreatedInBounds(Date notBefore, Date notAfter) {
return new SignatureValidator() {
@Override
public void verify(PGPSignature signature) throws SignatureValidationException {

View file

@ -30,7 +30,7 @@ import org.pgpainless.policy.Policy;
/**
* Collection of static methods for signature verification.
* Signature verification entails validation of certain criteria (see {@link SignatureValidator}, as well as
* Signature verification entails validation of certain criteria (see {@link SignatureValidator}), as well as
* cryptographic verification of signature correctness.
*/
public final class SignatureVerifier {