natemcmaster / LettuceEncrypt

Free, automatic HTTPS certificate generation for ASP.NET Core web apps
https://nuget.org/packages/LettuceEncrypt
Apache License 2.0
1.55k stars 152 forks source link

Fix fallback to default certificate configuration #286

Closed Tom-V closed 3 months ago

Tom-V commented 8 months ago

This fixes #122 Requests without SNI fail with: "The server mode SSL must use a certificate with the associated private key."

Basically when setting a ServerCertificateSelector it overrides the default behavior, returning null will give an error instead of falling back to the configuration. This change only sets the ServerCertificateSelector whenever domains are configured. To do this however I had to break the API.

natemcmaster commented 6 months ago

I would prefer to avoid breaking changes if we can. Does this approach work instead? https://github.com/natemcmaster/LettuceEncrypt/pull/290

natemcmaster commented 3 months ago

I've released https://github.com/natemcmaster/LettuceEncrypt/pull/290 to nuget as version 1.3.1. Please let me know if that works for you.