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:
parent
d7aea4b0f7
commit
93abfd5517
3 changed files with 30 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue