diff options
author | Roger Dingledine <arma@torproject.org> | 2004-11-02 02:28:51 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2004-11-02 02:28:51 +0000 |
commit | 85c79ffbc7b965355c3b51cc81000d517089e74e (patch) | |
tree | eafeb903a90d64be26fb900f567528caa1916b5b /src/or/routerparse.c | |
parent | 1433a0b26fcc1e48ac8001c5438e00d140dbf2a9 (diff) | |
download | tor-85c79ffbc7b965355c3b51cc81000d517089e74e.tar.gz tor-85c79ffbc7b965355c3b51cc81000d517089e74e.zip |
canonicalize "src" and "dest" arg order in crypto.c (and others)
svn:r2644
Diffstat (limited to 'src/or/routerparse.c')
-rw-r--r-- | src/or/routerparse.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/or/routerparse.c b/src/or/routerparse.c index 9a792292f5..aaed573498 100644 --- a/src/or/routerparse.c +++ b/src/or/routerparse.c @@ -654,7 +654,7 @@ static int check_directory_signature(const char *digest, tor_assert(_pkey); - if (crypto_pk_public_checksig(_pkey, tok->object_body, 128, signed_digest) + if (crypto_pk_public_checksig(_pkey, signed_digest, tok->object_body, 128) != 20) { log_fn(LOG_WARN, "Error reading directory: invalid signature."); return -1; @@ -903,8 +903,8 @@ routerinfo_t *router_parse_entry_from_string(const char *s, log_fn(LOG_WARN, "Bad object type or length on router signature"); goto err; } - if ((t=crypto_pk_public_checksig(router->identity_pkey, tok->object_body, - 128, signed_digest)) != 20) { + if ((t=crypto_pk_public_checksig(router->identity_pkey, signed_digest, + tok->object_body, 128)) != 20) { log_fn(LOG_WARN, "Invalid signature %d",t); goto err; } if (memcmp(digest, signed_digest, 20)) { @@ -1377,7 +1377,7 @@ static int router_get_hash_impl(const char *s, char *digest, } ++end; - if (crypto_digest(start, end-start, digest)) { + if (crypto_digest(digest, start, end-start)) { log_fn(LOG_WARN,"couldn't compute digest"); return -1; } |