Introduce acceptAnyCertificate config, defaulting to false, backport df6ed70e86c8fc340ed75563e016c8baa94d7e72, close #352