In this post let’s see how we can configure local HTTPS certificate in MacOS for an ASP.NET Core web application.
You can use dotnet-dev-cert which is a command line tool to generate certificates used in ASP.NET Core during local development. To install the tool, you can simply run the following command (note: the version can be different, it's the version as of today).
dotnet tool install --global dotnet-dev-certs --version 2.1.1
dotnet dev-certs https -ep localhost.pfx -p dev
dotnet dev-certs https --help
dotnet dev-certs https --help |
Once the certificate is generated, you should be able to see the certificate in Keychain Access. You can easily open Keychain Access by using Spotlight or, navigating to Applications -> Utilities -> Keychain Access.
Keychain Access |
Now you need to trust the certificate for SSL by double-clicking on the certificate, expanding Trust and selecting Always Trust in Secure Socket Layter (SSL) dropdown.
Keychain Access |
Hope this helps.
Happy Coding.
Happy Coding.
Regards,
Jaliya
No comments:
Post a Comment