Use secure https connection if certificates are provided