usign-exec: fix exec error handling
[oweals/ucert.git] / usign.h
diff --git a/usign.h b/usign.h
index de52f1783e59a028a92e5a98ccb64b2f3c5e8888..9c3207aa97ed602499f2dc89c495856227d9539e 100644 (file)
--- a/usign.h
+++ b/usign.h
@@ -1,12 +1,51 @@
+/*
+ * usign/signify API header
+ * Copyright (C) 2018 Daniel Golle <daniel@makrotopia.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 3
+ * as published by the Free Software Foundation
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+
+#ifndef _USIGN_H
+#define _USIGN_H
+
+#include <stdbool.h>
+
+/**
+ * Verify
+ *
+ * calls: usign -V ...
+ */
 int usign_v(const char *msgfile, const char *pubkeyfile,
            const char *pubkeydir, const char *sigfile, bool quiet);
 
+/**
+ * Sign
+ *
+ * calls: usign -S ...
+ */
 int usign_s(const char *msgfile, const char *seckeyfile, const char *sigfile, bool quiet);
 
-int usign_f_pubkey(char *fingerprint, const char *pubkeyfile);
+/**
+ * Fingerprint {pubkey, seckey, sig}
+ *
+ * calls: usign -F ...
+ */
+int usign_f_pubkey(char *fingerprint, const char *pubkeyfile, bool quiet);
 
-int usign_f_seckey(char *fingerprint, const char *seckeyfile);
+int usign_f_seckey(char *fingerprint, const char *seckeyfile, bool quiet);
 
-int usign_f_sig(char *fingerprint, const char *sigfile);
+int usign_f_sig(char *fingerprint, const char *sigfile, bool quiet);
 
+/**
+ * custom extension to check for revokers
+ */
 int _usign_key_is_revoked(const char *fingerprint, const char *pubkeydir);
+
+#endif /* _USIGN_H */