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-2011, The Tor Project, Inc. */
5 /* See LICENSE for licensing information */
9 * \brief Header file for onion.c.
15 int onion_pending_add(or_circuit_t
*circ
, char *onionskin
);
16 or_circuit_t
*onion_next_task(char **onionskin_out
);
17 void onion_pending_remove(or_circuit_t
*circ
);
19 int onion_skin_create(crypto_pk_env_t
*router_key
,
20 crypto_dh_env_t
**handshake_state_out
,
21 char *onion_skin_out
);
23 int onion_skin_server_handshake(const char *onion_skin
,
24 crypto_pk_env_t
*private_key
,
25 crypto_pk_env_t
*prev_private_key
,
26 char *handshake_reply_out
,
30 int onion_skin_client_handshake(crypto_dh_env_t
*handshake_state
,
31 const char *handshake_reply
,
35 int fast_server_handshake(const uint8_t *key_in
,
36 uint8_t *handshake_reply_out
,
40 int fast_client_handshake(const uint8_t *handshake_state
,
41 const uint8_t *handshake_reply_out
,
45 void clear_pending_onions(void);