summaryrefslogtreecommitdiffstats
path: root/g10/import.c
diff options
context:
space:
mode:
authorDavid Shaw <dshaw@jabberwocky.com>2002-10-03 00:01:29 +0200
committerDavid Shaw <dshaw@jabberwocky.com>2002-10-03 00:01:29 +0200
commit58972f24c406ab1619efac2b3ff91e13923efe5f (patch)
treea7d38634c3621ec7b8412eda3f3641d5be8fbd73 /g10/import.c
parent* longlong.h: Some whitespace changes in HPPA to fix assembler problems on (diff)
downloadgnupg2-58972f24c406ab1619efac2b3ff91e13923efe5f.tar.xz
gnupg2-58972f24c406ab1619efac2b3ff91e13923efe5f.zip
* import.c (import_secret_one): Check for an illegal (>110) protection
cipher when importing a secret key. * keylist.c (list_keyblock_print): Show a '#' for a secret-parts-missing key. * parse_packet.c (parse_key): Some comments. * revoke.c (gen_revoke): Remove some debugging code. * trustdb.c (verify_own_keys): Make trusted-key a non-deprecated option again. * seckey-cert.c (do_check): Don't give the IDEA warning unless the cipher in question is in fact IDEA.
Diffstat (limited to 'g10/import.c')
-rw-r--r--g10/import.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/g10/import.c b/g10/import.c
index f54f8d850..9f6b8936e 100644
--- a/g10/import.c
+++ b/g10/import.c
@@ -850,6 +850,13 @@ import_secret_one( const char *fname, KBNODE keyblock,
return 0;
}
+ if(sk->protect.algo>110)
+ {
+ log_error(_("key %08lX: secret key with invalid cipher %d "
+ "- skipped\n"),(ulong)keyid[1],sk->protect.algo);
+ return 0;
+ }
+
clear_kbnode_flags( keyblock );
/* do we have this key already in one of our secrings ? */