tor/src/tools
Nick Mathewson 9b18b215bb Work around a behavior change in openssl's BUF_MEM code
In our code to write public keys to a string, for some unfathomable
reason since 253f0f160e, we would allocate a memory BIO, then
set the NOCLOSE flag on it, extract its memory buffer, and free it.
Then a little while later we'd free the memory buffer with
BUF_MEM_free().

As of openssl 1.1 this doesn't work any more, since there is now a
BIO_BUF_MEM structure that wraps the BUF_MEM structure.  This
BIO_BUF_MEM doesn't get freed in our code.

So, we had a memory leak!

Is this an openssl bug?  Maybe.  But our code was already pretty
silly.  Why mess around with the NOCLOSE flag here when we can just
keep the BIO object around until we don't need the buffer any more?

Fixes bug 20553; bugfix on 0.0.2pre8
2016-11-03 10:51:10 -04:00
..
tor-fw-helper Update tor-fw-helper URL 2015-08-05 15:07:13 -04:00
Makefile.nmake Add a missing part of bug 7311's makefile.nmake tweaks 2013-01-17 10:01:22 -05:00
include.am Add the SHA-3 hash functions to common/crypto.h. 2015-12-19 22:44:05 +00:00
tor-checkkey.c Bug19499: Fix GCC warnings when building against bleeding edge OpenSSL. 2016-06-24 22:20:41 +00:00
tor-gencert.c Work around a behavior change in openssl's BUF_MEM code 2016-11-03 10:51:10 -04:00
tor-resolve.c Remove -F from tor-resolve(1) usage message. 2015-08-30 21:57:24 +03:00