Hi All!

attached is a first implementation of the crypto stuff which eliminates almost 
all gmime crypto related ifdef's and seems to work with gmime 2.4 and 2.6.  
However, it's only briefly tested, so it's more a demonstration of my idea than 
suitable for human consumption yet...

The basic idea is to get rid of the gmime crypto context (or whatever it is 
named).  The gmime-crypto-context.[hc] is removed.  The backend is implemented 
in three new modules:

- libbalsa-gpgme.[hc]: everything dealing with gpgme to sign, encrypt, verify 
and decrypt.  Instead of passing callbacks around through the context, they are 
set *once* during the initialisation needed anyway and remain valid for the 
lifetime of the application.  The passphrase callback is used *only* if no 
agent is running.

- libbalsa-gpgme-cb.[hc]: callback implementation

- gmime-multipart-crypt.[hc] is basically stolen from gmime, as to implement 
multipart/signed and multipart/encrypted, just without the context and directly 
calling the gpgme backend.  The rest of the patches is huge, but more or less 
straightforward, removing much of the overhead introduced by the contexts, and 
re-organising the code (e.g. by shifting the callbacks into the separate 
module).

As I said, it needs some more polish, but basically it seems to work.

Opinions??

Best, Albrecht.


Am 28.11.11 21:14 schrieb(en) Albrecht Dreß:
Am 28.11.11 04:20 schrieb(en) Peter Bloomfield:
I just patched master to build with GMime 2.6 (commit 
393d0077495cb750ee47bab6ec44a60906a95179).  It should allow building with 
earlier versions of GMime, but I can't test that.

The patch to make the crypto stuff compatible with gmime 2.4 and 2.6 *without* 
tons of ifdef's is not forgotten and almost ready, but still needs some 
testing.  Next weekend, I hope...

Cheers, Albrecht.

Attachment: crypto-snapshot.tar.gz
Description: application/compressed-tar

Attachment: pgpsp7UgJ0dQF.pgp
Description: PGP signature

_______________________________________________
balsa-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/balsa-list

Reply via email to