usign.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /*
  2. * usign/signify API header
  3. * Copyright (C) 2018 Daniel Golle <daniel@makrotopia.org>
  4. *
  5. * This program is free software; you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License version 3
  7. * as published by the Free Software Foundation
  8. *
  9. * This program is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU General Public License for more details.
  13. */
  14. #ifndef _USIGN_H
  15. #define _USIGN_H
  16. /**
  17. * Verify
  18. *
  19. * calls: usign -V ...
  20. */
  21. int usign_v(const char *msgfile, const char *pubkeyfile,
  22. const char *pubkeydir, const char *sigfile, bool quiet);
  23. /**
  24. * Sign
  25. *
  26. * calls: usign -S ...
  27. */
  28. int usign_s(const char *msgfile, const char *seckeyfile, const char *sigfile, bool quiet);
  29. /**
  30. * Fingerprint {pubkey, seckey, sig}
  31. *
  32. * calls: usign -F ...
  33. */
  34. int usign_f_pubkey(char *fingerprint, const char *pubkeyfile);
  35. int usign_f_seckey(char *fingerprint, const char *seckeyfile);
  36. int usign_f_sig(char *fingerprint, const char *sigfile);
  37. /**
  38. * custom extension to check for revokers
  39. */
  40. int _usign_key_is_revoked(const char *fingerprint, const char *pubkeydir);
  41. #endif /* _USIGN_H */