Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove assert preventing empty PKCS7 exports #59812

Merged
merged 1 commit into from
Oct 11, 2021

Conversation

vcsjones
Copy link
Member

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

An empty PKCS7 collection is valid, so don't require the certHandles
count to be greater than 0.
@ghost ghost added the community-contribution Indicates that the PR has been added by a community member label Sep 30, 2021
@ghost
Copy link

ghost commented Sep 30, 2021

Tagging subscribers to this area: @bartonjs, @vcsjones, @krwq, @GrabYourPitchforks
See info in area-owners.md if you want to be subscribed.

Issue Details

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
Author: vcsjones
Assignees: -
Labels:

area-System.Security, community-contribution

Milestone: -

@ghost
Copy link

ghost commented Sep 30, 2021

Tagging subscribers to 'arch-android': @steveisok, @akoeplinger
See info in area-owners.md if you want to be subscribed.

Issue Details

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
Author: vcsjones
Assignees: -
Labels:

area-System.Security, os-android, community-contribution

Milestone: -

@steveisok steveisok self-requested a review September 30, 2021 15:26
@akoeplinger akoeplinger merged commit 9dcde5f into dotnet:main Oct 11, 2021
@vcsjones vcsjones deleted the fix-android-empty-pkcs7 branch October 11, 2021 14:04
@ghost ghost locked as resolved and limited conversation to collaborators Nov 10, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-System.Security community-contribution Indicates that the PR has been added by a community member os-android
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants