cert-cache: Prevent that a cached issuer is freed too early
authorTobias Brunner <tobias@strongswan.org>
Fri, 24 Oct 2014 09:14:51 +0000 (11:14 +0200)
committerTobias Brunner <tobias@strongswan.org>
Fri, 24 Oct 2014 09:23:04 +0000 (11:23 +0200)
commita9f87d118e3a573311d1f200fd5be82b3b2894bb
tree2a9609a409417fc30f79a1ef1297830d81868955
parente7c582e652edb6b8703e5aea7d67fcd46690747a
cert-cache: Prevent that a cached issuer is freed too early

Previously we got no reference to the cached issuer certificate
before releasing the lock of the cache line, this allowed other
threads, or even the same thread if it replaces a cache line, to
destroy that issuer certificate in cache() (or flush()) before
get_ref() for the issuer certificate is finally called.
src/libstrongswan/credentials/sets/cert_cache.c