-
-
Notifications
You must be signed in to change notification settings - Fork 6.6k
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
sha512_256: add support for GnuTLS and OpenSSL #13070
Conversation
9e7e814
to
135da0a
Compare
Check |
Test 707 failure in |
Thanks! |
Test 1615 and the other SHA-512/256 unit tests started dumping core on NetBSD after this was submitted: https://curl.se/dev/log.cgi?id=20240308034313-2594315#prob4 |
NetBSD 9.3 on ARM. Interesting. |
You'll have to contact Michael Kaufmann, who runs that build, directly for more info.
|
@mkauf Could you please share this info? |
@Karlson2k : The backtrace is:
|
Thanks, @mkauf This is something weird. SIGSEGV in Is it possible to make stack back trace with debug symbols and frame pointers? |
Here is the place where segmentation failure happens: Lines 118 to 126 in fb3c251
|
@Karlson2k I have discovered that NetBSD uses a patched version of OpenSSL which has a bug. I have reported it here: https://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=58039 Links to NetBSD source:
The code in this pull request is fine, it's NetBSD's fault that curl crashes. If you want to implement a workaround:
|
Thanks for digging into it and finding the root cause, @mkauf! I'll make a workaround based on your suggestion. Thanks for the suggested code changes! |
This is a follow-up for PR #12897.
This PR adds support for SHA-512/256 digest calculation by TLS backends.
Currently only OpenSSL and GnuTLS (actually, nettle) support SHA-512/256.
This is an alternative implementation. The initial PR is #13053.
This version has more curl branding ;), simplified code (uses
size_t
for size instead ofunsigned int
as underling libs and avoids trying to process data in smaller chunks whensize_t
is larger thanunsigned int
), added error checking and reporting for the most used functionCurl_sha512_256it()
, renamed some symbols to avoid potential conflicts. With this PR code detects hashing problem reported by TLS backend and returns respective error.Sorry, I couldn't resist improving the code even when my PR was already accepted.