]> git.ipfire.org Git - thirdparty/squid.git/commit
SourceLayout: Move the Runner which manages SSL SessionCache to libsecurity
authorAmos Jeffries <squid3@treenet.co.nz>
Wed, 17 Feb 2016 21:03:29 +0000 (10:03 +1300)
committerAmos Jeffries <squid3@treenet.co.nz>
Wed, 17 Feb 2016 21:03:29 +0000 (10:03 +1300)
commit824d4656ffebfdd4289adbdcde1f8be42795350b
tree52b8f1d2b2eadfbb10795f85c6c8b825edddcd09
parent404063c59bb4ffa6c5a005611c4375f82ddd423f
SourceLayout: Move the Runner which manages SSL SessionCache to libsecurity

Unfortunately the OpenSSL session cache callbacks cannot also be moved
due to circular dependency issues. However, when those are resolved by
later libsecurity API additions the callbacks will be much easier to
shift. For now the three symbols shared between the two libraries are
exposed by libsslsquid in the Ssl:: namespace.

Cache initialization is now moved into the Runner. Binding its state
initialization more tightly to the memory allocation and initialization.
Which also removes the need for explicit main.cc dependency.

One issue was uncovered during this:

* While ssl/support.h was defining a destruct_session_cache() function
that appeared to release the cache memory, it was not actually being
used anywhere. Which unless a fortuitous sequence of events is happening
means that the memory for the cache entries may not be released properly.
On the other hand the cache should only be erased on shutdown so the
effects of this are minor.

The unused function has been removed and the issue is now expicitly
noted in the Runner shutdown handling method for future investigation.
src/main.cc
src/security/Makefile.am
src/security/Session.cc [new file with mode: 0644]
src/ssl/support.cc
src/ssl/support.h
src/tests/stub_libsslsquid.cc