Skip to content

[6.0][Networking] Search for CA roots if libcurl doesn't know where they are. #4947

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

Merged
merged 1 commit into from
May 4, 2024

Conversation

al45tair
Copy link
Contributor

@al45tair al45tair commented May 3, 2024

Normally, distro maintainers will tell libcurl where to look when they build it, and up to now we've been relying on that. That doesn't work for the fully static Linux build, where we're building our own libcurl, and where the idea is that we'll run on any old Linux system.

To make TLS work under that circumstance, we'll need to look in a few likely places for CA root files. We only do this if libcurl doesn't already know where to look.

rdar://123434144

[Networking] Search for CA roots if libcurl doesn't know where they are.
@al45tair al45tair requested a review from jrflat May 3, 2024 11:31
@al45tair
Copy link
Contributor Author

al45tair commented May 3, 2024

Explanation: This is required to make Foundation Networking's SSL support work on arbitrary Linux systems; without it, libcurl only knows where to look on the system on which it was configured, which means that the fully static Linux SDK would build binaries that only worked for one system (which is annoying). Instead, we need to fall back to looking in likely places for the CA root files.
Risk: Low.
Original PR: #4877
Reviewed by: @jrflat
Resolves: rdar://123434144
Tests: Most of the new code is only fully exercised when using the fully static Linux SDK, which is presently built separately; the code paths used by normal Linux builds are tested as part of normal PR testing.

@al45tair
Copy link
Contributor Author

al45tair commented May 3, 2024

@swift-ci Please test

@al45tair
Copy link
Contributor Author

al45tair commented May 3, 2024

Ah, that's interesting. The macOS failure is expected (corelibs-foundation isn't used on macOS and has been failing on the main branch for a while too), but it's listed as "Required" above.

Copy link
Contributor

@jrflat jrflat left a comment

Choose a reason for hiding this comment

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

I'll check with the team to see if we can get more info regarding the macOS CI.

@shahmishal shahmishal merged commit ac1af64 into swiftlang:release/6.0 May 4, 2024
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants