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:
parent
4c180bbd59
commit
221d329254
16 changed files with 125 additions and 348 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue