diff options
author | David Shaw <[email protected]> | 2002-10-02 21:56:03 +0000 |
---|---|---|
committer | David Shaw <[email protected]> | 2002-10-02 21:56:03 +0000 |
commit | 27d526298be07b1ff64513ed9ca20679b5d3006d (patch) | |
tree | 2e4b55b63e1734b09c21156e32a69e016098751b /g10/parse-packet.c | |
parent | * longlong.h: Some whitespace changes in HPPA to fix assembler problems on (diff) | |
download | gnupg-27d526298be07b1ff64513ed9ca20679b5d3006d.tar.gz gnupg-27d526298be07b1ff64513ed9ca20679b5d3006d.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.
Diffstat (limited to 'g10/parse-packet.c')
-rw-r--r-- | g10/parse-packet.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/g10/parse-packet.c b/g10/parse-packet.c index 5ed75e490..09647389a 100644 --- a/g10/parse-packet.c +++ b/g10/parse-packet.c @@ -1574,6 +1574,9 @@ parse_key( IOBUF inp, int pkttype, unsigned long pktlen, } sk->protect.sha1chk = (sk->protect.algo == 254); sk->protect.algo = iobuf_get_noeof(inp); pktlen--; + /* Note that a sk->protect.algo > 110 is illegal, but + I'm not erroring on it here as otherwise there + would be no way to delete such a key. */ sk->protect.s2k.mode = iobuf_get_noeof(inp); pktlen--; sk->protect.s2k.hash_algo = iobuf_get_noeof(inp); pktlen--; /* check for the special GNU extension */ @@ -1647,6 +1650,9 @@ parse_key( IOBUF inp, int pkttype, unsigned long pktlen, (ulong)sk->protect.s2k.count); } } + /* Note that a sk->protect.algo > 110 is illegal, but I'm + not erroring on it here as otherwise there would be no + way to delete such a key. */ else { /* old version; no S2K, so we set mode to 0, hash MD5 */ sk->protect.s2k.mode = 0; sk->protect.s2k.hash_algo = DIGEST_ALGO_MD5; |