From: Karl-Heinz Zimmer Date: Fri, 31 May 2002 12:00:18 +0000 (+0000) Subject: Bugfix: use fingerprint as found in "fpr" only if no key was found by gpgme_get_sig_key() X-Git-Tag: gpgme-1.2.0@1385~975 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=4f4591f0146cd9e3606dca126dc1a70bcaf7697b;p=gpgme.git Bugfix: use fingerprint as found in "fpr" only if no key was found by gpgme_get_sig_key() --- diff --git a/trunk/gpgmeplug/gpgmeplug.c b/trunk/gpgmeplug/gpgmeplug.c index 6231523..b842478 100644 --- a/trunk/gpgmeplug/gpgmeplug.c +++ b/trunk/gpgmeplug/gpgmeplug.c @@ -1181,18 +1181,7 @@ bool checkMessageSignature( char** cleartext, err = gpgme_get_sig_key (ctx, sig_idx, &key); - - - - sigmeta->extended_info[sig_idx].fingerprint = malloc( strlen( fpr ) + 1 ); - if( sigmeta->extended_info[sig_idx].fingerprint ) { - strcpy( sigmeta->extended_info[sig_idx].fingerprint, fpr ); - sigmeta->extended_info[sig_idx].fingerprint[strlen( fpr )] = '\0'; - } - - - - if ( false && err == GPGME_No_Error) { + if ( err == GPGME_No_Error) { const char* attr_string; unsigned long attr_ulong; @@ -1259,6 +1248,8 @@ bool checkMessageSignature( char** cleartext, storeNewCharPtr( &sigmeta->extended_info[sig_idx].comment, attr_string ); } + else + storeNewCharPtr( &sigmeta->extended_info[sig_idx].fingerprint, fpr ); sig_status = sig_status_to_string( status ); storeNewCharPtr( &sigmeta->extended_info[sig_idx].status_text,