You can't assume that the provided `backen` is an OpenSSL backend, so this needs to be written in a generic way.