YH-417: fix internal http requests with self-signed serts
fix flake8