diff options
Diffstat (limited to 'crypto/openssl/crypto/sha/sha_one.c')
-rw-r--r-- | crypto/openssl/crypto/sha/sha_one.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/crypto/openssl/crypto/sha/sha_one.c b/crypto/openssl/crypto/sha/sha_one.c index 2d955de..e61c63f 100644 --- a/crypto/openssl/crypto/sha/sha_one.c +++ b/crypto/openssl/crypto/sha/sha_one.c @@ -59,8 +59,9 @@ #include <stdio.h> #include <string.h> #include <openssl/sha.h> +#include <openssl/crypto.h> -#ifndef NO_SHA0 +#ifndef OPENSSL_NO_SHA0 unsigned char *SHA(const unsigned char *d, unsigned long n, unsigned char *md) { SHA_CTX c; @@ -70,7 +71,7 @@ unsigned char *SHA(const unsigned char *d, unsigned long n, unsigned char *md) SHA_Init(&c); SHA_Update(&c,d,n); SHA_Final(md,&c); - memset(&c,0,sizeof(c)); + OPENSSL_cleanse(&c,sizeof(c)); return(md); } #endif |