tor

The Tor anonymity network
git clone https://git.dasho.dev/tor.git
Log | Files | Refs | README | LICENSE

document_signature_st.h (1207B)


      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-2021, The Tor Project, Inc. */
      5 /* See LICENSE for licensing information */
      6 
      7 /**
      8 * @file document_signature_st.h
      9 * @brief Authority signature structure
     10 **/
     11 
     12 #ifndef DOCUMENT_SIGNATURE_ST_H
     13 #define DOCUMENT_SIGNATURE_ST_H
     14 
     15 /** A signature of some document by an authority. */
     16 struct document_signature_t {
     17  /** Declared SHA-1 digest of this voter's identity key */
     18  char identity_digest[DIGEST_LEN];
     19  /** Declared SHA-1 digest of signing key used by this voter. */
     20  char signing_key_digest[DIGEST_LEN];
     21  /** Algorithm used to compute the digest of the document. */
     22  digest_algorithm_t alg;
     23  /** Signature of the signed thing. */
     24  char *signature;
     25  /** Length of <b>signature</b> */
     26  int signature_len;
     27  unsigned int bad_signature : 1; /**< Set to true if we've tried to verify
     28                                   * the sig, and we know it's bad. */
     29  unsigned int good_signature : 1; /**< Set to true if we've verified the sig
     30                                     * as good. */
     31 };
     32 
     33 #endif /* !defined(DOCUMENT_SIGNATURE_ST_H) */