diff options
author | Karl-Heinz Zimmer <[email protected]> | 2002-05-31 12:00:18 +0000 |
---|---|---|
committer | Karl-Heinz Zimmer <[email protected]> | 2002-05-31 12:00:18 +0000 |
commit | 3fa6cef5caedf6e95f4e70a508ca2c70eca9a3ea (patch) | |
tree | c62f5016b788cf2eff689983a489b45b943747d5 /gpgmeplug | |
parent | Matze's patch for showing colored bars at S/MIME messages as well as at OpenP... (diff) | |
download | gpgme-3fa6cef5caedf6e95f4e70a508ca2c70eca9a3ea.tar.gz gpgme-3fa6cef5caedf6e95f4e70a508ca2c70eca9a3ea.zip |
Bugfix: use fingerprint as found in "fpr" only if no key was found by gpgme_get_sig_key()
Diffstat (limited to 'gpgmeplug')
-rw-r--r-- | gpgmeplug/gpgmeplug.c | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/gpgmeplug/gpgmeplug.c b/gpgmeplug/gpgmeplug.c index 6231523c..b8424788 100644 --- a/gpgmeplug/gpgmeplug.c +++ b/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, |