mirror of
https://github.com/pgpainless/pgpainless.git
synced 2025-09-10 18:59:39 +02:00
SOP encrypt --profile=rfc9580: Only override enc mechanism with seipd2 if exclusively symmetric encryption is used
This commit is contained in:
parent
24887e2521
commit
fd85f8e567
2 changed files with 6 additions and 1 deletions
|
@ -63,7 +63,8 @@ class EncryptImpl(private val api: PGPainless) : Encrypt {
|
|||
throw SOPGPException.MissingArg("Missing encryption method.")
|
||||
}
|
||||
|
||||
if (profile == RFC9580_PROFILE.name) {
|
||||
if (encryptionOptions.usesOnlyPasswordBasedEncryption() &&
|
||||
profile == RFC9580_PROFILE.name) {
|
||||
encryptionOptions.overrideEncryptionMechanism(
|
||||
MessageEncryptionMechanism.aead(
|
||||
SymmetricKeyAlgorithm.AES_128.algorithmId, AEADAlgorithm.OCB.algorithmId))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue