TlsCertificateLoader 1.1.1
See the version list below for details.
dotnet add package TlsCertificateLoader --version 1.1.1
NuGet\Install-Package TlsCertificateLoader -Version 1.1.1
<PackageReference Include="TlsCertificateLoader" Version="1.1.1" />
paket add TlsCertificateLoader --version 1.1.1
#r "nuget: TlsCertificateLoader, 1.1.1"
// Install TlsCertificateLoader as a Cake Addin #addin nuget:?package=TlsCertificateLoader&version=1.1.1 // Install TlsCertificateLoader as a Cake Tool #tool nuget:?package=TlsCertificateLoader&version=1.1.1
TlsCertificateLoader
Allows loading of TLS (HTTPS) certificates for .NET 6.0 Kestrel web applications, allowing for refreshing of certificates as well as compatibility with HTTP/3. Fully compatible with certificates obtained by Certbot.
To use:
TlsCertificateLoader.TlsCertificateLoader tlsCertificateLoader = new(fullChainPemFilePath, privateKeyPemFilePath);
options.ListenAnyIp(433, o =>
{
o.SetTlsHandshakeCallbackOptions(tlsCertificateLoader);
o.SetHttpsConnectionAdapterOptions(tlsCertificateLoader);
o.Protocols = HttpProtocols.Http1AndHttp2AndHttp3;
});
And to refresh (eg either on a Timer or watching a directory via PhysicalFileProvider):
tlsCertificateLoader.RefreshDefaultCertificates();
You may also add additional certificate collection for other hostnames (for example if you want to set up mydomain.tld as your default certificate and www.mydomain.tld as your alternate one):
tlsCertificateLoader.AddAdditionalCertificates("www.mydomain.tld", fullChainWwwPemFilePath, privateKeyWwwPemFilePath);
And to refresh additional certificate collections (eg either on a Timer or watching a directory via PhysicalFileProvider):
tlsCertificateLoader.RefreshAdditionalCertificates("www.mydomain.tld");
A sample project using Certbot is available.
Credits
David Fowler for this idea.
Logo made by Freepik from www.flaticon.com.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net6.0
- Microsoft.AspNetCore.Server.Kestrel.Core (>= 2.2.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated | |
---|---|---|---|
2.3.1 | 38 | 9/21/2024 | |
2.2.10 | 635 | 12/5/2023 | |
2.2.9 | 924 | 2/13/2023 | |
2.2.8 | 392 | 1/29/2023 | |
2.2.5 | 469 | 12/16/2022 | |
2.2.4 | 338 | 12/13/2022 | |
2.2.0 | 305 | 12/13/2022 | |
2.1.2 | 330 | 12/12/2022 | |
2.1.1 | 458 | 11/19/2022 | |
2.0.8 | 461 | 9/17/2022 | |
2.0.7 | 466 | 6/29/2022 | |
2.0.6 | 490 | 3/13/2022 | |
2.0.5 | 430 | 3/13/2022 | |
2.0.3 | 431 | 3/12/2022 | |
2.0.2 | 424 | 3/11/2022 | |
2.0.1 | 337 | 11/27/2021 | |
1.1.7 | 314 | 11/27/2021 | |
1.1.4 | 737 | 11/21/2021 | |
1.1.3 | 381 | 11/14/2021 | |
1.1.2 | 416 | 11/14/2021 | |
1.1.1 | 313 | 11/13/2021 | |
1.1.0 | 320 | 11/12/2021 | |
1.0.5 | 307 | 11/10/2021 | |
1.0.4 | 313 | 11/9/2021 | |
1.0.3 | 370 | 11/9/2021 | |
1.0.2 | 451 | 11/7/2021 | |
1.0.0 | 468 | 11/6/2021 |
Optimization and added a sample project using Certbot.