projects
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
RT3548: Remove some unsupported platforms.
[openssl.git]
/
crypto
/
ripemd
/
rmd_one.c
diff --git
a/crypto/ripemd/rmd_one.c
b/crypto/ripemd/rmd_one.c
index 582cd31e25aef4baf364a75c97fa53a10cc50594..3efb13758f664707207bb8a43535a2e8450c0420 100644
(file)
--- a/
crypto/ripemd/rmd_one.c
+++ b/
crypto/ripemd/rmd_one.c
@@
-57,19
+57,22
@@
*/
#include <stdio.h>
*/
#include <stdio.h>
+#include <string.h>
#include <openssl/ripemd.h>
#include <openssl/ripemd.h>
+#include <openssl/crypto.h>
-unsigned char *RIPEMD160(
unsigned char *d, unsigned long
n,
+unsigned char *RIPEMD160(
const unsigned char *d, size_t
n,
unsigned char *md)
{
RIPEMD160_CTX c;
static unsigned char m[RIPEMD160_DIGEST_LENGTH];
if (md == NULL) md=m;
unsigned char *md)
{
RIPEMD160_CTX c;
static unsigned char m[RIPEMD160_DIGEST_LENGTH];
if (md == NULL) md=m;
- RIPEMD160_Init(&c);
+ if (!RIPEMD160_Init(&c))
+ return NULL;
RIPEMD160_Update(&c,d,n);
RIPEMD160_Final(md,&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);
}
return(md);
}