simplify interface.get_socket, and fix a bug with new certificates