From: Paul Date: Thu, 26 Jun 2014 04:19:11 +0000 (+0100) Subject: show owner trust in full info X-Git-Tag: 3.11.0~73 X-Git-Url: http://git.claws-mail.org/?p=claws.git;a=commitdiff_plain;h=f146a82069d03ca436712096482a33f4f4991abf show owner trust in full info --- diff --git a/src/plugins/pgpcore/sgpgme.c b/src/plugins/pgpcore/sgpgme.c index b95ad7a77..e6b7acbc6 100644 --- a/src/plugins/pgpcore/sgpgme.c +++ b/src/plugins/pgpcore/sgpgme.c @@ -153,6 +153,22 @@ static const gchar *get_validity_str(unsigned long validity) } } +static const gchar *get_owner_trust_str(unsigned long owner_trust) +{ + switch (gpgme_err_code(owner_trust)) { + case GPGME_VALIDITY_NEVER: + return _("Untrusted"); + case GPGME_VALIDITY_MARGINAL: + return _("Marginal"); + case GPGME_VALIDITY_FULL: + return _("Full"); + case GPGME_VALIDITY_ULTIMATE: + return _("Ultimate"); + default: + return _("Unknown"); + } +} + static gchar *extract_name(const char *uid) { if (uid == NULL) @@ -330,6 +346,8 @@ gchar *sgpgme_sigstat_info_full(gpgme_ctx_t ctx, gpgme_verify_result_t status) j++; user = user->next; } + g_string_append_printf(siginfo,_("Owner Trust: %s\n"), + get_owner_trust_str(key->owner_trust)); g_string_append(siginfo, _("Primary key fingerprint:")); const char* primary_fpr = NULL;