-
Notifications
You must be signed in to change notification settings - Fork 5k
Add dispose of X509Chain in SignedXml #115909
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
Add dispose of X509Chain in SignedXml #115909
Conversation
Tagging subscribers to this area: @dotnet/area-system-security, @bartonjs, @vcsjones |
} | ||
finally | ||
{ | ||
chain.Dispose(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If only the variable is disposed and nothing else, then using
should be better.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. @bartonjs?
Is OOF until next week, but predicting what Jeremy will say: "Please use a |
85c875e
to
de78f2c
Compare
Call Dispose for X509Chain class instance
I didn't add chain.ChainElements[*].Certificate.Dispose() as mentioned here
because I'm not sure that we should dispose all chained certificates. One of them is passed through the method parameters
Found by Linux Verification Center (linuxtesting.org) with SVACE.