mirror of
https://github.com/pgpainless/pgpainless.git
synced 2025-12-08 13:21:09 +01:00
Move EncryptionMechanismNegotiator into own interface, improve negotiation
This commit is contained in:
parent
65e2de8186
commit
a575f46867
3 changed files with 111 additions and 34 deletions
|
|
@ -79,11 +79,15 @@ public class MechanismNegotiationTest {
|
|||
.build()));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Here, we fall back to SEIPD1(AES128), as that is the policy fallback mechanism.
|
||||
*/
|
||||
@TestTemplate
|
||||
@ExtendWith(TestAllImplementations.class)
|
||||
public void testEncryptToV6SEIPD1CertAndV6SEIPD2Cert() throws IOException, PGPException {
|
||||
testEncryptDecryptAndCheckExpectations(
|
||||
MessageEncryptionMechanism.integrityProtected(SymmetricKeyAlgorithm.AES_192.getAlgorithmId()),
|
||||
MessageEncryptionMechanism.integrityProtected(SymmetricKeyAlgorithm.AES_128.getAlgorithmId()),
|
||||
|
||||
new KeySpecification(OpenPGPKeyVersion.v6, AlgorithmSuite.emptyBuilder()
|
||||
.overrideAeadAlgorithms(new AEADCipherMode(AEADAlgorithm.OCB, SymmetricKeyAlgorithm.AES_256))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue