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

Respect encryptionMechanismOverride

This commit is contained in:
Paul Schaub 2025-05-06 16:53:24 +02:00
parent 6e8982df59
commit f7dd72dd79
Signed by: vanitasvitae
GPG key ID: 62BEE9264BF17311

View file

@ -435,6 +435,10 @@ class EncryptionOptions(private val purpose: EncryptionPurpose, private val api:
}
internal fun negotiateEncryptionMechanism(): MessageEncryptionMechanism {
if (encryptionMechanismOverride != null) {
return encryptionMechanismOverride!!
}
val features = keysAndAccessors.values.map { it.features }.toList()
if (features.all { it.contains(Feature.MODIFICATION_DETECTION_2) }) {