Control: tags -1 + patch

Hi again,

Attached is a possibly upstreamable patch that solves our problem
(but the base problem still exists in the code for anyone wishing to
build with openssl disabled).

See description in patch itself.

Regards,
Andreas Henriksson
Description: sk-usbhid.c: Only include sha2.h if building without openssl
Author: Andreas Henriksson <andr...@fatal.se>
Bug-Debian: https://bugs.debian.org/982705

There are many sha2.h and including both the openbsd-compat/sha2.h and
the (libmd) /usr/include/sha2.h causes build problems.

Other files like hash.c etc only includes the sha2.h if building
without openssl. It seems like the code in sk-usbhid.c also doesn't
really need to include it since it prefers using openssl already,
so just reorder the includes similar to hash.c and others to avoid
hitting this problem. (The underlying problem likely still needs to be
resolved for anyone who wishes to actually build without openssl
though.)

Forwarded: TODO
Last-Update: 2021-02-14

--- openssh-8.4p1.orig/sk-usbhid.c
+++ openssh-8.4p1/sk-usbhid.c
@@ -26,9 +26,6 @@
 #include <stdio.h>
 #include <stddef.h>
 #include <stdarg.h>
-#ifdef HAVE_SHA2_H
-#include <sha2.h>
-#endif
 
 #ifdef WITH_OPENSSL
 #include <openssl/opensslv.h>
@@ -37,6 +34,10 @@
 #include <openssl/ec.h>
 #include <openssl/ecdsa.h>
 #include <openssl/evp.h>
+#else
+# ifdef HAVE_SHA2_H
+#  include <sha2.h>
+# endif
 #endif /* WITH_OPENSSL */
 
 #include <fido.h>

Reply via email to