diff options
author | thomas <thomas@FreeBSD.org> | 2015-05-10 13:21:36 +0000 |
---|---|---|
committer | thomas <thomas@FreeBSD.org> | 2015-05-10 13:21:36 +0000 |
commit | 398e09896a073bed0b23e5a1f51d2ca561de8f31 (patch) | |
tree | 830f8cd4bac6ac9eb1bef6cb1679a7adb8e13809 /lib/libmd/md5c.c | |
parent | 6a841c4bb74150d38d7156deff66f5b8fefddf43 (diff) | |
download | FreeBSD-src-398e09896a073bed0b23e5a1f51d2ca561de8f31.zip FreeBSD-src-398e09896a073bed0b23e5a1f51d2ca561de8f31.tar.gz |
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
Diffstat (limited to 'lib/libmd/md5c.c')
-rw-r--r-- | lib/libmd/md5c.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/lib/libmd/md5c.c b/lib/libmd/md5c.c index d097390..bfbb531 100644 --- a/lib/libmd/md5c.c +++ b/lib/libmd/md5c.c @@ -39,7 +39,7 @@ __FBSDID("$FreeBSD$"); #include <machine/endian.h> #include <sys/endian.h> -#include <sys/md5.h> +#include "md5.h" static void MD5Transform(u_int32_t [4], const unsigned char [64]); @@ -335,3 +335,14 @@ MD5Transform (state, block) /* Zeroize sensitive information. */ memset ((void *)x, 0, sizeof (x)); } + +#undef MD5Init +__weak_reference(_libmd_MD5Init, MD5Init); +#undef MD5Update +__weak_reference(_libmd_MD5Update, MD5Update); +#undef MD5Pad +__weak_reference(_libmd_MD5Pad, MD5Pad); +#undef MD5Final +__weak_reference(_libmd_MD5Final, MD5Final); +#undef MD5Transform +__weak_reference(_libmd_MD5Transform, MD5Transform); |