refine create_ssl_connection