diff options
author | Roger Dingledine <arma@torproject.org> | 2003-12-16 08:21:58 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2003-12-16 08:21:58 +0000 |
commit | 961ecf7abfc80571ab858099d1d4f6362b791ea0 (patch) | |
tree | e4535e6a65296391d1819ac8fceaebeef25e3b4d /src/or/test.c | |
parent | f3b165fdc0b945b5d30a81db7d818d2445487520 (diff) | |
download | tor-961ecf7abfc80571ab858099d1d4f6362b791ea0.tar.gz tor-961ecf7abfc80571ab858099d1d4f6362b791ea0.zip |
add H(K|1) to the onionskin reply
verify it at the client end
abstract the onionskin handshake lengths
breaks backward compatibility (again)
svn:r941
Diffstat (limited to 'src/or/test.c')
-rw-r--r-- | src/or/test.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/or/test.c b/src/or/test.c index a248141287..511cda861d 100644 --- a/src/or/test.c +++ b/src/or/test.c @@ -485,11 +485,11 @@ void test_onion_handshake() { /* client-side */ crypto_dh_env_t *c_dh = NULL; - char c_buf[DH_ONIONSKIN_LEN]; + char c_buf[ONIONSKIN_CHALLENGE_LEN]; char c_keys[40]; /* server-side */ - char s_buf[DH_KEY_LEN]; + char s_buf[ONIONSKIN_REPLY_LEN]; char s_keys[40]; /* shared */ @@ -499,11 +499,11 @@ test_onion_handshake() { test_assert(! crypto_pk_generate_key(pk)); /* client handshake 1. */ - memset(c_buf, 0, DH_ONIONSKIN_LEN); + memset(c_buf, 0, ONIONSKIN_CHALLENGE_LEN); test_assert(! onion_skin_create(pk, &c_dh, c_buf)); /* server handshake */ - memset(s_buf, 0, DH_KEY_LEN); + memset(s_buf, 0, ONIONSKIN_REPLY_LEN); memset(s_keys, 0, 40); test_assert(! onion_skin_server_handshake(c_buf, pk, s_buf, s_keys, 40)); |