-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
feat: load full certificate bundles from NODE_EXTRA_CA_CERTS
#16782
base: main
Are you sure you want to change the base?
Conversation
0304e37
to
98b16af
Compare
062e57f
to
8b38e9f
Compare
@cirospaciari Would you mind taking a look? Thank you! |
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.
Looks good only 1 comment, and I would ask for tests using tls
module too
8ea761b
to
a38b1ac
Compare
b905456
to
830ac77
Compare
ERR_error_string_n(ERR_peek_last_error(), buf, sizeof(buf)); | ||
char msg[512]; | ||
snprintf(msg, sizeof(msg), "ignoring extra certs from `%s`, load failed: %s", filename, buf); | ||
bun_log_warn(msg); |
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.
instead of snprintf can you pass filename and buf to bun_log_warn and handle it there?
also can you call ERR_clear_error after logging?
What does this PR do?
Closes #13867
How did you verify your code works?
I added tests.
P.S.
Inspired by Node.js' approach (https://github.com/nodejs/node/blob/main/src/crypto/crypto_context.cc#L215-L236 - https://github.com/nodejs/node/blob/main/src/crypto/crypto_context.cc#L565-L577)