diff options
author | Michael Vogt <michael.vogt@ubuntu.com> | 2012-09-04 14:15:17 +0200 |
---|---|---|
committer | Michael Vogt <michael.vogt@ubuntu.com> | 2012-09-04 14:15:17 +0200 |
commit | 2c76d72d412c1d7a2e615cd036f0730faa81dff7 (patch) | |
tree | 56d6ed27e80770557d9d1f60f98fee00f25129a1 /apt-pkg/indexcopy.cc | |
parent | 1efc8dbc3932d557880e37603be9a39a73a4d493 (diff) | |
parent | fe5804fc5010dd8f2e9406187bfc1f6afeb29c5a (diff) |
merged from lp:~donkult/apt/experimental
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 c97445326..16f2fee96 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 (!StartsWithGPGClearTextSignature(File)) return _error->Error(_("File %s doesn't start with a clearsigned message"), File.c_str()); - #undef SIGMSG } |