diff options
author | Nick Mathewson <nickm@torproject.org> | 2009-08-20 12:03:32 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2009-08-20 12:03:32 -0400 |
commit | 5da3b45fdce8354e320df91b26a170b21291c32e (patch) | |
tree | 5f3317ef37d10174997d6c9bd8558a51f1db2e08 /src/common | |
parent | 8771fdfda49124e46f155a396778649946a894b9 (diff) | |
download | tor-5da3b45fdce8354e320df91b26a170b21291c32e.tar.gz tor-5da3b45fdce8354e320df91b26a170b21291c32e.zip |
Make crypto_digest_get_digest nondestructive again.
Fixes bug in f57883a39.
Diffstat (limited to 'src/common')
-rw-r--r-- | src/common/crypto.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/common/crypto.c b/src/common/crypto.c index dc645b5eda..4a61d3faf3 100644 --- a/src/common/crypto.c +++ b/src/common/crypto.c @@ -1510,11 +1510,11 @@ crypto_digest_get_digest(crypto_digest_env_t *digest, switch (digest->algorithm) { case DIGEST_SHA1: tor_assert(out_len <= DIGEST_LEN); - SHA1_Final(r, &digest->d.sha1); + SHA1_Final(r, &tmpenv.d.sha1); break; case DIGEST_SHA256: tor_assert(out_len <= DIGEST256_LEN); - SHA256_Final(r, &digest->d.sha2); + SHA256_Final(r, &tmpenv.d.sha2); break; default: tor_fragile_assert(); |