![]() |
VOOZH | about |
dotnet add package Rig.TUnit.Security.Mtls --version 0.1.0-beta.2
NuGet\Install-Package Rig.TUnit.Security.Mtls -Version 0.1.0-beta.2
<PackageReference Include="Rig.TUnit.Security.Mtls" Version="0.1.0-beta.2" />
<PackageVersion Include="Rig.TUnit.Security.Mtls" Version="0.1.0-beta.2" />Directory.Packages.props
<PackageReference Include="Rig.TUnit.Security.Mtls" />Project file
paket add Rig.TUnit.Security.Mtls --version 0.1.0-beta.2
#r "nuget: Rig.TUnit.Security.Mtls, 0.1.0-beta.2"
#:package Rig.TUnit.Security.Mtls@0.1.0-beta.2
#addin nuget:?package=Rig.TUnit.Security.Mtls&version=0.1.0-beta.2&prereleaseInstall as a Cake Addin
#tool nuget:?package=Rig.TUnit.Security.Mtls&version=0.1.0-beta.2&prereleaseInstall as a Cake Tool
Mutual-TLS fixture — ephemeral self-signed CA + matched client/server leaf certs for Kestrel mTLS tests. No production bypass.
An mTLS integration-test fixture. MtlsFixture generates a self-signed
CA plus matched client + server leaf certificates in-memory at fixture
startup; the keys live only for the fixture lifetime and dispose
deterministically. The generated chain validates via the real X.509
stack — suitable for Kestrel mTLS endpoints and HttpClient peer
authentication. No ServerCertificateCustomValidationCallback bypass.
RequireClientCertificate = true.CertificateAuthentication middleware accepts / rejects
chains correctly.using Rig.TUnit.Security.Mtls.Fixtures;
await using var fx = new MtlsFixture();
await fx.InitializeAsync();
MtlsAssert.BothSidesAuthenticated(fx.ClientCertificate, fx.ServerCertificate);
| Property | Type | Default | Description |
|---|---|---|---|
CaSubject |
string |
"CN=rigtunit-test-ca" |
CA subject DN |
ClientSubject |
string |
"CN=rigtunit-client" |
Client leaf DN |
ServerSubject |
string |
"CN=rigtunit-server" |
Server leaf DN |
ValidityDays |
int |
365 |
CA + leaf validity window |
Rig.TUnit.Security.Mtls.Fixtures.MtlsFixtureRig.TUnit.Security.Mtls.Options.MtlsFixtureOptionsRig.TUnit.Security.Mtls.Builder.MtlsRigBuilderRig.TUnit.Security.Mtls.Assertions.MtlsAssertEach MtlsFixture owns its own CA + leaf certs. Subjects include
IsolationKey when the test uses the default wiring, so parallel
tests produce distinct chains.
AuthenticationException on handshake — client cert not
trusted. Ensure the Kestrel config's ClientCertificateMode = RequireCertificate
AND the server trusts the fixture's CA (add via fx.Ca).ValidityDays was set ≤ 0; default
is 365, don't set it to 0.See .
X509Certificate2 with exportable private key;
do not persist them (the fixture deliberately scopes keys to the
fixture lifetime).BothSidesAuthenticated verifies both leaves chain to the fixture's
CA; missing intermediates fail this check.See ;
baseline in benchmarks/baseline-005.json. Certificate generation is
the dominant cost and tracked closely.
MIT. See .
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 net10.0 is compatible. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
Showing the top 1 NuGet packages that depend on Rig.TUnit.Security.Mtls:
| Package | Downloads |
|---|---|
|
Rig.TUnit.All
Meta-package containing every Rig.TUnit.* package. DISCOURAGED — prefer per-feature or per-stack meta-packages (Rig.TUnit, Rig.TUnit.Microservices). |
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.1.0-beta.2 | 61 | 4/27/2026 |
| 0.0.0-alpha.0.14 | 61 | 4/26/2026 |