X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=util%2Fgmime-extra.h;h=cf8d9a2dfb57eff60fbb579cce97ea4d7a9ce305;hb=cd853915ec0ad3e3ee6ec90a7d856e95d001abe9;hp=7688129a8cf9d52f5c58120d9b33b803c218ecd6;hpb=4ce7591610444a1c5ef6f56b57af8e180437fa62;p=notmuch diff --git a/util/gmime-extra.h b/util/gmime-extra.h index 7688129a..cf8d9a2d 100644 --- a/util/gmime-extra.h +++ b/util/gmime-extra.h @@ -14,11 +14,13 @@ GMimeStream *g_mime_stream_stdout_new(void); #define GMIME_ADDRESS_TYPE_BCC GMIME_RECIPIENT_TYPE_BCC #define g_mime_2_6_unref(obj) g_object_unref (obj) - +#define g_mime_certificate_get_fpr16(cert) g_mime_certificate_get_key_id (cert) +#define g_mime_certificate_get_uid(cert) g_mime_certificate_get_name (cert); #else /* GMime >= 3.0 */ typedef GMimeAddressType GMimeRecipientType; #define GMIME_ENABLE_RFC_2047_WORKAROUNDS 0xdeadbeef +#define g_mime_certificate_get_uid(cert) g_mime_certificate_get_key_id (cert); #define g_mime_content_type_to_string(c) g_mime_content_type_get_mime_type (c) #define g_mime_filter_crlf_new(encode,dots) g_mime_filter_dos2unix_new (FALSE) #define g_mime_gpg_context_new(func,path) g_mime_gpg_context_new () @@ -56,6 +58,10 @@ typedef GMimeTrust GMimeCertificateTrust; #define g_mime_2_6_unref(obj) /*ignore*/ #endif +/** + * Get last 16 hex digits of fingerprint ("keyid") + */ +const char *g_mime_certificate_get_fpr16 (GMimeCertificate *cert); /** * Return the contents of the appropriate address header as a string * Should be freed using g_free