[Patch] Crypto performance improvements

Albrecht Dreß <[email protected]>
Newsgroups gmane.comp.gnome.apps.balsa
Message-ID <[email protected]>
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

_______________________________________________
balsa-list mailing list
[email protected]
https://mail.gnome.org/mailman/listinfo/balsa-list
crypto-performance.diff.bz2 (application/x-bzip, 10.7 KB) - not displayed
signature.asc (application/pgp-signature, 473 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQEcBAABCAAGBQJagbBNAAoJEEypbw5n59n4xtcIAIwwuFSQbLaxMfA2HvQb1oo+
jo+7bL+5ODqWtXKeZ0l0UpHov11qREo6ye+DlITjlGp04I40Be5TQAEl+/dRH9gf
5hT82RQrnBksWLW4mDK5nxN1Trk4QX2obQSPP1JcTGDtKitCho5pqR0WDjApk31I
mgNY3WimRReawk+UtNJ4OOb/R0oIam64h5VePgCLNKoDXvUB6y6JFQ2Nmc2+0+br
YuVBn7YnqigOsprCNck3dXll4fIBi9wgD7k8YbF7N8C9Kn8W51djGc3lzu8RMUfO
fhMBq+v0fNQTnMzQivR8Gv/PYZP0R6QArYxkRZqcuaGQUhCUPHfOZbOs9yDzhHs=
=JJ3+
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.