diff options
author | Dr. David von Oheimb <David.von.Oheimb@siemens.com> | 2021-03-29 19:32:48 +0200 |
---|---|---|
committer | Dr. David von Oheimb <David.von.Oheimb@siemens.com> | 2021-05-08 14:41:36 +0200 |
commit | 4d49b68504cc494e552bce8e0b82ec8b501d5abe (patch) | |
tree | 24870549aee659def396116715f8d10c1ea71de3 /crypto/sha/sha256.c | |
parent | 0a8a6afdfb71e42962921980b51942cea8632697 (diff) |
Crypto: Add deprecation compatibility declarations for SHA* message digest functions
Also add hints to SHA256_Init.pod and CHANGES.md how to replace SHA256() etc.
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/14741)
Diffstat (limited to 'crypto/sha/sha256.c')
-rw-r--r-- | crypto/sha/sha256.c | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/crypto/sha/sha256.c b/crypto/sha/sha256.c index 4fa68953d1..7b3855f301 100644 --- a/crypto/sha/sha256.c +++ b/crypto/sha/sha256.c @@ -53,34 +53,6 @@ int SHA256_Init(SHA256_CTX *c) return 1; } -unsigned char *SHA224(const unsigned char *d, size_t n, unsigned char *md) -{ - SHA256_CTX c; - static unsigned char m[SHA224_DIGEST_LENGTH]; - - if (md == NULL) - md = m; - SHA224_Init(&c); - SHA256_Update(&c, d, n); - SHA256_Final(md, &c); - OPENSSL_cleanse(&c, sizeof(c)); - return md; -} - -unsigned char *SHA256(const unsigned char *d, size_t n, unsigned char *md) -{ - SHA256_CTX c; - static unsigned char m[SHA256_DIGEST_LENGTH]; - - if (md == NULL) - md = m; - SHA256_Init(&c); - SHA256_Update(&c, d, n); - SHA256_Final(md, &c); - OPENSSL_cleanse(&c, sizeof(c)); - return md; -} - int SHA224_Update(SHA256_CTX *c, const void *data, size_t len) { return SHA256_Update(c, data, len); |