summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-01-24 12:33:13 -0500
committerNick Mathewson <nickm@torproject.org>2018-01-25 13:59:55 -0500
commit91c63aae8497bc9de6533daae8f927ca09f96fd2 (patch)
treeb85f7133597089046353ef5a94ce3d5fd2051c23 /configure.ac
parent7a74b3663fdaa40fc84e48990d15953a8f46a2bf (diff)
downloadtor-91c63aae8497bc9de6533daae8f927ca09f96fd2.tar.gz
tor-91c63aae8497bc9de6533daae8f927ca09f96fd2.zip
In relay_digest_matches(), use stack instead of heap.
We'd been using crypto_digest_dup() and crypto_digest_assign() here, but they aren't necessary. Instead we can just use the stack to store the previous state of the SHA_CTX and avoid a malloc/free pair. Closes ticket 24914.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac4
1 files changed, 4 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 3cb187b0e9..0ba4c4652d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -834,6 +834,10 @@ AC_CHECK_MEMBERS([SSL.state], , ,
[#include <openssl/ssl.h>
])
+AC_CHECK_SIZEOF(SHA_CTX, , [AC_INCLUDES_DEFAULT()
+#include <openssl/sha.h>
+])
+
dnl Define the set of checks for KIST scheduler support.
AC_DEFUN([CHECK_KIST_SUPPORT],[
dnl KIST needs struct tcp_info and for certain members to exist.