Added ignoring invalid certificates if environment variable is set