Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

spotify: get source via https instead of plain http #23840

Merged
merged 1 commit into from Mar 14, 2017

Conversation

WilliButz
Copy link
Member

Motivation for this change

Using transport layer security when it's possible

Things done
  • Tested using sandboxing
    (nix.useSandbox on NixOS,
    or option build-use-sandbox in nix.conf
    on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • Linux
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

@mention-bot
Copy link

@WilliButz, thanks for your PR! By analyzing the history of the files in this pull request, we identified @edolstra, @bjornfor and @rickynils to be potential reviewers.

@copumpkin
Copy link
Member

Just FYI, I don't think we verify certificates on any of our fetches. Your change won't hurt anything, but I wanted to make sure you understood the implications. The main argument is that we already check the hash we download so are less paranoid about malicious remotes.

The bigger potential concern is eavesdropping/MITM, which the Nix community has largely ignored/discounted so far. Not checking certificates could allow someone to watch what you're downloading, but it seems a bit less concerning in this sort of case, when the IP you hit strongly suggests what you're doing on it.

@Mic92
Copy link
Member

Mic92 commented Mar 13, 2017

Does nix-prefetch-url verify certificates? That would be necessary for bootstrapping the hash.

https would be still useful for nix-prefetch-url -A spotify.src in this case.

@WilliButz
Copy link
Member Author

@copumpkin @Mic92 seems like nix-prefetch-url does indeed verify certificates:

for example trying to get the hash of the index.html of the following domains gives a corresponding certificate related error:

nix-prefetch-url https://untrusted-root.badssl.com/index.html downloading ‘https://untrusted-root.badssl.com/index.html’... [0/0 KiB, 0.0 KiB/s] error: unable to download ‘https://untrusted-root.badssl.com/index.html’: Peer certificate cannot be authenticated with given CA certificates (60)

nix-prefetch-url https://self-signed.badssl.com/index.html downloading ‘https://self-signed.badssl.com/index.html’... [0/0 KiB, 0.0 KiB/s] error: unable to download ‘https://self-signed.badssl.com/index.html’: Peer certificate cannot be authenticated with given CA certificates (60)

@benley benley merged commit d96cde3 into NixOS:master Mar 14, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants