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

[HTTPS] Add instructions for trusting the developer certificate on Linux #22019

Closed
javiercn opened this issue Apr 9, 2021 · 0 comments · Fixed by #22064
Closed

[HTTPS] Add instructions for trusting the developer certificate on Linux #22019

javiercn opened this issue Apr 9, 2021 · 0 comments · Fixed by #22064
Assignees
Labels
doc-enhancement Source - Docs.ms Docs Customer feedback via GitHub Issue

Comments

@javiercn
Copy link
Member

javiercn commented Apr 9, 2021

Within this section

Make a section for trusting the certificate in edge/chrome on Linux

  • You need to have installed libnss3-tools on your distribution.
  • There should be a folder $HOME/.pki/nssdb on the machine.
  • Export the certificate with dotnet dev-certs https -ep /usr/local/share/ca-certificates/aspnet/https.crt --format PEM
  • Run the following commands and restart the browser for it to take effect
    certutil -d sql:$HOME/.pki/nssdb -A -t "P,," -n localhost -i /usr/local/share/ca-certificates/aspnet/https.crt
    certutil -d sql:$HOME/.pki/nssdb -A -t "C,," -n localhost -i /usr/local/share/ca-certificates/aspnet/https.crt
    

Make a section for trusting the certificate in Firefox

  • Export the certificate with dotnet dev-certs https -ep /usr/local/share/ca-certificates/aspnet/https.crt --format PEM
  • Create file /usr/lib/firefox/distribution/policies.json with the following contents
    {
        "policies": {
            "Certificates": {
                "Install": [
                    "/usr/local/share/ca-certificates/aspnet/https.crt"
                ]
            }
        }
    }

Make a section for Ubuntu to make dotnet trust the certificate (for service-to-service communication).

  • Requires openssl 1.1.1h and higher. For instructions on how to update openssl find a guide for your OS.
  • Run the following two commands:
    sudo dotnet dev-certs https -ep /usr/local/share/ca-certificates/aspnet/https.crt --format PEM
    sudo update-ca-certificates
    

Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc-enhancement Source - Docs.ms Docs Customer feedback via GitHub Issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants