Skip to content

Commit

Permalink
Test: fix removal of test certificate from root store (#10260)
Browse files Browse the repository at this point in the history
Resolve #10259
  • Loading branch information
dtivel authored Nov 11, 2024
1 parent e7ec325 commit 0ec9961
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,11 @@ public async Task<TimestampServiceWithUnavailableRevocation> CreateTimestampServ
StoreLocation.LocalMachine);

var timestampService = TimestampService.Create(rootCa);
var disposable = new DisposableList<IDisposable> { rootCertificate, trust };

// Do not add `rootCertificate`, because its disposal will cause subsequent disposal
// of `trust` to fail and trust removal to fail.
// Disposing `trust` already disposes `rootCertificate`.
var disposable = new DisposableList<IDisposable> { trust };

Task WaitForResponseExpirationAsync()
{
Expand Down

0 comments on commit 0ec9961

Please sign in to comment.