-
-
Notifications
You must be signed in to change notification settings - Fork 33.8k
src: handle DER decoding errors from system certificates #60787
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
base: main
Are you sure you want to change the base?
Conversation
When decoding certificates from the system store, it's not actually guaranteed to succeed. In case the system returns a certificate that cannot be decoded (might be related to SSL implementation issues), skip them.
|
Review requested:
|
| "Cannot read certificates from system because " | ||
| "SecItemCopyMatching failed %d\n", | ||
| ortn); | ||
| return; |
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.
Drive-by: I added a skip here too, otherwise the code operating on that array below can crash (I think it's possible on a super duper fresh machine with zero certificates, for example - though most consumer macOS machines seem to have at least some preinstalled, or when there's some permission issue going on)
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #60787 +/- ##
==========================================
+ Coverage 88.04% 88.53% +0.49%
==========================================
Files 703 703
Lines 208260 208260
Branches 40068 40149 +81
==========================================
+ Hits 183360 184393 +1033
+ Misses 16840 15878 -962
+ Partials 8060 7989 -71
🚀 New features to boost your workflow:
|
When decoding certificates from the system store, it's not actually guaranteed to succeed. In case the system returns a certificate that cannot be decoded (might be related to SSL implementation issues), skip them.
Refs: microsoft/vscode#277064