summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/sha/sha_one.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/sha/sha_one.c')
-rw-r--r--src/lib/libcrypto/sha/sha_one.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/libcrypto/sha/sha_one.c b/src/lib/libcrypto/sha/sha_one.c
index 5426faae4a..e61c63f3e9 100644
--- a/src/lib/libcrypto/sha/sha_one.c
+++ b/src/lib/libcrypto/sha/sha_one.c
@@ -59,6 +59,7 @@
59#include <stdio.h> 59#include <stdio.h>
60#include <string.h> 60#include <string.h>
61#include <openssl/sha.h> 61#include <openssl/sha.h>
62#include <openssl/crypto.h>
62 63
63#ifndef OPENSSL_NO_SHA0 64#ifndef OPENSSL_NO_SHA0
64unsigned char *SHA(const unsigned char *d, unsigned long n, unsigned char *md) 65unsigned char *SHA(const unsigned char *d, unsigned long n, unsigned char *md)
@@ -70,7 +71,7 @@ unsigned char *SHA(const unsigned char *d, unsigned long n, unsigned char *md)
70 SHA_Init(&c); 71 SHA_Init(&c);
71 SHA_Update(&c,d,n); 72 SHA_Update(&c,d,n);
72 SHA_Final(md,&c); 73 SHA_Final(md,&c);
73 memset(&c,0,sizeof(c)); 74 OPENSSL_cleanse(&c,sizeof(c));
74 return(md); 75 return(md);
75 } 76 }
76#endif 77#endif