diff options
author | Nick Mathewson <nickm@torproject.org> | 2015-11-25 22:33:49 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2015-11-25 22:33:49 -0500 |
commit | e5754c42d124549b3fd8e8d7c11d4dde3b5acec1 (patch) | |
tree | b0ff2b0c1f4cfb44f087df8d062e3a56fd766046 /src/or/rendcommon.c | |
parent | c875265bbbddc50674f65169ee49d5612bef72a7 (diff) | |
parent | 943369f927967268cacd2067ccae0bc5f1c5835e (diff) | |
download | tor-e5754c42d124549b3fd8e8d7c11d4dde3b5acec1.tar.gz tor-e5754c42d124549b3fd8e8d7c11d4dde3b5acec1.zip |
Merge branch 'bug17686_v2_027'
Diffstat (limited to 'src/or/rendcommon.c')
-rw-r--r-- | src/or/rendcommon.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/src/or/rendcommon.c b/src/or/rendcommon.c index f9d47d13f5..8c02b67556 100644 --- a/src/or/rendcommon.c +++ b/src/or/rendcommon.c @@ -269,11 +269,7 @@ rend_encrypt_v2_intro_points_basic(char **encrypted_out, tor_assert(client_cookies && smartlist_len(client_cookies) > 0); /* Generate session key. */ - if (crypto_rand(session_key, CIPHER_KEY_LEN) < 0) { - log_warn(LD_REND, "Unable to generate random session key to encrypt " - "introduction point string."); - goto done; - } + crypto_rand(session_key, CIPHER_KEY_LEN); /* Determine length of encrypted introduction points including session * keys. */ @@ -335,11 +331,7 @@ rend_encrypt_v2_intro_points_basic(char **encrypted_out, REND_BASIC_AUTH_CLIENT_MULTIPLE; i < REND_BASIC_AUTH_CLIENT_MULTIPLE - 1; i++) { client_part = tor_malloc_zero(REND_BASIC_AUTH_CLIENT_ENTRY_LEN); - if (crypto_rand(client_part, REND_BASIC_AUTH_CLIENT_ENTRY_LEN) < 0) { - log_warn(LD_REND, "Unable to generate fake client entry."); - tor_free(client_part); - goto done; - } + crypto_rand(client_part, REND_BASIC_AUTH_CLIENT_ENTRY_LEN); smartlist_add(encrypted_session_keys, client_part); } /* Sort smartlist and put elements in result in order. */ |