aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNIIBE Yutaka <[email protected]>2022-04-12 05:53:46 +0000
committerNIIBE Yutaka <[email protected]>2022-04-12 05:53:46 +0000
commitbdb5136518ded51d5f2b0c71befe6b2ffbc632db (patch)
tree47987c724294e4f68beca500318ce13a24dd3810
parentgpg: Accept GCM and v5 AEAD with v2 SEIPD packet. (diff)
downloadgnupg-bdb5136518ded51d5f2b0c71befe6b2ffbc632db.tar.gz
gnupg-bdb5136518ded51d5f2b0c71befe6b2ffbc632db.zip
Parse Preferred AEAD cerphersuites subpacket.
Signed-off-by: NIIBE Yutaka <[email protected]>
-rw-r--r--common/openpgpdefs.h2
-rw-r--r--g10/parse-packet.c14
2 files changed, 15 insertions, 1 deletions
diff --git a/common/openpgpdefs.h b/common/openpgpdefs.h
index 0696172d7..18d79fdbb 100644
--- a/common/openpgpdefs.h
+++ b/common/openpgpdefs.h
@@ -122,6 +122,8 @@ typedef enum
SIGSUBPKT_ATTST_SIGS = 37, /* Attested Certifications. */
SIGSUBPKT_KEY_BLOCK = 38, /* Entire key used. */
+ SIGSUBPKT_PREF_AEAD2 = 39, /* Preferred AEAD ciphersuites. */
+
SIGSUBPKT_FLAG_CRITICAL = 128
}
sigsubpkttype_t;
diff --git a/g10/parse-packet.c b/g10/parse-packet.c
index 230eb52b5..91347ba34 100644
--- a/g10/parse-packet.c
+++ b/g10/parse-packet.c
@@ -1756,6 +1756,16 @@ dump_sig_subpkt (int hashed, int type, int critical,
}
break;
+ case SIGSUBPKT_PREF_AEAD2:
+ es_fputs ("pref-aead-cipersuites:", listfp);
+ if ((length % 1))
+ p = "[invalid subpacket]";
+ else
+ {
+ for (i = 0; i < length/2; i++)
+ es_fprintf (listfp, " %d:%d", buffer[i*2], buffer[i*2+1]);
+ }
+ break;
default:
if (type >= 100 && type <= 110)
@@ -1800,6 +1810,7 @@ parse_one_sig_subpkt (const byte * buffer, size_t n, int type)
case SIGSUBPKT_FEATURES:
case SIGSUBPKT_REGEXP:
case SIGSUBPKT_ATTST_SIGS:
+ case SIGSUBPKT_PREF_AEAD2:
return 0;
case SIGSUBPKT_SIGNATURE:
case SIGSUBPKT_EXPORTABLE:
@@ -1905,6 +1916,7 @@ can_handle_critical (const byte * buffer, size_t n, int type)
case SIGSUBPKT_POLICY:
case SIGSUBPKT_PREF_KS:
case SIGSUBPKT_REVOC_REASON: /* At least we know about it. */
+ case SIGSUBPKT_PREF_AEAD2:
return 1;
case SIGSUBPKT_KEY_BLOCK:
@@ -2260,7 +2272,7 @@ parse_signature (IOBUF inp, int pkttype, unsigned long pktlen,
if (p)
sig->timestamp = buf32_to_u32 (p);
else if (!(sig->pubkey_algo >= 100 && sig->pubkey_algo <= 110)
- && opt.verbose && !glo_ctrl.silence_parse_warnings)
+ && opt.verbose && !glo_ctrl.silence_parse_warnings)//
log_info ("signature packet without timestamp\n");
/* Set the key id. We first try the issuer fingerprint and if