Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Swallow CryptographicExceptions when adding certificates to store #115190

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

Conversation

rzikm
Copy link
Member

@rzikm rzikm commented Apr 30, 2025

Fixes #108607.

…o store during SslStreamCertificateContext.Create
@Copilot Copilot AI review requested due to automatic review settings April 30, 2025 12:11
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR addresses issue #108607 by modifying the certificate-addition logic so that CryptographicExceptions are gracefully handled.

  • Replaces direct calls to store.Add(...) with a TryAddToStore helper method.
  • Logs an error if adding a certificate fails, ensuring that chain building can continue.

Copy link
Contributor

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

Copy link
Member

@bartonjs bartonjs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM once the missing using-import is added

Copy link
Member

@wfurt wfurt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with one comment.

@rzikm
Copy link
Member Author

rzikm commented May 7, 2025

/ba-g test failures are unrelated, Build Analysis go tstuck

@rzikm rzikm merged commit dbe81db into dotnet:main May 7, 2025
83 of 85 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants