[Patch] Bug fix: S/MIME cert chain broken in identity key selection

Hi all,

I noticed that Balsa throws a CRITICAL when I try to view the certification chain of a S/MIME certificate 
selected in the Identity dialogue.  The reason: the fingerprint is not passed to function 
libbalsa_gpgme_key().  However, this parameter is reserved for the fingerprint of a signature's subkey.

The simple solution: if the passed fingerprint is NULL, use the one of the first subkey.  If that one is 
/still/ NULL, display a message about a probably broken key instead of throwing the CRITICAL.

The attached patch is suitable for both the master and gmime3 branches.



Patch details:
- libbalsa/libbalsa-gpgme-widgets.c: libbalsa_gpgme_key(): fall back to the cert fingerprint for cb 
smime_show_chain() if the passed one is NULL
- libbalsa/x509-cert-widget.c: x509_cert_chain_smime(): display message if the cert fingerprint is NULL, 
requires a litte refactoring

Attachment: fix_smime_cert_chain.diff
Description: Text Data

Attachment: pgpofqw33oATB.pgp
Description: PGP signature

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]