]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
mail-crypt: Finish marking ChaCha20-Poly1305 as AEAD cipher
authorAki Tuomi <aki.tuomi@open-xchange.com>
Fri, 23 Feb 2024 08:55:04 +0000 (10:55 +0200)
committerAki Tuomi <aki.tuomi@open-xchange.com>
Fri, 17 Jan 2025 08:39:58 +0000 (10:39 +0200)
src/plugins/mail-crypt/mail-crypt-plugin.c

index 4c096de88d8e6876403961c326de52a9b2d765c6..d67cd66a104452858d4c3c8041a8911151805205 100644 (file)
@@ -262,7 +262,9 @@ mail_crypt_mail_save_begin(struct mail_save_context *ctx,
        enum io_stream_encrypt_flags enc_flags = 0;
        if (muser != NULL && muser->set->crypt_write_algorithm[0] != '\0') {
                if (strstr(muser->set->crypt_write_algorithm, "gcm") != NULL ||
-                   strstr(muser->set->crypt_write_algorithm, "ccm") != NULL)
+                   strstr(muser->set->crypt_write_algorithm, "ccm") != NULL ||
+                   strcasecmp(muser->set->crypt_write_algorithm,
+                      "chacha20-poly1305") == 0)
                        enc_flags = IO_STREAM_ENC_INTEGRITY_AEAD;
                else
                        enc_flags = IO_STREAM_ENC_INTEGRITY_HMAC;