mirror of
https://github.com/pgpainless/pgpainless.git
synced 2025-09-10 18:59:39 +02:00
parent
cac500874a
commit
30481cd510
3 changed files with 17 additions and 1 deletions
|
@ -76,7 +76,9 @@ public class RefuseToAddWeakSubkeyTest {
|
|||
PGPainless.getPolicy().setPublicKeyAlgorithmPolicy(new Policy.PublicKeyAlgorithmPolicy(minimalBitStrengths));
|
||||
|
||||
SecretKeyRingEditorInterface editor = PGPainless.modifyKeyRing(secretKeys);
|
||||
KeySpec spec = KeySpec.getBuilder(KeyType.RSA(RsaLength._1024), KeyFlag.ENCRYPT_COMMS).build();
|
||||
KeySpec spec = KeySpec.getBuilder(KeyType.RSA(RsaLength._1024), KeyFlag.ENCRYPT_COMMS)
|
||||
.setKeyCreationDate(editor.getReferenceTime()) // The key gets created after we instantiate the editor.
|
||||
.build();
|
||||
|
||||
secretKeys = editor.addSubKey(spec, Passphrase.emptyPassphrase(), SecretKeyRingProtector.unprotectedKeys())
|
||||
.done();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue