From 34877d2e1744237569555c73afbed02e338218f2 Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Wed, 15 Mar 2006 14:36:55 +1100 Subject: [PATCH] - (djm) [openbsd-compat/sha2.h openbsd-compat/sha2.c] Comment out SHA384, which we don't need and doesn't compile without tweaks --- ChangeLog | 4 +++- openbsd-compat/sha2.c | 2 ++ openbsd-compat/sha2.h | 4 ++++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 54bfc7c06..d361e71f2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -256,6 +256,8 @@ system sha2.h - (djm) [ssh-rand-helper.c] Needs a bunch of headers - (djm) [ssh-agent.c] Restore dropped stat.h + - (djm) [openbsd-compat/sha2.h openbsd-compat/sha2.c] Comment out + SHA384, which we don't need and doesn't compile without tweaks 20060313 - (dtucker) [configure.ac] Bug #1171: Don't use printf("%lld", longlong) @@ -4157,4 +4159,4 @@ - (djm) Trim deprecated options from INSTALL. Mention UsePAM - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu -$Id: ChangeLog,v 1.4216 2006/03/15 03:03:06 djm Exp $ +$Id: ChangeLog,v 1.4217 2006/03/15 03:37:48 djm Exp $ diff --git a/openbsd-compat/sha2.c b/openbsd-compat/sha2.c index d04fb25f7..36ab60e62 100644 --- a/openbsd-compat/sha2.c +++ b/openbsd-compat/sha2.c @@ -835,6 +835,7 @@ SHA512_Final(u_int8_t digest[SHA512_DIGEST_LENGTH], SHA512_CTX *context) } +#if 0 /*** SHA-384: *********************************************************/ void SHA384_Init(SHA384_CTX *context) @@ -872,5 +873,6 @@ SHA384_Final(u_int8_t digest[SHA384_DIGEST_LENGTH], SHA384_CTX *context) /* Zero out state data */ memset(context, 0, sizeof(*context)); } +#endif #endif /* !defined(HAVE_SHA256_UPDATE) && !defined(HAVE_EVP_SHA256) */ diff --git a/openbsd-compat/sha2.h b/openbsd-compat/sha2.h index 5e2641c4b..1d6aa61e9 100644 --- a/openbsd-compat/sha2.h +++ b/openbsd-compat/sha2.h @@ -67,7 +67,9 @@ typedef struct _SHA512_CTX { u_int8_t buffer[SHA512_BLOCK_LENGTH]; } SHA512_CTX; +#if 0 typedef SHA512_CTX SHA384_CTX; +#endif void SHA256_Init(SHA256_CTX *); void SHA256_Transform(u_int32_t state[8], const u_int8_t [SHA256_BLOCK_LENGTH]); @@ -86,6 +88,7 @@ char *SHA256_Data(const u_int8_t *, size_t, char *) __attribute__((__bounded__(__string__,1,2))) __attribute__((__bounded__(__minbytes__,3,SHA256_DIGEST_STRING_LENGTH))); +#if 0 void SHA384_Init(SHA384_CTX *); void SHA384_Transform(u_int64_t state[8], const u_int8_t [SHA384_BLOCK_LENGTH]); void SHA384_Update(SHA384_CTX *, const u_int8_t *, size_t) @@ -102,6 +105,7 @@ char *SHA384_FileChunk(const char *, char *, off_t, off_t) char *SHA384_Data(const u_int8_t *, size_t, char *) __attribute__((__bounded__(__string__,1,2))) __attribute__((__bounded__(__minbytes__,3,SHA384_DIGEST_STRING_LENGTH))); +#endif /* 0 */ void SHA512_Init(SHA512_CTX *); void SHA512_Transform(u_int64_t state[8], const u_int8_t [SHA512_BLOCK_LENGTH]);