natemcmaster / dotnet-serve

Simple command-line HTTPS server for the .NET Core CLI

Home Page:https://nuget.org/packages/dotnet-serve/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Ambiguous certificate match

TFTomSun opened this issue · comments

Describe the bug
When I try to use dotnet serve

dotnet serve -o -S -p 44444 -d publish

i get the following output

Failed to configure the HTTPS. Ambiguous certficiate match. Multiple certificates found with extension '1.3.6.1.4.1.311.84.1.1' (ASP.NET Core HTTPS development certificate). 

Do you have an idea what could be the root cause or how it can be fixed?

Probably means you have an old or expired aspnetcore dev cert installed. You can either uninstall the old certs with "dotnet dev-certs https --clean" (I think?) And/or we can make this code more robust

What is the expected fix for this @natemcmaster, I can take this up.

If CertificateLoader finds multiple certificates with extension '1.3.6.1.4.1.311.84.1.1', choose one. Probably best to choose the newest one. Don’t pick an expired one.