hs_intropoint.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /* Copyright (c) 2016, The Tor Project, Inc. */
  2. /* See LICENSE for licensing information */
  3. /**
  4. * \file hs_intropoint.h
  5. * \brief Header file for hs_intropoint.c.
  6. **/
  7. #ifndef TOR_HS_INTRO_H
  8. #define TOR_HS_INTRO_H
  9. /* Authentication key type in an ESTABLISH_INTRO cell. */
  10. enum hs_intro_auth_key_type {
  11. HS_INTRO_AUTH_KEY_TYPE_LEGACY0 = 0x00,
  12. HS_INTRO_AUTH_KEY_TYPE_LEGACY1 = 0x01,
  13. HS_INTRO_AUTH_KEY_TYPE_ED25519 = 0x02,
  14. };
  15. int hs_intro_received_establish_intro(or_circuit_t *circ, const uint8_t *request,
  16. size_t request_len);
  17. MOCK_DECL(int, hs_intro_send_intro_established_cell,(or_circuit_t *circ));
  18. /* also used by rendservice.c */
  19. int hs_intro_circuit_is_suitable(const or_circuit_t *circ);
  20. #ifdef HS_INTROPOINT_PRIVATE
  21. STATIC int
  22. verify_establish_intro_cell(const hs_cell_establish_intro_t *out,
  23. const uint8_t *circuit_key_material,
  24. size_t circuit_key_material_len);
  25. STATIC void
  26. get_auth_key_from_establish_intro_cell(ed25519_public_key_t *auth_key_out,
  27. const hs_cell_establish_intro_t *cell);
  28. #endif /* HS_INTROPOINT_PRIVATE */
  29. #endif /* TOR_HS_INTRO_H */