-
-
Notifications
You must be signed in to change notification settings - Fork 31.9k
bpo-38684: haslib: fix build when Blake2 not enabled in OpenSSL #17043
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm sure this is not compatible with OpenSSL 1.1.0 and 1.0.2. You need to check for both the presence of NID-blake2b512 and absence of OPENSSL_NO_BLAKE2.
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
This was caught via OpenWrt's build, when upgrading to 3.8. By default, Blake2 is not enabled in OpenWrt's OpenSSL. Not sure if this is an issue in OpenSSL or Python or both. After digging through the _hashopenssl.c, it seems that the check for Blake2 being enabled/present in OpenSSL is not consistent with how OpenSSL does it. I guess this issue happens when Blake2 is present, but not enabled. While the previous code was checking whether it is present. Error is: ``` Modules/_hashopenssl.c:220:22: error: implicit declaration of function 'EVP_blake2s256'; did you mean 'SN_blake2s256'? [-Werror=implicit-function-declaration] digest = EVP_blake2s256(); ^~~~~~~~~~~~~~ SN_blake2s256 Modules/_hashopenssl.c:220:20: warning: assignment to 'const EVP_MD *' {aka 'const struct evp_md_st *'} from 'int' makes pointer from integer without a cast [-Wint-conversion] digest = EVP_blake2s256(); Modules/_hashopenssl.c:223:22: error: implicit declaration of function 'EVP_blake2b512'; did you mean 'LN_blake2b512'? [-Werror=implicit-function-declaration] digest = EVP_blake2b512(); ^~~~~~~~~~~~~~ Modules/_hashopenssl.c:223:20: warning: assignment to 'const EVP_MD *' {aka 'const struct evp_md_st *'} from 'int' makes pointer from integer without a cast [-Wint-conversion] digest = EVP_blake2b512(); ^ ``` Signed-off-by: Alexandru Ardelean <[email protected]>
good point; |
Changelog v1 ->v2:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
@tiran: Please replace |
…onGH-17043) (cherry picked from commit 6552563) Co-authored-by: Alexandru Ardelean <[email protected]>
GH-17044 is a backport of this pull request to the 3.8 branch. |
…7043) (cherry picked from commit 6552563) Co-authored-by: Alexandru Ardelean <[email protected]>
This was caught via OpenWrt's build, when upgrading to 3.8.
By default, Blake2 is not enabled in OpenWrt's OpenSSL.
Not sure if this is an issue in OpenSSL or Python or both.
After digging through the _hashopenssl.c, it seems that the check for
Blake2 being enabled/present in OpenSSL is not consistent with how OpenSSL
does it.
I guess this issue happens when Blake2 is present, but not enabled.
While the previous code was checking whether it is present.
Error is:
Signed-off-by: Alexandru Ardelean [email protected]
https://bugs.python.org/issue38684