mirror of
https://github.com/pgpainless/pgpainless.git
synced 2024-12-27 13:28:00 +01:00
Rename verifySignatureCreationTimeIsInBounds method
This commit is contained in:
parent
3bee3e5916
commit
03efb5e14c
4 changed files with 6 additions and 6 deletions
|
@ -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) {
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue