From: Aki Tuomi Date: Fri, 6 Sep 2024 12:00:33 +0000 (+0300) Subject: mail-crypt: Fix detecting chacha20-poly1305 in algorithm X-Git-Tag: 2.4.0~1460 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=013a2b4dfe31fad90fb68fef2c5b1ff3980e2838;p=thirdparty%2Fdovecot%2Fcore.git mail-crypt: Fix detecting chacha20-poly1305 in algorithm --- diff --git a/src/plugins/mail-crypt/fs-crypt-common.c b/src/plugins/mail-crypt/fs-crypt-common.c index 5cd4815d6c..18158ff0fb 100644 --- a/src/plugins/mail-crypt/fs-crypt-common.c +++ b/src/plugins/mail-crypt/fs-crypt-common.c @@ -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;