31 lines
878 B
Diff
31 lines
878 B
Diff
commit eadf12a52c2e230174e076a0dcae68132094cefe
|
|
Author: Jakub Jelen <jjelen@redhat.com>
|
|
Date: Thu Feb 24 09:02:53 2022 +0100
|
|
|
|
sign: Construct valid AEAD packets.
|
|
|
|
* g10/sign.c (sign_symencrypt_file): Insert correct version and AEAD
|
|
information into symkey packet.
|
|
|
|
--
|
|
|
|
GnuPG-bug-id: 5856
|
|
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
|
|
|
|
diff --git a/g10/sign.c b/g10/sign.c
|
|
index bbcfabdb7..2ab76c99b 100644
|
|
--- a/g10/sign.c
|
|
+++ b/g10/sign.c
|
|
@@ -1660,8 +1660,9 @@ sign_symencrypt_file (ctrl_t ctrl, const char *fname, strlist_t locusr)
|
|
{
|
|
PKT_symkey_enc *enc = xmalloc_clear( sizeof *enc );
|
|
|
|
- enc->version = 4;
|
|
+ enc->version = cfx.dek->use_aead ? 5 : 4;
|
|
enc->cipher_algo = cfx.dek->algo;
|
|
+ enc->aead_algo = cfx.dek->use_aead;
|
|
enc->s2k = *s2k;
|
|
pkt.pkttype = PKT_SYMKEY_ENC;
|
|
pkt.pkt.symkey_enc = enc;
|
|
|