[Patch/GMime3 branch] Autocrypt



Hi all,

as GMime3 (3.2, at least) supports Autocrypt headers, we can actually simplify our code a little bit.  Note 
that with the old implementation from the Master branch, the Autocrypt header gets extra RFC 2047 encoding, 
which /should/ be harmless, but is ugly…

Note that calling g_mime_message_get_autocrypt_header() will always create a GMimeAutocryptHeader object if 
the message has a valid From: header with a single address, even if the message does not have an Autocrypt: 
header.  Only the key data is of course present only if a valid Autocrypt: header has been found.

Opinions?

(This message is created using the GMime3 branch, btw 😊️)
Cheers,
Albrecht.

---
Patch details:
- libbalsa/autocrypt.c:
  * drop obsolete functions scan_autocrypt_headers(), parse_autocrypt_header(), eval_autocrypt_attr();
  * simplify autocrypt_from_message() by accessing GMimeAutocryptHeader
  * simplify autocrypt_header() by creating a GMimeAutocryptHeader
  * new function extract_ac_keydata() for validating the gpg key from GMimeAutocryptHeader, and for 
extracting the fingerprint and expiry date
  * add_or_update_user_info(): use data from GMimeAutocryptHeader and extract_ac_keydata()
  * update_last_seen(): use data from GMimeAutocryptHeader
- libbalsa/libbalsa-gpgme-keys.[ch]: change libbalsa_gpgme_export_autocrypt_key() to return GBytes as to 
avoid extra conversions
- libbalsa/message.[ch]: extract and free GMimeAutocryptHeader

Attachment: gmime3-autocrypt.diff.bz2
Description: application/bzip

Attachment: pgpAUZt5fPgfr.pgp
Description: PGP signature



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