]> git.ipfire.org Git - thirdparty/openssh-portable.git/commit
Prefer OpenSSL's SHA256 in sk-dummy.so
authorDarren Tucker <dtucker@dtucker.net>
Wed, 26 Jul 2023 16:25:09 +0000 (02:25 +1000)
committerDarren Tucker <dtucker@dtucker.net>
Thu, 27 Jul 2023 00:30:12 +0000 (10:30 +1000)
commit0fa803a1dd1c7b546c166000e23a869cf6c4ec10
tree1385f15a389da11efdb6f10507e86b4bd73b529d
parent36cdb5dbf55c99c0faad06066f56a7c341258c1f
Prefer OpenSSL's SHA256 in sk-dummy.so

Previously sk-dummy.so used libc's (or compat's) SHA256 since it may be
built without OpenSSL.  In many cases, however, including both libc's
and OpenSSL's headers together caused conflicting definitions.

We tried working around this (on OpenSSL <1.1 you could define
OPENSSL_NO_SHA, NetBSD had USE_LIBC_SHA2, various #define hacks) with
varying levels of success.  Since OpenSSL >=1.1 removed OPENSSL_NO_SHA
and including most OpenSSL headers would bring sha.h in, even if it
wasn't used directly this was a constant hassle.

Admit defeat and use OpenSSL's SHA256 unless we aren't using OpenSSL at
all.  ok djm@
regress/misc/sk-dummy/sk-dummy.c