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

Remove SignerUserId check, Policy setting only via constructor parameter

This commit is contained in:
Paul Schaub 2025-03-24 12:40:43 +01:00
parent 4c180bbd59
commit 221d329254
Signed by: vanitasvitae
GPG key ID: 62BEE9264BF17311
16 changed files with 125 additions and 348 deletions

View file

@ -211,7 +211,7 @@ public class ModifiedPublicKeysInvestigation {
@Test
public void assertModifiedDSAKeyThrowsKeyIntegrityException() throws IOException {
PGPainless api = PGPainless.newInstance();
PGPainless api = PGPainless.getInstance();
Policy policy = api.getAlgorithmPolicy();
policy.setEnableKeyParameterValidation(true);
@ -226,7 +226,7 @@ public class ModifiedPublicKeysInvestigation {
@Test
public void assertModifiedElGamalKeyThrowsKeyIntegrityException() throws IOException {
PGPainless api = PGPainless.newInstance();
PGPainless api = PGPainless.getInstance();
Policy policy = api.getAlgorithmPolicy();
policy.setEnableKeyParameterValidation(true);
@ -239,7 +239,7 @@ public class ModifiedPublicKeysInvestigation {
@Test
public void assertInjectedKeyRingFailsToUnlockPrimaryKey() throws IOException {
PGPainless api = PGPainless.newInstance();
PGPainless api = PGPainless.getInstance();
Policy policy = api.getAlgorithmPolicy();
policy.setEnableKeyParameterValidation(true);
@ -252,7 +252,7 @@ public class ModifiedPublicKeysInvestigation {
@Test
public void assertCannotUnlockElGamalPrimaryKeyDueToDummyS2K() throws IOException {
PGPainless api = PGPainless.newInstance();
PGPainless api = PGPainless.getInstance();
SecretKeyRingProtector protector = SecretKeyRingProtector.unlockAnyKeyWith(Passphrase.fromPassword("12345678"));
OpenPGPKey elgamal = api.readKey().parseKey(ELGAMAL);