Skip to content

Real fix for certificate issues under mac #33997

@AndiRudi

Description

@AndiRudi

Description

I had quite some issues with the developer certificate on mac. For some reason all removal via tooling or keychain did not solve the issue. I finally found someone that solved it and I think it makes sense to add that to the documentation. The solution is from https://www.reddit.com/r/aspnetcore/comments/10uneql/keep_getting_https_development_certificate_was/ and here is the short version.

  1. Launch the Keychain Access Application and remove all certificates that are names localhost under login.
  2. Launch the terminal and navigate to following folder and remove any remaining pfx file manually
cd ~/.aspnet/dev-certs/https
rm *.pfx

(I guess this is the difference and did the trick)

  1. Run clean and trust dev-certs command below:
dotnet dev-certs https --clean
dotnet dev-certs https -t
  1. Re-launch the Visual Studio for Mac and run your project with Https (was not necessary for me)

Page URL

https://learn.microsoft.com/en-us/aspnet/core/security/enforcing-ssl?view=aspnetcore-3.0&tabs=visual-studio%2Clinux-sles#docker---certificate-not-trusted

Content source URL

https://github.com/dotnet/AspNetCore.Docs/blob/main/aspnetcore/security/enforcing-ssl.md

Document ID

12ca0b9a-2638-a4ce-c45f-d4579c83dafb

Article author

@tdykstra

Related Issues

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions