1
0
Fork 0
mirror of https://github.com/pgpainless/pgpainless.git synced 2025-09-12 11:49:38 +02:00

Rename SecretKeyRingEditor.createRevocationCertificate() to createRevocation()

This commit is contained in:
Paul Schaub 2023-06-20 16:41:46 +02:00
parent 600d5f49bb
commit 2a7c6af022
Signed by: vanitasvitae
GPG key ID: 62BEE9264BF17311
4 changed files with 17 additions and 13 deletions

View file

@ -27,7 +27,7 @@ public class RevocationCertificateTest {
PGPSecretKeyRing secretKeys = TestKeys.getEmilSecretKeyRing();
PGPSignature revocation = PGPainless.modifyKeyRing(secretKeys)
.createRevocationCertificate(SecretKeyRingProtector.unprotectedKeys(),
.createRevocation(SecretKeyRingProtector.unprotectedKeys(),
RevocationAttributes.createKeyRevocation()
.withReason(RevocationAttributes.Reason.KEY_RETIRED)
.withoutDescription());

View file

@ -75,7 +75,7 @@ public class RevokeSubKeyTest {
SecretKeyRingProtector protector = PasswordBasedSecretKeyRingProtector.forKey(secretKeys, Passphrase.fromPassword("password123"));
PGPSignature revocationCertificate = PGPainless.modifyKeyRing(secretKeys)
.createRevocationCertificate(fingerprint, protector, RevocationAttributes.createKeyRevocation()
.createRevocation(fingerprint, protector, RevocationAttributes.createKeyRevocation()
.withReason(RevocationAttributes.Reason.KEY_RETIRED)
.withDescription("Key no longer used."));
@ -98,8 +98,8 @@ public class RevokeSubKeyTest {
.forKey(secretKeys, Passphrase.fromPassword("password123"));
SecretKeyRingEditorInterface editor = PGPainless.modifyKeyRing(secretKeys);
PGPSignature keyRevocation = editor.createRevocationCertificate(primaryKey.getKeyID(), protector, (RevocationAttributes) null);
PGPSignature subkeyRevocation = editor.createRevocationCertificate(subKey.getKeyID(), protector, (RevocationAttributes) null);
PGPSignature keyRevocation = editor.createRevocation(primaryKey.getKeyID(), protector, (RevocationAttributes) null);
PGPSignature subkeyRevocation = editor.createRevocation(subKey.getKeyID(), protector, (RevocationAttributes) null);
assertEquals(SignatureType.KEY_REVOCATION.getCode(), keyRevocation.getSignatureType());
assertEquals(SignatureType.SUBKEY_REVOCATION.getCode(), subkeyRevocation.getSignatureType());