summaryrefslogtreecommitdiff
path: root/apt-pkg/contrib/gpgv.h
diff options
context:
space:
mode:
Diffstat (limited to 'apt-pkg/contrib/gpgv.h')
-rw-r--r--apt-pkg/contrib/gpgv.h26
1 files changed, 20 insertions, 6 deletions
diff --git a/apt-pkg/contrib/gpgv.h b/apt-pkg/contrib/gpgv.h
index c15166c94..8aeea2fb3 100644
--- a/apt-pkg/contrib/gpgv.h
+++ b/apt-pkg/contrib/gpgv.h
@@ -11,14 +11,28 @@
#include <string>
-/** \brief generates and run the command to verify a file with gpgv */
-bool ExecGPGV(std::string const &File, std::string const &FileOut,
- int const &statusfd, int fd[2]);
+#if __GNUC__ >= 4
+ #define APT_noreturn __attribute__ ((noreturn))
+#else
+ #define APT_noreturn /* no support */
+#endif
-inline bool ExecGPGV(std::string const &File, std::string const &FileOut,
+/** \brief generates and run the command to verify a file with gpgv
+ *
+ * If File and FileSig specify the same file it is assumed that we
+ * deal with a clear-signed message.
+ *
+ * @param File is the message (unsigned or clear-signed)
+ * @param FileSig is the signature (detached or clear-signed)
+ */
+void ExecGPGV(std::string const &File, std::string const &FileSig,
+ int const &statusfd, int fd[2]) APT_noreturn;
+inline void ExecGPGV(std::string const &File, std::string const &FileSig,
int const &statusfd = -1) {
int fd[2];
- return ExecGPGV(File, FileOut, statusfd, fd);
-}
+ ExecGPGV(File, FileSig, statusfd, fd);
+};
+
+#undef APT_noreturn
#endif