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:
parent
600d5f49bb
commit
2a7c6af022
4 changed files with 17 additions and 13 deletions
|
@ -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());
|
||||
|
|
|
@ -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());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue