Skip to content

Fix detection of OpenSSL 1.1.1 or later in curl_sha512_256.c - #13208

Closed
pghmcfc wants to merge 1 commit into
curl:masterfrom
pghmcfc:evp_sha512_256
Closed

Fix detection of OpenSSL 1.1.1 or later in curl_sha512_256.c#13208
pghmcfc wants to merge 1 commit into
curl:masterfrom
pghmcfc:evp_sha512_256

Conversation

@pghmcfc

@pghmcfc pghmcfc commented Mar 27, 2024

Copy link
Copy Markdown
Contributor

Use the same OPENSSL_VERSION_NUMBER comparison as in lib/vtls/openssl.c.

As it stands, builds using an OpenSSL 1.1.0 release fail due to trying to use the unavailable symbol EVP_sha512_256.

Use the same OPENSSL_VERSION_NUMBER comparison as in
lib/vtls/openssl.c.
@bagder

bagder commented Mar 27, 2024

Copy link
Copy Markdown
Member

/cc @Karlson2k

@Karlson2k

Copy link
Copy Markdown
Contributor

I made detection according to the OpenSSL documentation.
If the symbol is really missing I think the fix is correct.
As libcurl has the plan B (the local version), it's safer to merge this PR as in the worst case it would just lower the performance.

@pghmcfc

pghmcfc commented Mar 28, 2024

Copy link
Copy Markdown
Contributor Author

The version number would be correct as per the current numbering documentation. However, this changed with OpenSSL 3.x - the documentation for OpenSSL 1.x was slightly different: https://www.openssl.org/docs/man1.1.1/man3/OPENSSL_VERSION_NUMBER.html

@bagder bagder closed this in c77bdf1 Mar 28, 2024
@bagder

bagder commented Mar 28, 2024

Copy link
Copy Markdown
Member

Thanks!

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