#ifndef G_OS_WIN32
# include <sys/wait.h>
#endif
-#if (defined(__DragonFly__) || defined (__NetBSD__) || defined (__FreeBSD__) || defined (__OpenBSD__))
+#if (defined(__DragonFly__) || defined(SOLARIS) || defined (__NetBSD__) || defined (__FreeBSD__) || defined (__OpenBSD__))
# include <sys/signal.h>
#endif
#ifndef G_OS_WIN32
debug_print("op_verify err %s\n", gpgme_strerror(err));
privacy_set_error("%s", gpgme_strerror(err));
return GINT_TO_POINTER(-GPG_ERR_SYSTEM_ERROR);
-
}
status = gpgme_op_verify_result(ctx);
if (status && status->signatures == NULL) {
else
g_warning(_("PGP Core: Can't get key - no gpg-agent running."));
warned = TRUE;
+ } else {
+ return g_strdup_printf(_("The signature can't be checked - %s"),
+ gpgme_strerror(err));
}
if (key)
uname = extract_name(key->uids->uid);
while (sig) {
gpgme_user_id_t user = NULL;
gpgme_key_t key;
-
+ gpgme_error_t err;
const gchar *keytype, *keyid, *uid;
- gpgme_get_key(ctx, sig->fpr, &key, 0);
+ err = gpgme_get_key(ctx, sig->fpr, &key, 0);
+ if (err != GPG_ERR_NO_ERROR) {
+ key = NULL;
+ g_string_append_printf(siginfo,
+ _("Error checking signature: %s\n"),
+ gpgme_strerror(err));
+ goto bail;
+ }
if (key) {
user = key->uids;
keytype = gpgme_pubkey_algo_name(
case GPG_ERR_NO_ERROR:
case GPG_ERR_KEY_EXPIRED:
g_string_append_printf(siginfo,
- _("Good signature from \"%s\" (Trust: %s)\n"),
- uid, get_validity_str(sig->validity));
+ _("Good signature from uid \"%s\" (Validity: %s)\n"),
+ uid, get_validity_str(user->validity));
break;
case GPG_ERR_SIG_EXPIRED:
g_string_append_printf(siginfo,
- _("Expired signature from \"%s\"\n"),
- uid);
+ _("Expired signature from uid \"%s\" (Validity: %s)\n"),
+ uid, get_validity_str(user->validity));
break;
case GPG_ERR_BAD_SIGNATURE:
g_string_append_printf(siginfo,
user = user ? user->next : NULL;
while (user != NULL) {
g_string_append_printf(siginfo,
- _(" aka \"%s\"\n"),
- user->uid);
+ _(" uid \"%s\" (Validity: %s)\n"),
+ user->uid,
+ get_validity_str(user->validity));
j++;
user = user->next;
}
i++;
sig = sig->next;
}
-
+bail:
ret = siginfo->str;
g_string_free(siginfo, FALSE);
return ret;
#endif
if (!gpgme_get_engine_info(&engineInfo)) {
while (engineInfo) {
+#ifndef G_OS_WIN32
debug_print("GpgME Protocol: %s\n"
"Version: %s (req %s)\n"
"Executable: %s\n",
- gpgme_get_protocol_name(engineInfo->protocol),
+ gpgme_get_protocol_name(engineInfo->protocol) ? gpgme_get_protocol_name(engineInfo->protocol):"???",
engineInfo->version ? engineInfo->version:"???",
engineInfo->req_version ? engineInfo->req_version:"???",
engineInfo->file_name ? engineInfo->file_name:"???");
+#endif
if (engineInfo->protocol == GPGME_PROTOCOL_OpenPGP
&& gpgme_engine_check_version(engineInfo->protocol) !=
GPG_ERR_NO_ERROR) {