Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't run mozroots automatically; ask instead
One of the most common reasons for the Paket bootstrapper to fail on Linux is if the Mono installation is brand-new -- because out of the box, Mono does not trust *any* X.509 root certificates. Therefore, GitHub's SSL certificate won't be trusted and Paket won't be downloaded. The fix most often recommended is to run: mozroots --import --sync which imports the entire root SSL certificate store trusted by the Mozilla project. This is over 100 certificates, so not everyone will want to run this command. (And we certainly shouldn't be running it for them.) But we should suggest it, because not everyone knows about the mozroots command. In particular, if someone is new to F# and Mono, this suggestion might save them hours of frustrated Google searches. Note that the Mono project has said (in the [certmgr manpage][1]) that there is no guarantee that certificate store locations will stay the same between Mono releases, and that "The only safe way to interact with certificate stores is to use the certmgr tool." So instead of checking the ~/.config/.mono/certs directory, we use certmgr to count the number of trusted X.509 certificates. We compare to 1 rather than 0 because the word "X.509" will appear once in the header of certmgr's output even on a system with no trusted root certs. [1]: http://manpages.ubuntu.com/manpages/trusty/man1/certmgr.1.html
- Loading branch information