summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/evp/digest.c
diff options
context:
space:
mode:
authormiod <>2014-04-13 15:25:35 +0000
committermiod <>2014-04-13 15:25:35 +0000
commit1fb5cf10c3e597dbb1ecc4dd423bba727fd7721a (patch)
tree74f4ff344980894c7c9ceeab9b81176ac7572566 /src/lib/libcrypto/evp/digest.c
parent92349eb53934e1b3e9b807e603d45417a6320d21 (diff)
downloadopenbsd-1fb5cf10c3e597dbb1ecc4dd423bba727fd7721a.tar.gz
openbsd-1fb5cf10c3e597dbb1ecc4dd423bba727fd7721a.tar.bz2
openbsd-1fb5cf10c3e597dbb1ecc4dd423bba727fd7721a.zip
Merge conflicts; remove MacOS, Netware, OS/2, VMS and Windows build machinery.
Diffstat (limited to 'src/lib/libcrypto/evp/digest.c')
-rw-r--r--src/lib/libcrypto/evp/digest.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/lib/libcrypto/evp/digest.c b/src/lib/libcrypto/evp/digest.c
index 467e6b5ae9..d14e8e48d5 100644
--- a/src/lib/libcrypto/evp/digest.c
+++ b/src/lib/libcrypto/evp/digest.c
@@ -267,6 +267,7 @@ int EVP_DigestFinal_ex(EVP_MD_CTX *ctx, unsigned char *md, unsigned int *size)
267 return FIPS_digestfinal(ctx, md, size); 267 return FIPS_digestfinal(ctx, md, size);
268#else 268#else
269 int ret; 269 int ret;
270
270 OPENSSL_assert(ctx->digest->md_size <= EVP_MAX_MD_SIZE); 271 OPENSSL_assert(ctx->digest->md_size <= EVP_MAX_MD_SIZE);
271 ret=ctx->digest->final(ctx,md); 272 ret=ctx->digest->final(ctx,md);
272 if (size != NULL) 273 if (size != NULL)
@@ -365,8 +366,11 @@ int EVP_Digest(const void *data, size_t count,
365 366
366void EVP_MD_CTX_destroy(EVP_MD_CTX *ctx) 367void EVP_MD_CTX_destroy(EVP_MD_CTX *ctx)
367 { 368 {
368 EVP_MD_CTX_cleanup(ctx); 369 if (ctx)
369 OPENSSL_free(ctx); 370 {
371 EVP_MD_CTX_cleanup(ctx);
372 OPENSSL_free(ctx);
373 }
370 } 374 }
371 375
372/* This call frees resources associated with the context */ 376/* This call frees resources associated with the context */