diff options
author | NIIBE Yutaka <[email protected]> | 2021-10-29 00:23:40 +0000 |
---|---|---|
committer | NIIBE Yutaka <[email protected]> | 2021-10-29 00:23:40 +0000 |
commit | 16fe6cdf72573837202b5394cce832645a71ea6a (patch) | |
tree | 18aae7978faa34e38b33f8156eda29a9136dbcf1 | |
parent | experiment: Fix exporting protecte secret key for new448. (diff) | |
download | gnupg-16fe6cdf72573837202b5394cce832645a71ea6a.tar.gz gnupg-16fe6cdf72573837202b5394cce832645a71ea6a.zip |
experiment:agent: Allow importing v5 secret key.
Signed-off-by: NIIBE Yutaka <[email protected]>
-rw-r--r-- | agent/cvt-openpgp.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/agent/cvt-openpgp.c b/agent/cvt-openpgp.c index a8d11eb65..7389dd8e5 100644 --- a/agent/cvt-openpgp.c +++ b/agent/cvt-openpgp.c @@ -840,9 +840,10 @@ convert_from_openpgp_main (ctrl_t ctrl, gcry_sexp_t s_pgp, int dontcare_exist, if (!list) goto bad_seckey; value = gcry_sexp_nth_data (list, 1, &valuelen); - if (!value || valuelen != 1 || !(value[0] == '3' || value[0] == '4')) + if (!value || valuelen != 1 + || !(value[0] == '3' || value[0] == '4' || value[0] == '5')) goto bad_seckey; - is_v4 = (value[0] == '4'); + is_v4 = (value[0] == '4') || (value[0] == '5'); gcry_sexp_release (list); list = gcry_sexp_find_token (top_list, "protection", 0); |