diff options
Diffstat (limited to 'openbsd-compat')
-rw-r--r-- | openbsd-compat/sha2.c | 2 | ||||
-rw-r--r-- | openbsd-compat/sha2.h | 4 |
2 files changed, 6 insertions, 0 deletions
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) | |||
835 | } | 835 | } |
836 | 836 | ||
837 | 837 | ||
838 | #if 0 | ||
838 | /*** SHA-384: *********************************************************/ | 839 | /*** SHA-384: *********************************************************/ |
839 | void | 840 | void |
840 | SHA384_Init(SHA384_CTX *context) | 841 | SHA384_Init(SHA384_CTX *context) |
@@ -872,5 +873,6 @@ SHA384_Final(u_int8_t digest[SHA384_DIGEST_LENGTH], SHA384_CTX *context) | |||
872 | /* Zero out state data */ | 873 | /* Zero out state data */ |
873 | memset(context, 0, sizeof(*context)); | 874 | memset(context, 0, sizeof(*context)); |
874 | } | 875 | } |
876 | #endif | ||
875 | 877 | ||
876 | #endif /* !defined(HAVE_SHA256_UPDATE) && !defined(HAVE_EVP_SHA256) */ | 878 | #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 { | |||
67 | u_int8_t buffer[SHA512_BLOCK_LENGTH]; | 67 | u_int8_t buffer[SHA512_BLOCK_LENGTH]; |
68 | } SHA512_CTX; | 68 | } SHA512_CTX; |
69 | 69 | ||
70 | #if 0 | ||
70 | typedef SHA512_CTX SHA384_CTX; | 71 | typedef SHA512_CTX SHA384_CTX; |
72 | #endif | ||
71 | 73 | ||
72 | void SHA256_Init(SHA256_CTX *); | 74 | void SHA256_Init(SHA256_CTX *); |
73 | void SHA256_Transform(u_int32_t state[8], const u_int8_t [SHA256_BLOCK_LENGTH]); | 75 | 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 *) | |||
86 | __attribute__((__bounded__(__string__,1,2))) | 88 | __attribute__((__bounded__(__string__,1,2))) |
87 | __attribute__((__bounded__(__minbytes__,3,SHA256_DIGEST_STRING_LENGTH))); | 89 | __attribute__((__bounded__(__minbytes__,3,SHA256_DIGEST_STRING_LENGTH))); |
88 | 90 | ||
91 | #if 0 | ||
89 | void SHA384_Init(SHA384_CTX *); | 92 | void SHA384_Init(SHA384_CTX *); |
90 | void SHA384_Transform(u_int64_t state[8], const u_int8_t [SHA384_BLOCK_LENGTH]); | 93 | void SHA384_Transform(u_int64_t state[8], const u_int8_t [SHA384_BLOCK_LENGTH]); |
91 | void SHA384_Update(SHA384_CTX *, const u_int8_t *, size_t) | 94 | 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) | |||
102 | char *SHA384_Data(const u_int8_t *, size_t, char *) | 105 | char *SHA384_Data(const u_int8_t *, size_t, char *) |
103 | __attribute__((__bounded__(__string__,1,2))) | 106 | __attribute__((__bounded__(__string__,1,2))) |
104 | __attribute__((__bounded__(__minbytes__,3,SHA384_DIGEST_STRING_LENGTH))); | 107 | __attribute__((__bounded__(__minbytes__,3,SHA384_DIGEST_STRING_LENGTH))); |
108 | #endif /* 0 */ | ||
105 | 109 | ||
106 | void SHA512_Init(SHA512_CTX *); | 110 | void SHA512_Init(SHA512_CTX *); |
107 | void SHA512_Transform(u_int64_t state[8], const u_int8_t [SHA512_BLOCK_LENGTH]); | 111 | void SHA512_Transform(u_int64_t state[8], const u_int8_t [SHA512_BLOCK_LENGTH]); |