Skip to content
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

SHA3 is not supported by libressl #396

Merged
merged 1 commit into from
Feb 15, 2023
Merged

SHA3 is not supported by libressl #396

merged 1 commit into from
Feb 15, 2023

Conversation

ffontaine
Copy link
Contributor

Disable SHA3 with libressl as it is not supported resulting in the following build failure:

/home/buildroot/autobuild/instance-3/output-1/host/lib/gcc/or1k-buildroot-linux-gnu/11.3.0/../../../../or1k-buildroot-linux-gnu/bin/ld: iscsid.p/usr_auth.c.o: in function `auth_hash_init': auth.c:(.text+0x7bc): undefined reference to `EVP_sha3_256'

Fixes:

Signed-off-by: Fabrice Fontaine fontaine.fabrice@gmail.com

Copy link
Collaborator

@gonzoleeman gonzoleeman left a comment

Choose a reason for hiding this comment

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

I have no objection to making open-iscsi work with non-standard libraries, but I don't like having to name a define from one of those libraries to know if we should support SHA3 or not.

I am no encryption expert at all, but please explain to me why this library doesn't support SHA3-256? Looking at the sources of the latest version, it appears it supports some versions of SHA3. Also, when and why would this alternate library be used, instead of libopenssl?

Seems like both libopenssl and this one should have a way of telling clients which ciphers they support.

At the very least, if we can't make this test cleaner, we could at least hide that ugliness in an include file, e.g.:

/* libressl, an alternate openssl library, does not support SHA3-256, so test for that */
#ifdef LIBRESSL_VERSION_NUMBER
#define SHA3_256_NOT_SUPPORTED
#endif

then of course use that define for your checks.

@ffontaine
Copy link
Contributor Author

libressl is a fork of openssl. It is mostly used (and maintained) by OpenBSD. buildroot and OpenWRT also support it. To my knowledge, SHA3 is not supported because it was added to openssl after the fork: libressl/portable#455.

I'll update the PR to use meson has_function.

Disable SHA3 with libressl as it is not supported resulting in the
following build failure:

/home/buildroot/autobuild/instance-3/output-1/host/lib/gcc/or1k-buildroot-linux-gnu/11.3.0/../../../../or1k-buildroot-linux-gnu/bin/ld: iscsid.p/usr_auth.c.o: in function `auth_hash_init':
auth.c:(.text+0x7bc): undefined reference to `EVP_sha3_256'

Fixes:
 - http://autobuild.buildroot.org/results/48a4bddc355956733d712214797350cca8e111d9

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
@gonzoleeman gonzoleeman merged commit 9b72f83 into open-iscsi:master Feb 15, 2023
@gonzoleeman
Copy link
Collaborator

Merged. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants