diff options
Diffstat (limited to 'src/lib/libcrypto/sha')
-rw-r--r-- | src/lib/libcrypto/sha/Makefile | 2 | ||||
-rw-r--r-- | src/lib/libcrypto/sha/sha_one.c | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/lib/libcrypto/sha/Makefile b/src/lib/libcrypto/sha/Makefile index 0426786aa0..46103bbc83 100644 --- a/src/lib/libcrypto/sha/Makefile +++ b/src/lib/libcrypto/sha/Makefile | |||
@@ -1,5 +1,5 @@ | |||
1 | # | 1 | # |
2 | # SSLeay/crypto/sha/Makefile | 2 | # OpenSSL/crypto/sha/Makefile |
3 | # | 3 | # |
4 | 4 | ||
5 | DIR= sha | 5 | DIR= sha |
diff --git a/src/lib/libcrypto/sha/sha_one.c b/src/lib/libcrypto/sha/sha_one.c index e61c63f3e9..d4f4d344df 100644 --- a/src/lib/libcrypto/sha/sha_one.c +++ b/src/lib/libcrypto/sha/sha_one.c | |||
@@ -68,7 +68,8 @@ unsigned char *SHA(const unsigned char *d, unsigned long n, unsigned char *md) | |||
68 | static unsigned char m[SHA_DIGEST_LENGTH]; | 68 | static unsigned char m[SHA_DIGEST_LENGTH]; |
69 | 69 | ||
70 | if (md == NULL) md=m; | 70 | if (md == NULL) md=m; |
71 | SHA_Init(&c); | 71 | if (!SHA_Init(&c)) |
72 | return NULL; | ||
72 | SHA_Update(&c,d,n); | 73 | SHA_Update(&c,d,n); |
73 | SHA_Final(md,&c); | 74 | SHA_Final(md,&c); |
74 | OPENSSL_cleanse(&c,sizeof(c)); | 75 | OPENSSL_cleanse(&c,sizeof(c)); |