Re: Comments please: gpg/rfc 3156 support for balsa (looong) (and gmime)



Am 25.02.03 18:11 schrieb(en) Carlos Morgado:
> gmime knows about multipart-encripted and multipart-signed so we get it
> basicly for free and all we have to do is write UI for it.
> gmime also means abandoning libmutt header/body structures and doing some
> work on the backend which means *not* 2.0.

O.k., but I guess this is just half of the game... The more complicated 
part was actually *signing* the message (and will be the same for 
encryption), as we have to build either a single message body or put 
multipart bodies into a multipart/mixed, encode it/them properly, and 
convert all \n to \r\n, so the stream looks as the stuff the mta gets. 
Only **then** we can calculate the signature over it. See rfc3156 for the 
complete drama... I solve this by actually abusing ;-)) libmutt after 
libbalsa_create_msg() created and encoded all mutt bodies. Basically, my 
routine calls libmutt to save the parts including all the necessary 
headers and correctly encoded to a temp file and runs a gpgme callback on 
them to do the line endings and to calculate the signature, which is then 
added to the mutt chain. This works as libmutt will send exactly the same 
stuff as I saved. So the crucial question is if gmime supports this.

Checking the signature (and decryption) is rather easy compared to that; 
we have two "raw" streams (message and signautre) from the mailbox, which 
is again fed into a gpgme callback to do the check.

>  now i feel guilty for not posting this ideas to the list earlier, but 
> i'll
> to my defense it was just this weekend i had time to sit down a bit and
> give this plot some quality time.

No problem. This is how Open Source works :-))

Cheers, Albrecht.


-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  Albrecht Dreß  -  Johanna-Kirchner-Straße 13  -  D-53123 Bonn (Germany)
        Phone (+49) 228 6199571  -  mailto:albrecht.dress@arcor.de
_________________________________________________________________________



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