document_signature_st.h 1.1 KB

1234567891011121314151617181920212223242526272829
  1. /* Copyright (c) 2001 Matej Pfajfar.
  2. * Copyright (c) 2001-2004, Roger Dingledine.
  3. * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
  4. * Copyright (c) 2007-2018, The Tor Project, Inc. */
  5. /* See LICENSE for licensing information */
  6. #ifndef DOCUMENT_SIGNATURE_ST_H
  7. #define DOCUMENT_SIGNATURE_ST_H
  8. /** A signature of some document by an authority. */
  9. struct document_signature_t {
  10. /** Declared SHA-1 digest of this voter's identity key */
  11. char identity_digest[DIGEST_LEN];
  12. /** Declared SHA-1 digest of signing key used by this voter. */
  13. char signing_key_digest[DIGEST_LEN];
  14. /** Algorithm used to compute the digest of the document. */
  15. digest_algorithm_t alg;
  16. /** Signature of the signed thing. */
  17. char *signature;
  18. /** Length of <b>signature</b> */
  19. int signature_len;
  20. unsigned int bad_signature : 1; /**< Set to true if we've tried to verify
  21. * the sig, and we know it's bad. */
  22. unsigned int good_signature : 1; /**< Set to true if we've verified the sig
  23. * as good. */
  24. };
  25. #endif