diff options
Diffstat (limited to 'agent/command.c')
-rw-r--r-- | agent/command.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/agent/command.c b/agent/command.c index fd050ee6b..2fd9a85d4 100644 --- a/agent/command.c +++ b/agent/command.c @@ -1075,13 +1075,14 @@ cmd_pkdecrypt (assuan_context_t ctx, char *line) if (p) { kemid = KEM_PQC_PGP; - if (*p++ == '=') + if (*p == '=') { - if (strcmp (p, "PQC-PGP")) + p++; + if (!strcmp (p, "PQC-PGP")) kemid = KEM_PQC_PGP; - else if (strcmp (p, "PGP")) + else if (!strcmp (p, "PGP")) kemid = KEM_PGP; - else if (strcmp (p, "CMS")) + else if (!strcmp (p, "CMS")) kemid = KEM_CMS; else return set_error (GPG_ERR_ASS_PARAMETER, "invalid KEM algorithm"); |