From eb756e2510bfcae3339e0907a7e4cacdea59b175 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Sat, 11 Oct 2014 19:44:13 +0200 Subject: [PATCH] gpg: Show v3 key fingerprints as all zero. * g10/keyid.c (fingerprint_from_pk): Show v3 fingerprints as all zero. -- MD5 is considered broken for a long time now. To make it easier for users to notice that a listing shows a v3 key, the fingerprint is now displayed as 16 zero bytes unless --allow-weak-digest-algos is active. Signed-off-by: Werner Koch --- g10/keyid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/g10/keyid.c b/g10/keyid.c index d7a877ba3..10eadef4f 100644 --- a/g10/keyid.c +++ b/g10/keyid.c @@ -672,7 +672,7 @@ fingerprint_from_pk( PKT_public_key *pk, byte *array, size_t *ret_len ) if ( pk->version < 4 ) { - if ( is_RSA(pk->pubkey_algo) ) + if ( is_RSA(pk->pubkey_algo) && opt.flags.allow_weak_digest_algos) { /* RSA in version 3 packets is special. */ gcry_md_hd_t md;