diff options
author | Sebastian Hahn <sebastian@torproject.org> | 2010-07-23 20:38:25 +0200 |
---|---|---|
committer | Sebastian Hahn <sebastian@torproject.org> | 2010-07-27 10:00:45 +0200 |
commit | f6852fe031e066f46337ea936a40e3e2720bc5ad (patch) | |
tree | dcec8d00f05d4360087fec8786de410110143b8a /src/or/onion.h | |
parent | af0c954bc5201e49b406332bea26ca4a71b32a94 (diff) | |
download | tor-f6852fe031e066f46337ea936a40e3e2720bc5ad.tar.gz tor-f6852fe031e066f46337ea936a40e3e2720bc5ad.zip |
Create onion.h
Diffstat (limited to 'src/or/onion.h')
-rw-r--r-- | src/or/onion.h | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/src/or/onion.h b/src/or/onion.h new file mode 100644 index 0000000000..e84dbb47be --- /dev/null +++ b/src/or/onion.h @@ -0,0 +1,48 @@ +/* Copyright (c) 2001 Matej Pfajfar. + * Copyright (c) 2001-2004, Roger Dingledine. + * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson. + * Copyright (c) 2007-2010, The Tor Project, Inc. */ +/* See LICENSE for licensing information */ + +/** + * \file onion.h + * \brief Header file for onion.c. + **/ + +#ifndef _TOR_ONION_H +#define _TOR_ONION_H + +int onion_pending_add(or_circuit_t *circ, char *onionskin); +or_circuit_t *onion_next_task(char **onionskin_out); +void onion_pending_remove(or_circuit_t *circ); + +int onion_skin_create(crypto_pk_env_t *router_key, + crypto_dh_env_t **handshake_state_out, + char *onion_skin_out); + +int onion_skin_server_handshake(const char *onion_skin, + crypto_pk_env_t *private_key, + crypto_pk_env_t *prev_private_key, + char *handshake_reply_out, + char *key_out, + size_t key_out_len); + +int onion_skin_client_handshake(crypto_dh_env_t *handshake_state, + const char *handshake_reply, + char *key_out, + size_t key_out_len); + +int fast_server_handshake(const char *key_in, + char *handshake_reply_out, + char *key_out, + size_t key_out_len); + +int fast_client_handshake(const char *handshake_state, + const char *handshake_reply_out, + char *key_out, + size_t key_out_len); + +void clear_pending_onions(void); + +#endif + |