diff options
author | Darren Tucker <dtucker@dtucker.net> | 2019-06-08 09:06:06 +1000 |
---|---|---|
committer | Darren Tucker <dtucker@dtucker.net> | 2019-06-14 14:22:39 +1000 |
commit | 7689048e6103d3c34cba24ac5aeea7bf8405d19a (patch) | |
tree | b6c610fbc97307770906725d19a05e30dde967c2 | |
parent | 55f3153393ac7e072a4b4b21b194864460d8f44a (diff) |
upstream rev 1.25: add DEF_WEAK.
Wrap blowfish, sha*, md5, and rmd160 so that internal calls go direct
ok deraadt@
-rw-r--r-- | openbsd-compat/sha1.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/openbsd-compat/sha1.c b/openbsd-compat/sha1.c index 07e37be7..2089ec34 100644 --- a/openbsd-compat/sha1.c +++ b/openbsd-compat/sha1.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sha1.c,v 1.25 2015/01/16 16:48:51 deraadt Exp $ */ +/* $OpenBSD: sha1.c,v 1.26 2015/09/11 09:18:27 guenther Exp $ */ /* * SHA-1 in C @@ -101,6 +101,7 @@ SHA1Transform(u_int32_t state[5], const u_int8_t buffer[SHA1_BLOCK_LENGTH]) /* Wipe variables */ a = b = c = d = e = 0; } +DEF_WEAK(SHA1Transform); /* @@ -118,6 +119,7 @@ SHA1Init(SHA1_CTX *context) context->state[3] = 0x10325476; context->state[4] = 0xC3D2E1F0; } +DEF_WEAK(SHA1Init); /* @@ -141,6 +143,7 @@ SHA1Update(SHA1_CTX *context, const u_int8_t *data, size_t len) } (void)memcpy(&context->buffer[j], &data[i], len - i); } +DEF_WEAK(SHA1Update); /* @@ -161,6 +164,7 @@ SHA1Pad(SHA1_CTX *context) SHA1Update(context, (u_int8_t *)"\0", 1); SHA1Update(context, finalcount, 8); /* Should cause a SHA1Transform() */ } +DEF_WEAK(SHA1Pad); void SHA1Final(u_int8_t digest[SHA1_DIGEST_LENGTH], SHA1_CTX *context) @@ -174,4 +178,5 @@ SHA1Final(u_int8_t digest[SHA1_DIGEST_LENGTH], SHA1_CTX *context) } explicit_bzero(context, sizeof(*context)); } +DEF_WEAK(SHA1Final); #endif /* !WITH_OPENSSL */ |