// if we expect a ClearTextSignature (InRelase), ensure that
// this is what we get and if not fail to queue a
// Release/Release.gpg, see #346386
- if (SigFile == DestFile &&
- !IsPgpClearTextSignature(DestFile))
+ if (SigFile == DestFile && !StartsWithGPGClearTextSignature(DestFile))
{
Failed(Message, Cfg);
return;
}
/*}}}*/
-// IsPgpClearTextSignature - Check if a file is Pgp/GPG clearsigned /*{{{*/
+// StartsWithGPGClearTextSignature - Check if a file is Pgp/GPG clearsigned /*{{{*/
// ---------------------------------------------------------------------
/* */
-bool IsPgpClearTextSignature(string const &FileName)
+bool StartsWithGPGClearTextSignature(string const &FileName)
{
static const char* SIGMSG = "-----BEGIN PGP SIGNED MESSAGE-----\n";
char buffer[strlen(SIGMSG)+1];
bool ExecWait(pid_t Pid,const char *Name,bool Reap = false);
// check if the given file starts with a PGP cleartext signature
-bool IsPgpClearTextSignature(std::string const &FileName);
+bool StartsWithGPGClearTextSignature(std::string const &FileName);
// File string manipulators
std::string flNotDir(std::string File);
if (gpg == NULL)
return _error->Errno("RunGPGV", _("Could not open file %s"), File.c_str());
fclose(gpg);
- if (!IsPgpClearTextSignature(File))
+ if (!StartsWithGPGClearTextSignature(File))
return _error->Error(_("File %s doesn't start with a clearsigned message"), File.c_str());
}