Hi all,

attached is a bigger patch which improves the performance of the GpgME crypto 
operations in Balsa.

Basically, it delays loading the public key of a signature until the user 
actually wants to display (or print) it.  As a consequence, the signature 
“traffic light” is now based entirely on GpgME's status.  Note that this 
results in a small difference from the previous implementation, where the 
indicator was “green” when both the signature validity and the key's owner 
trust were at least marginal.  With the patch, using the default GpgME model, 
the key's owner trust must be one level higher (full) for a “green” signature.  
However, I think this approach is even better as it will (probably) show 
similar trust results as other MUA's.

I also took the opportunity to re-factor some functions (inter alia now 
including the same key details in a print-out as in the display widget), and to 
set the “crypto” log domain for the related source files.

As always, any comment will be welcome!

Cheers,
Albrecht.

---
Patch details:
- libbalsa/body.c: calculate protection state without the key
- libbalsa/gmime-gpgme-signature.[ch]: do not try to load the key when creating 
the signature object, add and rename some signature-only related functions from 
rfc3156.[hc], set 'crypto' log domain
- libbalsa/libbalsa-gpgme-keys.[ch]: add function to load a public key, 
properly restore the context attributes when listing keys, set 'crypto' log 
domain
- libbalsa/libbalsa-gpgme-widgets.[ch]: improved function for creating a string 
from the key data (shifted from rfc3156.[hc]), set 'crypto' log domain
- libbalsa/rfc3156.[ch]: refoctoring; shift some signature-only related 
functions to gmime-gpgme-signature.[ch], set 'crypto' log domain
- src/balsa-message.c: use renamed signature info functions, calculate 
protection state without the key
- src/balsa-mime-widget-crypto.c: add callback to load the key when the user 
wants to show it, drop condition which cannot be TRUE, use renamed signature 
info functions
- src/balsa-mime-widget-message.c: use renamed signature info functions
- src/balsa-print-object-header.c: try to load the key before printing, use 
renamed signature info functions
- README, configure.ac: require gpgme ≥ 1.5.0
- libbalsa/libbalsa-gpgme.c: set 'crypto' log domain, adjust debug messages
- libbalsa/gmime-application-pkcs7.c, libbalsa/gmime-multipart-crypt.c, 
libbalsa/gmime-part-rfc2440.c, libbalsa/libbalsa-gpgme-cb.c: set 'crypto' log 
domain

Attachment: crypto-performance.diff.bz2
Description: application/bzip

Attachment: pgpLov1pEz1_c.pgp
Description: PGP signature

_______________________________________________
balsa-list mailing list
balsa-list@gnome.org
https://mail.gnome.org/mailman/listinfo/balsa-list

Reply via email to