summaryrefslogtreecommitdiff
path: root/lib/libcrypto/ripemd/rmd_one.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libcrypto/ripemd/rmd_one.c')
-rw-r--r--lib/libcrypto/ripemd/rmd_one.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/libcrypto/ripemd/rmd_one.c b/lib/libcrypto/ripemd/rmd_one.c
index efdf2dd6efc..f8b580c33a3 100644
--- a/lib/libcrypto/ripemd/rmd_one.c
+++ b/lib/libcrypto/ripemd/rmd_one.c
@@ -59,6 +59,7 @@
#include <stdio.h>
#include <string.h>
#include <openssl/ripemd.h>
+#include <openssl/crypto.h>
unsigned char *RIPEMD160(const unsigned char *d, unsigned long n,
unsigned char *md)
@@ -70,7 +71,7 @@ unsigned char *RIPEMD160(const unsigned char *d, unsigned long n,
RIPEMD160_Init(&c);
RIPEMD160_Update(&c,d,n);
RIPEMD160_Final(md,&c);
- memset(&c,0,sizeof(c)); /* security consideration */
+ OPENSSL_cleanse(&c,sizeof(c)); /* security consideration */
return(md);
}