Skip to content

Fix some deprecation issues with OpenSSL 3.0 - #7808

Merged
MarcelRaad merged 3 commits into
curl:masterfrom
MarcelRaad:opensslv3
Oct 7, 2021
Merged

Fix some deprecation issues with OpenSSL 3.0#7808
MarcelRaad merged 3 commits into
curl:masterfrom
MarcelRaad:opensslv3

Conversation

@MarcelRaad

Copy link
Copy Markdown
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
Copy Markdown
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

bagder commented Oct 4, 2021

Copy link
Copy Markdown
Member

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.

@bagder bagder left a comment

Copy link
Copy Markdown
Member

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

MarcelRaad commented Oct 7, 2021

Copy link
Copy Markdown
Member Author

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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants