security/rhash failed to build if I has unchecked option MD4 (marked as unsafe) in security/openssl: make[3]: stopped in /usr/ports/security/rhash/work/RHash-1.3.9/librhash --- librhash/librhash.so.0 --- plug_openssl.c:92:1: error: expected expression WRAP_FINAL(MD4) ^ plug_openssl.c:86:26: note: expanded from macro 'WRAP_FINAL' #define WRAP_FINAL(name) WRAP_FINAL2(name, name##_CTX) ^ plug_openssl.c:89:38: note: expanded from macro 'WRAP_FINAL2' CALL_FINAL(name, result, (CTX_TYPE*)ctx); \ ^ plug_openssl.c:92:1: error: use of undeclared identifier 'MD4_CTX' plug_openssl.c:86:44: note: expanded from macro 'WRAP_FINAL' #define WRAP_FINAL(name) WRAP_FINAL2(name, name##_CTX) ^ <scratch space>:43:1: note: expanded from here MD4_CTX ^ plug_openssl.c:92:1: warning: unused parameter 'ctx' [-Wunused-parameter] plug_openssl.c:86:26: note: expanded from macro 'WRAP_FINAL' #define WRAP_FINAL(name) WRAP_FINAL2(name, name##_CTX) ^ plug_openssl.c:88:39: note: expanded from macro 'WRAP_FINAL2' static void wrap##name##_Final(void* ctx, unsigned char* result) { \ ^ plug_openssl.c:117:22: error: use of undeclared identifier 'MD4_CTX' { &info_md4, sizeof(MD4_CTX), offsetof(MD4_CTX, A), HASH_INFO_METHODS(MD4) }, /* 128 bit */ ^ plug_openssl.c:117:41: error: unknown type name 'MD4_CTX'; did you mean 'MD5_CTX'? { &info_md4, sizeof(MD4_CTX), offsetof(MD4_CTX, A), HASH_INFO_METHODS(MD4) }, /* 128 bit */ ^~~~~~~ MD5_CTX /usr/include/stddef.h:75:42: note: expanded from macro 'offsetof' #define offsetof(type, field) __offsetof(type, field) ^ /usr/include/sys/cdefs.h:476:53: note: expanded from macro '__offsetof' #define __offsetof(type, field) __builtin_offsetof(type, field) ^ /usr/local/include/openssl/md5.h:38:3: note: 'MD5_CTX' declared here } MD5_CTX; ^ plug_openssl.c:231:30: error: invalid application of 'sizeof' to an incomplete type 'rhash_hash_info []' for (i = 0; i < (int)(sizeof(rhash_openssl_methods) / sizeof(rhash_hash_info)); i++) ^~~~~~~~~~~~~~~~~~~~~~~ 1 warning and 5 errors generated. --- librhash/librhash.a --- 1 error May be security/rhash port needs some dependency check for MD4 OpenSSL option?
Over to maintainer
Upstream issue > https://github.com/rhash/RHash/blob/master/librhash/plug_openssl.c You can see that RIPEMD is optional, but MD4 is not. Needs to be fixed.
A commit references this bug: Author: danfe Date: Wed Nov 11 03:13:37 UTC 2020 New revision: 554868 URL: https://svnweb.freebsd.org/changeset/ports/554868 Log: Unbreak the build against OpenSSL without MD4 support. PR: 250578 Changes: head/security/rhash/files/patch-librhash_plug__openssl.c
(In reply to Bernard Spil from comment #2) > You can see that RIPEMD is optional, but MD4 is not. Needs to be fixed. I've submitted the patch upstream as https://sourceforge.net/p/rhash/patches/7/ (meanwhile, committed as ports r554868).