diff options
Diffstat (limited to 'src/libostree/ostree-gpg-verifier.c')
-rw-r--r-- | src/libostree/ostree-gpg-verifier.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/libostree/ostree-gpg-verifier.c b/src/libostree/ostree-gpg-verifier.c index 99756e2b..d7778cf0 100644 --- a/src/libostree/ostree-gpg-verifier.c +++ b/src/libostree/ostree-gpg-verifier.c @@ -187,14 +187,14 @@ _ostree_gpg_verifier_check_signature (OstreeGpgVerifier *self, gpg_error = gpgme_data_new_from_fd (&kdata, fd); if (gpg_error != GPG_ERR_NO_ERROR) { - ot_gpgme_error_to_gio_error (gpg_error, error); + ot_gpgme_throw (gpg_error, error, "Loading data from fd %i", fd); goto out; } gpg_error = gpgme_op_import (result->context, kdata); if (gpg_error != GPG_ERR_NO_ERROR) { - ot_gpgme_error_to_gio_error (gpg_error, error); + ot_gpgme_throw (gpg_error, error, "Failed to import key"); goto out; } } @@ -212,8 +212,7 @@ _ostree_gpg_verifier_check_signature (OstreeGpgVerifier *self, 0 /* do not copy */); if (gpg_error != GPG_ERR_NO_ERROR) { - ot_gpgme_error_to_gio_error (gpg_error, error); - g_prefix_error (error, "Unable to read signed data: "); + ot_gpgme_throw (gpg_error, error, "Unable to read signed data"); goto out; } @@ -223,16 +222,14 @@ _ostree_gpg_verifier_check_signature (OstreeGpgVerifier *self, 0 /* do not copy */); if (gpg_error != GPG_ERR_NO_ERROR) { - ot_gpgme_error_to_gio_error (gpg_error, error); - g_prefix_error (error, "Unable to read signature: "); + ot_gpgme_throw (gpg_error, error, "Unable to read signature"); goto out; } gpg_error = gpgme_op_verify (result->context, signature_buffer, data_buffer, NULL); if (gpg_error != GPG_ERR_NO_ERROR) { - ot_gpgme_error_to_gio_error (gpg_error, error); - g_prefix_error (error, "Unable to complete signature verification: "); + ot_gpgme_throw (gpg_error, error, "Unable to complete signature verification"); goto out; } |