switch endpoint to ssl