summaryrefslogtreecommitdiff
path: root/src/or
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2015-03-13 09:39:04 -0400
committerNick Mathewson <nickm@torproject.org>2015-03-13 09:39:04 -0400
commit833b6d30bec568660e3a9cdeacd1e8c2837f1a6a (patch)
tree9c787b62a46dd803c18bc27eebfc6059beea1482 /src/or
parent3ee2fca7ca6138916688d7d415a1091b8b3e1724 (diff)
parentbadc81de5bc60c5f53b3c1dd3cf9b1a819ff89c4 (diff)
downloadtor-833b6d30bec568660e3a9cdeacd1e8c2837f1a6a.tar.gz
tor-833b6d30bec568660e3a9cdeacd1e8c2837f1a6a.zip
Merge remote-tracking branch 'sebastian/bug15211'
Diffstat (limited to 'src/or')
-rw-r--r--src/or/control.c4
-rw-r--r--src/or/rendservice.c3
2 files changed, 4 insertions, 3 deletions
diff --git a/src/or/control.c b/src/or/control.c
index e25c3b2954..819a57f214 100644
--- a/src/or/control.c
+++ b/src/or/control.c
@@ -3102,8 +3102,8 @@ handle_control_authchallenge(control_connection_t *conn, uint32_t len,
tor_free(client_nonce);
return -1;
}
-
- tor_assert(!crypto_rand(server_nonce, SAFECOOKIE_SERVER_NONCE_LEN));
+ int fail = crypto_rand(server_nonce, SAFECOOKIE_SERVER_NONCE_LEN);
+ tor_assert(!fail);
/* Now compute and send the server-to-controller response, and the
* server's nonce. */
diff --git a/src/or/rendservice.c b/src/or/rendservice.c
index 036869650c..77eaea0ed9 100644
--- a/src/or/rendservice.c
+++ b/src/or/rendservice.c
@@ -3320,7 +3320,8 @@ rend_services_introduce(void)
intro = tor_malloc_zero(sizeof(rend_intro_point_t));
intro->extend_info = extend_info_from_node(node, 0);
intro->intro_key = crypto_pk_new();
- tor_assert(!crypto_pk_generate_key(intro->intro_key));
+ int fail = crypto_pk_generate_key(intro->intro_key);
+ tor_assert(!fail);
intro->time_published = -1;
intro->time_to_expire = -1;
intro->time_expiring = -1;