From 4ca017e43bb296b937c792c28cd500baa1f8dc14 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Tue, 9 Jan 2024 17:25:34 +0100 Subject: [PATCH] gpg: Print a useful error id SKI algo 253 is found. * g10/parse-packet.c (parse_key): Detect the SKI algo 253. -- As long as we have not yet implemented this we should at least be able to detect this case. --- g10/parse-packet.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/g10/parse-packet.c b/g10/parse-packet.c index a033732ec..aa6bac9da 100644 --- a/g10/parse-packet.c +++ b/g10/parse-packet.c @@ -2684,7 +2684,16 @@ parse_key (IOBUF inp, int pkttype, unsigned long pktlen, { ski->is_protected = 1; ski->s2k.count = 0; - if (ski->algo == 254 || ski->algo == 255) + if (ski->algo == 253) + { + if (list_mode) + es_fprintf (listfp, + "\tS2K pseudo algo %d is not yet supported\n", + ski->algo); + err = gpg_error (GPG_ERR_NOT_IMPLEMENTED); + goto leave; + } + else if (ski->algo == 254 || ski->algo == 255) { if (pktlen < 3) {