aboutsummaryrefslogtreecommitdiff
path: root/include/openssl/whrlpool.h
diff options
context:
space:
mode:
authorPauli <paul.dale@oracle.com>2020-01-08 15:13:11 +1000
committerPauli <paul.dale@oracle.com>2020-01-12 12:05:04 +1000
commit7c3aa39fe38a70450b5bf3665ca48be80c5ff287 (patch)
tree5ee022ba2334c7078908237ed36259e2fd49bf95 /include/openssl/whrlpool.h
parentc52ec197aae43e624702a79cdbb73a1d2c7c9d09 (diff)
downloadopenssl-7c3aa39fe38a70450b5bf3665ca48be80c5ff287.zip
openssl-7c3aa39fe38a70450b5bf3665ca48be80c5ff287.tar.gz
openssl-7c3aa39fe38a70450b5bf3665ca48be80c5ff287.tar.bz2
Deprecate the low level Whirlpool functions.
Use of the low level Whirlpool functions has been informally discouraged for a long time. We now formally deprecate them. Applications should instead use the EVP APIs, e.g. EVP_Digest, EVP_DigestInit_ex, EVP_DigestUpdate and EVP_DigestFinal_ex. Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org> (Merged from https://github.com/openssl/openssl/pull/10779)
Diffstat (limited to 'include/openssl/whrlpool.h')
-rw-r--r--include/openssl/whrlpool.h27
1 files changed, 18 insertions, 9 deletions
diff --git a/include/openssl/whrlpool.h b/include/openssl/whrlpool.h
index 89adca6..d2a483c 100644
--- a/include/openssl/whrlpool.h
+++ b/include/openssl/whrlpool.h
@@ -26,8 +26,11 @@ extern "C" {
# endif
# define WHIRLPOOL_DIGEST_LENGTH (512/8)
-# define WHIRLPOOL_BBLOCK 512
-# define WHIRLPOOL_COUNTER (256/8)
+
+# if !defined(OPENSSL_NO_DEPRECATED_3_0)
+
+# define WHIRLPOOL_BBLOCK 512
+# define WHIRLPOOL_COUNTER (256/8)
typedef struct {
union {
@@ -39,15 +42,21 @@ typedef struct {
unsigned int bitoff;
size_t bitlen[WHIRLPOOL_COUNTER / sizeof(size_t)];
} WHIRLPOOL_CTX;
+# endif
-int WHIRLPOOL_Init(WHIRLPOOL_CTX *c);
-int WHIRLPOOL_Update(WHIRLPOOL_CTX *c, const void *inp, size_t bytes);
-void WHIRLPOOL_BitUpdate(WHIRLPOOL_CTX *c, const void *inp, size_t bits);
-int WHIRLPOOL_Final(unsigned char *md, WHIRLPOOL_CTX *c);
-unsigned char *WHIRLPOOL(const void *inp, size_t bytes, unsigned char *md);
-
-# ifdef __cplusplus
+DEPRECATEDIN_3_0(int WHIRLPOOL_Init(WHIRLPOOL_CTX *c))
+DEPRECATEDIN_3_0(int WHIRLPOOL_Update(WHIRLPOOL_CTX *c,
+ const void *inp, size_t bytes))
+DEPRECATEDIN_3_0(void WHIRLPOOL_BitUpdate(WHIRLPOOL_CTX *c, const void *inp,
+ size_t bits))
+DEPRECATEDIN_3_0(int WHIRLPOOL_Final(unsigned char *md, WHIRLPOOL_CTX *c))
+DEPRECATEDIN_3_0(unsigned char *WHIRLPOOL(const void *inp, size_t bytes,
+ unsigned char *md))
+
+# if !defined(OPENSSL_NO_DEPRECATED_3_0)
+# ifdef __cplusplus
}
+# endif
# endif
# endif