diff options
Diffstat (limited to 'crypto/openssl/crypto/sha/sha1_one.c')
-rw-r--r-- | crypto/openssl/crypto/sha/sha1_one.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/crypto/openssl/crypto/sha/sha1_one.c b/crypto/openssl/crypto/sha/sha1_one.c index 861752e..20e660c 100644 --- a/crypto/openssl/crypto/sha/sha1_one.c +++ b/crypto/openssl/crypto/sha/sha1_one.c @@ -59,8 +59,9 @@ #include <stdio.h> #include <string.h> #include <openssl/sha.h> +#include <openssl/crypto.h> -#ifndef NO_SHA1 +#ifndef OPENSSL_NO_SHA1 unsigned char *SHA1(const unsigned char *d, unsigned long n, unsigned char *md) { SHA_CTX c; @@ -70,7 +71,7 @@ unsigned char *SHA1(const unsigned char *d, unsigned long n, unsigned char *md) SHA1_Init(&c); SHA1_Update(&c,d,n); SHA1_Final(md,&c); - memset(&c,0,sizeof(c)); + OPENSSL_cleanse(&c,sizeof(c)); return(md); } #endif |