From 3bd55be742aec60a93ebcdebc325b49737cd6642 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Tue, 12 Dec 2017 11:29:02 +0100 Subject: lib/sha1: use ul_/UL_prefix for symbols Unfortunately, the symbols are visible in statically compiled libuuid and the names are too generic. Addresses: https://github.com/karelzak/util-linux/issues/548 Signed-off-by: Karel Zak --- libuuid/src/gen_uuid.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'libuuid') diff --git a/libuuid/src/gen_uuid.c b/libuuid/src/gen_uuid.c index cf7cacd55..431bf2064 100644 --- a/libuuid/src/gen_uuid.c +++ b/libuuid/src/gen_uuid.c @@ -589,15 +589,15 @@ void uuid_generate_md5(uuid_t out, const uuid_t ns, const char *name, size_t len */ void uuid_generate_sha1(uuid_t out, const uuid_t ns, const char *name, size_t len) { - SHA1_CTX ctx; - char hash[SHA1LENGTH]; + UL_SHA1_CTX ctx; + char hash[UL_SHA1LENGTH]; - SHA1Init(&ctx); + ul_SHA1Init(&ctx); /* hash concatenation of well-known UUID with name */ - SHA1Update(&ctx, ns, sizeof(uuid_t)); - SHA1Update(&ctx, (const unsigned char *)name, len); + ul_SHA1Update(&ctx, ns, sizeof(uuid_t)); + ul_SHA1Update(&ctx, (const unsigned char *)name, len); - SHA1Final((unsigned char *)hash, &ctx); + ul_SHA1Final((unsigned char *)hash, &ctx); memcpy(out, hash, sizeof(uuid_t)); -- cgit v1.2.3-55-g7522