Cherry-pick changes from master

   * fix issue with secure pip download
Closes-Bug: #1267420

Change-Id: Ie931449cf8ba2e1a3bd0413aea00d8d38df045f8