Motivation:
The KeyLogCallbackManager belongs on an SSLContext, and so may be
invoked from multiple threads. However, it incorrectly cached a
ByteBuffer on its storage, leading to thread unsafety. This tends to
manifest in assertion failures, but could lead to arbitrary data
corruption or double frees.
Modifications:
- Remove the cached bytebuffer.
- Add probabilistic test.
Result:
No more thread-safety violations.