diff options
author | Michael Vogt <michael.vogt@ubuntu.com> | 2012-07-10 13:26:11 +0200 |
---|---|---|
committer | Michael Vogt <michael.vogt@ubuntu.com> | 2012-07-10 13:26:11 +0200 |
commit | 5a8cd0703bcc751ff5eb0ae5bf196e61bd428c91 (patch) | |
tree | 32003c19a929dc317a2049dbd1a2422ab977894e /apt-pkg/indexcopy.cc | |
parent | 3ce22d4f714414d6deb8b044c5b08a8fe7a78967 (diff) | |
parent | 479a2beb0f5605652689d74a78dd224b69ba2e8f (diff) |
merged the relevant bits from lp:~mvo/apt/lp346386
Diffstat (limited to 'apt-pkg/indexcopy.cc')
-rw-r--r-- | apt-pkg/indexcopy.cc | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/apt-pkg/indexcopy.cc b/apt-pkg/indexcopy.cc index e29e2819c..db3d10ecd 100644 --- a/apt-pkg/indexcopy.cc +++ b/apt-pkg/indexcopy.cc @@ -648,16 +648,12 @@ bool SigVerify::RunGPGV(std::string const &File, std::string const &FileGPG, { if (File == FileGPG) { - #define SIGMSG "-----BEGIN PGP SIGNED MESSAGE-----\n" - char buffer[sizeof(SIGMSG)]; FILE* gpg = fopen(File.c_str(), "r"); if (gpg == NULL) return _error->Errno("RunGPGV", _("Could not open file %s"), File.c_str()); - char const * const test = fgets(buffer, sizeof(buffer), gpg); fclose(gpg); - if (test == NULL || strcmp(buffer, SIGMSG) != 0) + if (!IsPgpClearTextSignature(File)) return _error->Error(_("File %s doesn't start with a clearsigned message"), File.c_str()); - #undef SIGMSG } |