or_handshake_certs_st.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  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-2019, The Tor Project, Inc. */
  5. /* See LICENSE for licensing information */
  6. #ifndef OR_HANDSHAKE_CERTS_ST
  7. #define OR_HANDSHAKE_CERTS_ST
  8. struct tor_x509_cert_t;
  9. /** Structure to hold all the certificates we've received on an OR connection
  10. */
  11. struct or_handshake_certs_t {
  12. /** True iff we originated this connection. */
  13. int started_here;
  14. /** The cert for the 'auth' RSA key that's supposed to sign the AUTHENTICATE
  15. * cell. Signed with the RSA identity key. */
  16. struct tor_x509_cert_t *auth_cert;
  17. /** The cert for the 'link' RSA key that was used to negotiate the TLS
  18. * connection. Signed with the RSA identity key. */
  19. struct tor_x509_cert_t *link_cert;
  20. /** A self-signed identity certificate: the RSA identity key signed
  21. * with itself. */
  22. struct tor_x509_cert_t *id_cert;
  23. /** The Ed25519 signing key, signed with the Ed25519 identity key. */
  24. struct tor_cert_st *ed_id_sign;
  25. /** A digest of the X509 link certificate for the TLS connection, signed
  26. * with the Ed25519 siging key. */
  27. struct tor_cert_st *ed_sign_link;
  28. /** The Ed25519 authentication key (that's supposed to sign an AUTHENTICATE
  29. * cell) , signed with the Ed25519 siging key. */
  30. struct tor_cert_st *ed_sign_auth;
  31. /** The Ed25519 identity key, crosssigned with the RSA identity key. */
  32. uint8_t *ed_rsa_crosscert;
  33. /** The length of <b>ed_rsa_crosscert</b> in bytes */
  34. size_t ed_rsa_crosscert_len;
  35. };
  36. #endif