Skip to content
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

Print out a version directive for OpenSSL 3.0.0 #1548

Closed
wants to merge 1 commit into from

Conversation

alexcrichton
Copy link
Collaborator

This was printed out for previous OpenSSL versions for downstream
consumers but it looks like this was accidentally omitted for the 3.0.0
branch.

This was printed out for previous OpenSSL versions for downstream
consumers but it looks like this was accidentally omitted for the 3.0.0
branch.
alexcrichton added a commit to alexcrichton/curl-rust that referenced this pull request Nov 1, 2021
This commit should fix an issue that showed up in rust-lang/cargo#10013
where curl's initialization was accidentally detecting that curl needed
an early initialization (due to sfackler/rust-openssl#1548). This early
initialization caused the later env-vars set by `openssl-probe` to not
actually be read since OpenSSL was already initialized. While not an
issue for `curl` I think it does pose an issue for other libraries like
libgit2 using OpenSSL.

The fix here is to initialize the env vars before OpenSSL, which should
have OpenSSL pick up the probe results.
@sfackler
Copy link
Owner

sfackler commented Nov 1, 2021

I think this was actually intentional - the recommended way to check what version you're linking against is to load the exact version from DEP_OPENSSL_VERSION_NUMBER.

Example: https://github.com/sfackler/rust-openssl/blob/master/openssl-errors/build.rs

@alexcrichton
Copy link
Collaborator Author

Ah ok makes sense! I'll update these lines to use that instead.

alexcrichton added a commit to alexcrichton/curl-rust that referenced this pull request Nov 1, 2021
alexcrichton added a commit to alexcrichton/curl-rust that referenced this pull request Nov 1, 2021
alexcrichton added a commit to alexcrichton/curl-rust that referenced this pull request Nov 2, 2021
This commit should fix an issue that showed up in rust-lang/cargo#10013
where curl's initialization was accidentally detecting that curl needed
an early initialization (due to sfackler/rust-openssl#1548). This early
initialization caused the later env-vars set by `openssl-probe` to not
actually be read since OpenSSL was already initialized. While not an
issue for `curl` I think it does pose an issue for other libraries like
libgit2 using OpenSSL.

The fix here is to initialize the env vars before OpenSSL, which should
have OpenSSL pick up the probe results.
alexcrichton added a commit to alexcrichton/curl-rust that referenced this pull request Nov 2, 2021
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.

2 participants