Skip to content

Fix some deprecation issues with OpenSSL 3.0 #7808

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 3 commits into from
Oct 7, 2021

Conversation

MarcelRaad
Copy link
Member

This should fix everything except openssl.c itself, which requires more work as some of the functions used there are deprecated without a replacement.

@MarcelRaad
Copy link
Member Author

I just noticed the bad naming in sha256.c, where I used the Curl_ prefix for TU-local/static functions and types. Any better idea that won't clash with the names in any external SSL backend?

@bagder
Copy link
Member

bagder commented Oct 4, 2021

Any better idea that won't clash with the names in any external SSL backend?

Static functions don't need to be Curl_ prefixed at all. If you still want the functions to have a prefix, you're free to select one you like that's specific for that single source file. In some cases we've used my_ then but there's no fixed rule.

Copy link
Member

@bagder bagder left a comment

Choose a reason for hiding this comment

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

Looks good to me. For some reason the zuul build doesn't show up now!

Only use OpenSSL's MD5 code if it's available.

Also fix wolfSSL build with `NO_MD5`, in which case neither the
wolfSSL/OpenSSL implementation nor the fallback implementation was
used.

Closes curl#7808
This selects another SSL backend then if available, or otherwise at
least gives a meaningful error message.

Closes curl#7808
Available since OpenSSL 0.9.7. The low-level SHA256 interface is
deprecated in OpenSSL v3, and its usage was discouraged even before.

Closes curl#7808
@MarcelRaad
Copy link
Member Author

MarcelRaad commented Oct 7, 2021

For some reason the zuul build doesn't show up now!

Strange. Looks like it disappeared for all PRs on October 1 and for the master branch on September 30.
And there are also older PRs where it's still shown as in progress: https://github.com/curl/curl/pull/7799/checks

Now it shows as successful for this one...

@MarcelRaad MarcelRaad closed this in b352e03 Oct 7, 2021
@MarcelRaad MarcelRaad merged commit 94696e1 into curl:master Oct 7, 2021
@MarcelRaad MarcelRaad deleted the opensslv3 branch October 11, 2021 19:09
vszakats added a commit to vszakats/curl that referenced this pull request Aug 12, 2024
```
In file included from _bld/lib/CMakeFiles/libcurl_static.dir/Unity/unity_0_c.c:85:
lib/curl_ntlm_core.c:157:27: error: unknown type name 'DES_key_schedule'
                          DES_key_schedule DESKEYARG(ks))
                          ^
lib/curl_ntlm_core.c:159:3: error: use of undeclared identifier 'DES_cblock'
  DES_cblock key;
  ^
[...]
```

Earlier patch addressing this for OpenSSL:
802d864 curl#7808

Cherry-picked from curl#14495
Closes curl#14512
vszakats added a commit that referenced this pull request Aug 13, 2024
E.g. with Homebrew wolfssl 5.7.2 on macOS:
```
In file included from _bld/lib/CMakeFiles/libcurl_static.dir/Unity/unity_0_c.c:85:
lib/curl_ntlm_core.c:157:27: error: unknown type name 'DES_key_schedule'
                          DES_key_schedule DESKEYARG(ks))
                          ^
lib/curl_ntlm_core.c:159:3: error: use of undeclared identifier 'DES_cblock'
  DES_cblock key;
  ^
[...]
```

Earlier patch addressing this for OpenSSL:
802d864 #7808

Cherry-picked from #14495
Closes #14512
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

3 participants