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

SecretKeyRingEditor: Add revoke() shortcut method

This commit is contained in:
Paul Schaub 2020-11-22 21:25:52 +01:00
parent d7aea4b0f7
commit 93abfd5517
Signed by: vanitasvitae
GPG key ID: 62BEE9264BF17311
3 changed files with 30 additions and 1 deletions

View file

@ -73,7 +73,7 @@ public class KeyRingInfoTest {
assertNull(sInfo.getRevocationDate());
assertNull(pInfo.getRevocationDate());
Date revocationDate = new Date();
PGPSecretKeyRing revoked = PGPainless.modifyKeyRing(secretKeys).revokeSubKey(sInfo.getKeyId(), new UnprotectedKeysProtector()).done();
PGPSecretKeyRing revoked = PGPainless.modifyKeyRing(secretKeys).revoke(new UnprotectedKeysProtector()).done();
KeyRingInfo rInfo = PGPainless.inspectKeyRing(revoked);
assertNotNull(rInfo.getRevocationDate());
assertEquals(revocationDate.getTime(), rInfo.getRevocationDate().getTime(), 1000);