Use context managers in test_ssl to simplify test writing.