sys/crypto/sha1.c is missing the include file of sys/endian.h so the check like the following won't work. And since unsupported is not defined any check of BYTE_ORDR following this always evaluate to true. See sha1_step and sha1_result for the reference of BYTE_ORDER. Problem occurs when communicating to non-BSD system. /* sanity check */ #if BYTE_ORDER != BIG_ENDIAN # if BYTE_ORDER != LITTLE_ENDIAN # define unsupported 1 # endif #endif
From what it looks like, endian.h is included through other headers (e.g., types.h which includes machine/endian.h, which ultimately defined the endianess macros used here), so this shouldn't be an issue. Could you elaborate on what kind of communication issues with non-BSD systems you are seeing? Are you referring to IPsec use, or something else? If you provide more details, maybe we can help you diagnose the problem you're seeing.
Thanks for the information. The system where the BSD code is ported does not have endian.h in sys/types.h. We already took care of the problem. Consider this not-a-bug. Thanks!
Thanks for the update, that explains it. Sorry for the long reaction time to this report!