1
0
Fork 0
mirror of https://github.com/pgpainless/pgpainless.git synced 2024-11-18 02:12:06 +01:00

Add KeyRingInfo constructor that takes Policy instance

This commit is contained in:
Paul Schaub 2022-06-24 12:28:10 +02:00
parent 3f40fb99ef
commit 0c0f82ce2e

View file

@ -86,8 +86,19 @@ public class KeyRingInfo {
* @param validationDate date of validation
*/
public KeyRingInfo(PGPKeyRing keys, Date validationDate) {
this(keys, PGPainless.getPolicy(), validationDate);
}
/**
* Evaluate the key ring at the provided validation date.
*
* @param keys key ring
* @param policy policy
* @param validationDate validation date
*/
public KeyRingInfo(PGPKeyRing keys, Policy policy, Date validationDate) {
this.keys = keys;
this.signatures = new Signatures(keys, validationDate, PGPainless.getPolicy());
this.signatures = new Signatures(keys, validationDate, policy);
this.evaluationDate = validationDate;
this.primaryUserId = findPrimaryUserId();
}