-
-
Notifications
You must be signed in to change notification settings - Fork 753
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
openssl-sys: Provide information about the default certificate paths #2260
base: master
Are you sure you want to change the base?
Conversation
The goal of these functions is to contain the logic implemented by the `openssl-probe` crate. The `openssl-sys` crate knows whether we are linked against the system OpenSSL library, and if so, it can use it to get the correct certificate paths. If we are using the vendored version, we keep the old insecure behavior where we randomly guess paths and hope one works.
It does not. It only knows if we are linked to the vendored copy or not. |
The non-vendored copy is the one explicitly provided by whoever builds the (downstream) crate. Perhaps another feature |
Or perhaps the search path could be a compile-time option, just like In any case, my goal is to make sure that downstream users like |
I don't see how this change would affect the behavior of native-tls. |
This change by itself wouldn't. A subsequent change to have The default ( |
Fundamentally, I am not interested in maintaining the big-list-of-paths in openssl-sys. Again, |
(sorry about the deleted message, used the wrong account)
Yes, that's true. It probably makes more sense to be able to provide a list at build time, and to keep the default list in
One thing I guess we know for sure is that when |
You can't. When dynamically linking the build-time library may not even be the same as the run-time library, beyond ABI compatibility. |
Isn't the point of dynamic linking that the user provides the OpenSSL library? In that case I think it's better if the user makes sure that the OpenSSL library they provide knows where its certificates are. |
That is a thing that you can do with dynamic linking, but I wouldn't say that it's the "point" of it. You can absolutely ship a dynamically linked libssl with your executable if you want. |
"You" here being the person building the (downstream) crate, hoping to provide a "portable" install tarball. In that case the probing behavior can be specified during build time. |
So, how about the following in
where no probing is done. Instead:
Then
This way the behavior is controlled at build time and the default isn't a security footgun. With a good heuristic in step 3 we can avoid most breakage. What do you think? |
Should I open an issue in the users of |
The goal of these functions is to contain the logic implemented by the
openssl-probe
crate. Theopenssl-sys
crate knows whether we are linked against the system OpenSSL library, and if so, it can use it to get the correct certificate paths.If we are using the vendored version, we keep the old insecure behavior where we randomly guess paths and hope one works.