libmd provides symbols that have the same name, but (presumably) are not compatible, with libcrypto. As a result, a program linked against libmd cannot connect to an LDAP server using SSL, because libldap will resolve symbols in libmd, whereas it expects those from libcrypto. An annoying collateral is that crontab(1) will hang when using nss_ldap, because it is linked against libmd to get MD5. Various solutions are possible: * link libmd statically in crontab(1) * add -lcrypto before -lmd when linking crontab(1) * make libmd symbols consistent (ABI-compatible) with those in libcrypto * use different syumbol names in libmd to avoid the clash * remove libmd symbols that duplicate functionality from libcrypto * deprecate libmd altogether and use other hash functions from libcrypto.
Created attachment 155151 [details] patch to avoid the symbol clash
Patch submitted for review: https://reviews.freebsd.org/D2216
A commit references this bug: Author: thomas Date: Sun May 10 13:21:40 UTC 2015 New revision: 282726 URL: https://svnweb.freebsd.org/changeset/base/282726 Log: Ensure libmd symbols do not clash with libcrypto Add a prefix to all symbols in libmd to avoid incompatibilites with same-named, but not binary compatible, symbols from libcrypto. Also introduce Weak aliases to avoid the need to rebuild dependent binaries and a major version bump. PR: 199119 Differential Revision: D2216 Reviewed by: roberto, delphij MFC after: 2 weeks Changes: head/lib/libmd/md4.h head/lib/libmd/md4c.c head/lib/libmd/md5.h head/lib/libmd/md5c.c head/lib/libmd/mdXhl.c head/lib/libmd/ripemd.h head/lib/libmd/rmd160c.c head/lib/libmd/sha.h head/lib/libmd/sha1c.c head/lib/libmd/sha256.h head/lib/libmd/sha256c.c head/lib/libmd/sha512.h head/lib/libmd/sha512c.c head/lib/libmd/shadriver.c
A commit references this bug: Author: avg Date: Thu Feb 23 16:07:47 UTC 2017 New revision: 314144 URL: https://svnweb.freebsd.org/changeset/base/314144 Log: MFC r282726: Ensure libmd symbols do not clash with libcrypto Add a prefix to all symbols in libmd to avoid incompatibilites with same-named, but not binary compatible, symbols from libcrypto. Also introduce Weak aliases to avoid the need to rebuild dependent binaries and a major version bump. PR: 199119 Changes: _U stable/10/ stable/10/lib/libmd/md4.h stable/10/lib/libmd/md4c.c stable/10/lib/libmd/md5.h stable/10/lib/libmd/md5c.c stable/10/lib/libmd/mdXhl.c stable/10/lib/libmd/ripemd.h stable/10/lib/libmd/rmd160c.c stable/10/lib/libmd/sha.h stable/10/lib/libmd/sha1c.c stable/10/lib/libmd/sha256.h stable/10/lib/libmd/sha256c.c stable/10/lib/libmd/sha512.h stable/10/lib/libmd/sha512c.c stable/10/lib/libmd/shadriver.c