The implementation is done on top of the reference counting functionality found in OpenSSL/LibreSSL, which allows for avoiding wrapping the object. Adding this function allows using reference counting for TLS contexts in BIND 9's codebase.