1
0
Fork 0
mirror of https://github.com/pgpainless/pgpainless.git synced 2024-12-23 03:17:58 +01:00

Rename CertificateAuthority methods

This commit is contained in:
Paul Schaub 2023-07-21 17:11:56 +02:00
parent c26ddc116e
commit 44690d063c
Signed by: vanitasvitae
GPG key ID: 62BEE9264BF17311
2 changed files with 13 additions and 13 deletions

View file

@ -33,11 +33,11 @@ public interface CertificateAuthority {
* 60 = partially authenticated...)
* @return information about the authenticity of the binding
*/
CertificateAuthenticity authenticate(@Nonnull OpenPgpFingerprint fingerprint,
@Nonnull String userId,
boolean email,
@Nonnull Date referenceTime,
int targetAmount);
CertificateAuthenticity authenticateBinding(@Nonnull OpenPgpFingerprint fingerprint,
@Nonnull String userId,
boolean email,
@Nonnull Date referenceTime,
int targetAmount);
/**
* Lookup certificates, which carry a trustworthy binding to the given userId.
@ -50,10 +50,10 @@ public interface CertificateAuthority {
* 60 = partially authenticated...)
* @return list of identified bindings
*/
List<CertificateAuthenticity> lookup(@Nonnull String userId,
boolean email,
@Nonnull Date referenceTime,
int targetAmount);
List<CertificateAuthenticity> lookupByUserId(@Nonnull String userId,
boolean email,
@Nonnull Date referenceTime,
int targetAmount);
/**
* Identify trustworthy bindings for a certificate.
@ -65,7 +65,7 @@ public interface CertificateAuthority {
* 60 = partially authenticated...)
* @return list of identified bindings
*/
List<CertificateAuthenticity> identify(@Nonnull OpenPgpFingerprint fingerprint,
@Nonnull Date referenceTime,
int targetAmount);
List<CertificateAuthenticity> identifyByFingerprint(@Nonnull OpenPgpFingerprint fingerprint,
@Nonnull Date referenceTime,
int targetAmount);
}

View file

@ -127,7 +127,7 @@ public class EncryptionOptions {
* @return encryption options
*/
public EncryptionOptions addAuthenticatableRecipients(String userId, boolean email, CertificateAuthority authority, int targetAmount) {
List<CertificateAuthenticity> identifiedCertificates = authority.lookup(userId, email, new Date(), targetAmount);
List<CertificateAuthenticity> identifiedCertificates = authority.lookupByUserId(userId, email, new Date(), targetAmount);
boolean foundAcceptable = false;
for (CertificateAuthenticity candidate : identifiedCertificates) {
if (candidate.isAuthenticated()) {