Skip to content

Commit 9dcde5f

Browse files
authored
Remove assert preventing empty PKCS7 exports (#59812)
An empty PKCS7 collection is valid, so don't require the certHandles count to be greater than 0. Before: ``` DOTNET : ((null) warning) Process terminated due to " at System.Diagnostics.DebugProvider.Fail(String message, String detailMessage) DOTNET : at System.Diagnostics.Debug.Fail(String message, String detailMessage) DOTNET : at System.Diagnostics.Debug.Assert(Boolean condition, String message, String detailMessage) DOTNET : at System.Diagnostics.Debug.Assert(Boolean condition) ``` After: ``` [PASS] System.Security.Cryptography.X509Certificates.Tests.CollectionTests.ExportPkcs7_Empty ```
1 parent 5f9fec9 commit 9dcde5f

File tree

1 file changed

+0
-1
lines changed
  • src/libraries/System.Security.Cryptography.X509Certificates/src/Internal/Cryptography/Pal.Android

1 file changed

+0
-1
lines changed

src/libraries/System.Security.Cryptography.X509Certificates/src/Internal/Cryptography/Pal.Android/StorePal.ExportPal.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ protected override byte[] ExportPkcs7()
3939
}
4040
}
4141

42-
Debug.Assert(certHandles.Length > 0);
4342
return Interop.AndroidCrypto.X509ExportPkcs7(certHandles);
4443
}
4544

0 commit comments

Comments
 (0)