switch to a BN_CTX context manager.