summaryrefslogtreecommitdiff
path: root/methods/gpgv.cc
diff options
context:
space:
mode:
authorMichael Vogt <mvo@ubuntu.com>2013-07-02 16:53:45 +0200
committerMichael Vogt <mvo@ubuntu.com>2013-07-02 16:53:45 +0200
commit56363109dac51dffb6ec8491728e0bc934a15fa1 (patch)
tree90db7c6af4ea25028df6c2731a57b0724fc3c626 /methods/gpgv.cc
parent3599bca5211077f5456a40adb5cec1bcbee8c3ae (diff)
parent4b8528bd5749f759e924534709a620da67cd40f8 (diff)
merged debian/sid branch from git.debian.org
Diffstat (limited to 'methods/gpgv.cc')
-rw-r--r--methods/gpgv.cc16
1 files changed, 7 insertions, 9 deletions
diff --git a/methods/gpgv.cc b/methods/gpgv.cc
index 3f814b9f0..fe8bac6c9 100644
--- a/methods/gpgv.cc
+++ b/methods/gpgv.cc
@@ -55,9 +55,6 @@ string GPGVMethod::VerifyGetSigners(const char *file, const char *outfile,
vector<string> &NoPubKeySigners)
{
bool const Debug = _config->FindB("Debug::Acquire::gpgv", false);
- // setup a (empty) stringstream for formating the return value
- std::stringstream ret;
- ret.str("");
if (Debug == true)
std::clog << "inside VerifyGetSigners" << std::endl;
@@ -170,18 +167,19 @@ string GPGVMethod::VerifyGetSigners(const char *file, const char *outfile,
return "";
}
else if (WEXITSTATUS(status) == 1)
- {
return _("At least one invalid signature was encountered.");
- }
else if (WEXITSTATUS(status) == 111)
+ return _("Could not execute 'gpgv' to verify signature (is gpgv installed?)");
+ else if (WEXITSTATUS(status) == 112)
{
- ioprintf(ret, _("Could not execute 'gpgv' to verify signature (is gpgv installed?)"));
- return ret.str();
+ // acquire system checks for "NODATA" to generate GPG errors (the others are only warnings)
+ std::string errmsg;
+ //TRANSLATORS: %s is a single techy word like 'NODATA'
+ strprintf(errmsg, _("Clearsigned file isn't valid, got '%s' (does the network require authentication?)"), "NODATA");
+ return errmsg;
}
else
- {
return _("Unknown error executing gpgv");
- }
}
bool GPGVMethod::Fetch(FetchItem *Itm)