summaryrefslogtreecommitdiff
path: root/src/or/onion.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2010-12-15 22:47:28 -0500
committerNick Mathewson <nickm@torproject.org>2010-12-15 22:48:23 -0500
commitb5e293afe6b3c98b50c23cc443969b5f840dca32 (patch)
tree803a93a09d717782452108ab21ab2cac6a732f26 /src/or/onion.c
parentddfb398494ddf9d514a3ff16ade69c619c659ce7 (diff)
parentb0def605a52b3acce1cb212f270b184d72f237f5 (diff)
downloadtor-b5e293afe6b3c98b50c23cc443969b5f840dca32.tar.gz
tor-b5e293afe6b3c98b50c23cc443969b5f840dca32.zip
Merge remote branch fix_security_bug_021 into fix_security_bug_022
Conflicts: src/common/memarea.c src/or/or.h src/or/rendclient.c
Diffstat (limited to 'src/or/onion.c')
-rw-r--r--src/or/onion.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/or/onion.c b/src/or/onion.c
index fa001656e6..4d14f9095b 100644
--- a/src/or/onion.c
+++ b/src/or/onion.c
@@ -349,9 +349,9 @@ onion_skin_client_handshake(crypto_dh_env_t *handshake_state,
* Return 0 on success, &lt;0 on failure.
**/
int
-fast_server_handshake(const char *key_in, /* DIGEST_LEN bytes */
- char *handshake_reply_out, /* DIGEST_LEN*2 bytes */
- char *key_out,
+fast_server_handshake(const uint8_t *key_in, /* DIGEST_LEN bytes */
+ uint8_t *handshake_reply_out, /* DIGEST_LEN*2 bytes */
+ uint8_t *key_out,
size_t key_out_len)
{
char tmp[DIGEST_LEN+DIGEST_LEN];
@@ -359,7 +359,7 @@ fast_server_handshake(const char *key_in, /* DIGEST_LEN bytes */
size_t out_len;
int r = -1;
- if (crypto_rand(handshake_reply_out, DIGEST_LEN)<0)
+ if (crypto_rand((char*)handshake_reply_out, DIGEST_LEN)<0)
return -1;
memcpy(tmp, key_in, DIGEST_LEN);
@@ -392,9 +392,9 @@ fast_server_handshake(const char *key_in, /* DIGEST_LEN bytes */
* and protected by TLS).
*/
int
-fast_client_handshake(const char *handshake_state, /* DIGEST_LEN bytes */
- const char *handshake_reply_out, /* DIGEST_LEN*2 bytes */
- char *key_out,
+fast_client_handshake(const uint8_t *handshake_state, /* DIGEST_LEN bytes */
+ const uint8_t *handshake_reply_out, /* DIGEST_LEN*2 bytes */
+ uint8_t *key_out,
size_t key_out_len)
{
char tmp[DIGEST_LEN+DIGEST_LEN];