mirror of
https://github.com/pgpainless/pgpainless.git
synced 2024-11-23 12:52:07 +01:00
Improve user-id revocation tests
This commit is contained in:
parent
4ad5419d5b
commit
a72cff28d8
1 changed files with 1 additions and 5 deletions
|
@ -50,7 +50,7 @@ import org.pgpainless.signature.SignatureUtils;
|
||||||
public class UserIdRevocationTest {
|
public class UserIdRevocationTest {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void test() throws IOException, PGPException, InvalidAlgorithmParameterException, NoSuchAlgorithmException, InterruptedException {
|
public void testRevocationWithoutRevocationAttributes() throws PGPException, InvalidAlgorithmParameterException, NoSuchAlgorithmException, InterruptedException {
|
||||||
PGPSecretKeyRing secretKeys = PGPainless.generateKeyRing()
|
PGPSecretKeyRing secretKeys = PGPainless.generateKeyRing()
|
||||||
.withSubKey(KeySpec.getBuilder(KeyType.XDH(XDHCurve._X25519))
|
.withSubKey(KeySpec.getBuilder(KeyType.XDH(XDHCurve._X25519))
|
||||||
.withKeyFlags(KeyFlag.ENCRYPT_COMMS)
|
.withKeyFlags(KeyFlag.ENCRYPT_COMMS)
|
||||||
|
@ -63,8 +63,6 @@ public class UserIdRevocationTest {
|
||||||
.withoutPassphrase()
|
.withoutPassphrase()
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
Thread.sleep(1000);
|
|
||||||
|
|
||||||
// make a copy with revoked subkey
|
// make a copy with revoked subkey
|
||||||
PGPSecretKeyRing revoked = PGPainless.modifyKeyRing(secretKeys)
|
PGPSecretKeyRing revoked = PGPainless.modifyKeyRing(secretKeys)
|
||||||
.revokeUserIdOnAllSubkeys("secondary@key.id", new UnprotectedKeysProtector())
|
.revokeUserIdOnAllSubkeys("secondary@key.id", new UnprotectedKeysProtector())
|
||||||
|
@ -105,8 +103,6 @@ public class UserIdRevocationTest {
|
||||||
.withoutPassphrase()
|
.withoutPassphrase()
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
Thread.sleep(1000);
|
|
||||||
|
|
||||||
secretKeys = PGPainless.modifyKeyRing(secretKeys)
|
secretKeys = PGPainless.modifyKeyRing(secretKeys)
|
||||||
.revokeUserIdOnAllSubkeys("secondary@key.id", new UnprotectedKeysProtector(),
|
.revokeUserIdOnAllSubkeys("secondary@key.id", new UnprotectedKeysProtector(),
|
||||||
RevocationAttributes.createCertificateRevocation()
|
RevocationAttributes.createCertificateRevocation()
|
||||||
|
|
Loading…
Reference in a new issue