]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
mail-crypt: Fix detecting chacha20-poly1305 in algorithm
authorAki Tuomi <aki.tuomi@open-xchange.com>
Fri, 6 Sep 2024 12:00:33 +0000 (15:00 +0300)
committerAki Tuomi <aki.tuomi@open-xchange.com>
Mon, 16 Sep 2024 18:17:35 +0000 (21:17 +0300)
src/plugins/mail-crypt/fs-crypt-common.c

index 5cd4815d6c9be28323459b98d432b39441173694..18158ff0fb8c15ca9e9fb30f611dd8ea657f0261 100644 (file)
@@ -354,7 +354,7 @@ static void fs_crypt_write_stream(struct fs_file *_file)
        enum io_stream_encrypt_flags flags;
        if (strstr(file->fs->enc_algo, "gcm") != NULL ||
            strstr(file->fs->enc_algo, "ccm") != NULL ||
-           strcasecmp(file->fs->enc_algo, "chacha20-poly1305") == 0) {
+           str_begins_with(file->fs->enc_algo, "chacha20-poly1305")) {
                flags = IO_STREAM_ENC_INTEGRITY_AEAD;
        } else {
                flags = IO_STREAM_ENC_INTEGRITY_HMAC;