diff options
author | Robert Ransom <rransom.8774@gmail.com> | 2012-09-17 10:23:23 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2012-09-17 11:02:53 -0400 |
commit | cd884c764b2e8c5b1127829706de59a71b362b4c (patch) | |
tree | 711d3bbed8efcd92340bf49e8f1e3104c554ca51 /src/common | |
parent | 62babcaf0a88edb081529977981cf8865b32ea21 (diff) | |
download | tor-cd884c764b2e8c5b1127829706de59a71b362b4c.tar tor-cd884c764b2e8c5b1127829706de59a71b362b4c.tar.gz |
Fix documentation for crypto_pk_cmp_keys
Now that crypto_pk_cmp_keys might return the result of tor_memcmp, there
is no guarantee that it will only return -1, 0, or 1. (It currently does
only return -1, 0, or 1, but that's a lucky accident due to details of the
current implementation of tor_memcmp and the particular input given to it.)
Fortunately, none of crypto_pk_cmp_keys's callers rely on this behaviour,
so changing its documentation is sufficient.
Diffstat (limited to 'src/common')
-rw-r--r-- | src/common/crypto.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/common/crypto.c b/src/common/crypto.c index 283b00575..5cab05843 100644 --- a/src/common/crypto.c +++ b/src/common/crypto.c @@ -748,9 +748,9 @@ crypto_pk_public_exponent_ok(crypto_pk_t *env) return BN_is_word(env->key->e, 65537); } -/** Compare the public-key components of a and b. Return -1 if a\<b, - * 0 if a==b, and 1 if a\>b. A NULL key is considered to be less than - * all non-NULL keys, and equal to itself. +/** Compare the public-key components of a and b. Return less than 0 + * if a\<b, 0 if a==b, and greater than 0 if a\>b. A NULL key is + * considered to be less than all non-NULL keys, and equal to itself. * * Note that this may leak information about the keys through timing. */ |