diff options
author | Enji Cooper <ngie@FreeBSD.org> | 2017-01-14 07:58:40 +0000 |
---|---|---|
committer | Enji Cooper <ngie@FreeBSD.org> | 2017-01-14 07:58:40 +0000 |
commit | 1cb4521644cce766187093f9a4ec5cd045f8b702 (patch) | |
tree | c16a99a5854721274840702f242ba3c93a895de0 /contrib | |
parent | 59754238a2b87589ec52d3befb2989e448cef35d (diff) | |
download | src-1cb4521644cce766187093f9a4ec5cd045f8b702.tar.gz src-1cb4521644cce766187093f9a4ec5cd045f8b702.zip |
Diff reduce with upstream using lib/libnetbsd's updated copy of sha1.h
Notes
Notes:
svn path=/projects/netbsd-tests-upstream-01-2017/; revision=312136
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/netbsd-tests/lib/libc/hash/h_hash.c | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/contrib/netbsd-tests/lib/libc/hash/h_hash.c b/contrib/netbsd-tests/lib/libc/hash/h_hash.c index 6e20a4889a25..58e4e6258baf 100644 --- a/contrib/netbsd-tests/lib/libc/hash/h_hash.c +++ b/contrib/netbsd-tests/lib/libc/hash/h_hash.c @@ -35,13 +35,7 @@ #include <unistd.h> #include <string.h> #include <md5.h> -#ifdef __NetBSD__ #include <sha1.h> -#endif - -#ifdef __FreeBSD__ -#include <sha.h> -#endif int mflag, rflag, sflag, tflag; @@ -107,32 +101,17 @@ regress(void) MD5Final(out, &ctx); outlen = 16; } else { -#ifdef __FreeBSD__ - SHA_CTX ctx; - - SHA1_Init(&ctx); - SHA1_Update(&ctx, buf, len); -#else SHA1_CTX ctx; SHA1Init(&ctx); SHA1Update(&ctx, buf, len); -#endif while (!last && fgets((char *)buf, sizeof(buf), stdin) != NULL) { len = strlen((char *)buf); CHOMP(buf, len, last); -#ifdef __FreeBSD__ - SHA1_Update(&ctx, buf, len); -#else SHA1Update(&ctx, buf, len); -#endif } -#ifdef __FreeBSD__ - SHA1_Final(out, &ctx); -#else SHA1Final(out, &ctx); -#endif outlen = 20; } hexdump(out, outlen); |