diff options
| author | jsing <> | 2023-05-27 18:33:34 +0000 |
|---|---|---|
| committer | jsing <> | 2023-05-27 18:33:34 +0000 |
| commit | 4de21666f8205fc59325362100bde121ed1b1bf2 (patch) | |
| tree | 2aba87af10192061caa6b2772c8b2e0eefd6191d /src | |
| parent | cd22333d8714a2da897059840fcb79f6b2e3d4fb (diff) | |
| download | openbsd-4de21666f8205fc59325362100bde121ed1b1bf2.tar.gz openbsd-4de21666f8205fc59325362100bde121ed1b1bf2.tar.bz2 openbsd-4de21666f8205fc59325362100bde121ed1b1bf2.zip | |
Add HASH_NO_UPDATE and HASH_NO_TRANSFORM to md32_common.h
This makes it possible to still use minimal parts of md32_common.h, while
disabling the update and transform functions.
ok beck@ tb@
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/libcrypto/md32_common.h | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/lib/libcrypto/md32_common.h b/src/lib/libcrypto/md32_common.h index cce4cfb0f7..ccd6db53fb 100644 --- a/src/lib/libcrypto/md32_common.h +++ b/src/lib/libcrypto/md32_common.h | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: md32_common.h,v 1.24 2023/04/12 04:54:15 jsing Exp $ */ | 1 | /* $OpenBSD: md32_common.h,v 1.25 2023/05/27 18:33:34 jsing Exp $ */ |
| 2 | /* ==================================================================== | 2 | /* ==================================================================== |
| 3 | * Copyright (c) 1999-2007 The OpenSSL Project. All rights reserved. | 3 | * Copyright (c) 1999-2007 The OpenSSL Project. All rights reserved. |
| 4 | * | 4 | * |
| @@ -127,10 +127,10 @@ | |||
| 127 | #error "HASH_CTX must be defined!" | 127 | #error "HASH_CTX must be defined!" |
| 128 | #endif | 128 | #endif |
| 129 | 129 | ||
| 130 | #ifndef HASH_UPDATE | 130 | #if !defined(HASH_UPDATE) && !defined(HASH_NO_UPDATE) |
| 131 | #error "HASH_UPDATE must be defined!" | 131 | #error "HASH_UPDATE must be defined!" |
| 132 | #endif | 132 | #endif |
| 133 | #ifndef HASH_TRANSFORM | 133 | #if !defined(HASH_TRANSFORM) && !defined(HASH_NO_TRANSFORM) |
| 134 | #error "HASH_TRANSFORM must be defined!" | 134 | #error "HASH_TRANSFORM must be defined!" |
| 135 | #endif | 135 | #endif |
| 136 | #if !defined(HASH_FINAL) && !defined(HASH_NO_FINAL) | 136 | #if !defined(HASH_FINAL) && !defined(HASH_NO_FINAL) |
| @@ -206,6 +206,7 @@ | |||
| 206 | * Time for some action:-) | 206 | * Time for some action:-) |
| 207 | */ | 207 | */ |
| 208 | 208 | ||
| 209 | #ifndef HASH_NO_UPDATE | ||
| 209 | int | 210 | int |
| 210 | HASH_UPDATE(HASH_CTX *c, const void *data_, size_t len) | 211 | HASH_UPDATE(HASH_CTX *c, const void *data_, size_t len) |
| 211 | { | 212 | { |
| @@ -259,13 +260,14 @@ HASH_UPDATE(HASH_CTX *c, const void *data_, size_t len) | |||
| 259 | } | 260 | } |
| 260 | return 1; | 261 | return 1; |
| 261 | } | 262 | } |
| 263 | #endif | ||
| 262 | 264 | ||
| 263 | 265 | #ifndef HASH_NO_TRANSFORM | |
| 264 | void HASH_TRANSFORM (HASH_CTX *c, const unsigned char *data) | 266 | void HASH_TRANSFORM (HASH_CTX *c, const unsigned char *data) |
| 265 | { | 267 | { |
| 266 | HASH_BLOCK_DATA_ORDER (c, data, 1); | 268 | HASH_BLOCK_DATA_ORDER (c, data, 1); |
| 267 | } | 269 | } |
| 268 | 270 | #endif | |
| 269 | 271 | ||
| 270 | #ifndef HASH_NO_FINAL | 272 | #ifndef HASH_NO_FINAL |
| 271 | int HASH_FINAL (unsigned char *md, HASH_CTX *c) | 273 | int HASH_FINAL (unsigned char *md, HASH_CTX *c) |
