1
0
mirror of git://git.gnupg.org/gnupg.git synced 2025-01-22 14:57:02 +01:00

gpg: Take care not to encrypt with OCB in de-vs mode

* g10/encrypt.c (use_aead): In de-vs mode use OCB only if the
compatibility flag ist set.
This commit is contained in:
Werner Koch 2023-04-06 09:21:33 +02:00
parent 04f1d9649c
commit b349ceedfc
No known key found for this signature in database
GPG Key ID: E3FDFF218E45B72B

View File

@ -262,6 +262,10 @@ use_aead (pk_list_t pk_list, int algo)
{ {
int can_use; int can_use;
if (!(opt.compat_flags & COMPAT_VSD_ALLOW_OCB)
&& opt.compliance == CO_DE_VS)
return 0; /* Not yet allowed. */
can_use = openpgp_cipher_get_algo_blklen (algo) == 16; can_use = openpgp_cipher_get_algo_blklen (algo) == 16;
/* With --force-aead we want AEAD. */ /* With --force-aead we want AEAD. */