diff options
| author | miod <> | 2014-04-13 15:16:40 +0000 | 
|---|---|---|
| committer | miod <> | 2014-04-13 15:16:40 +0000 | 
| commit | 52628ee3f51f011b463aaedb1a28aa0524b43cb3 (patch) | |
| tree | 4bd2adeac981051908ec5756401424bbb4e57d6a /src/lib/libcrypto/evp/digest.c | |
| parent | 40c22d3625a3818690c889ed6216fedf2be522c9 (diff) | |
| download | openbsd-52628ee3f51f011b463aaedb1a28aa0524b43cb3.tar.gz openbsd-52628ee3f51f011b463aaedb1a28aa0524b43cb3.tar.bz2 openbsd-52628ee3f51f011b463aaedb1a28aa0524b43cb3.zip | |
Import OpenSSL 1.0.1g
Diffstat (limited to 'src/lib/libcrypto/evp/digest.c')
| -rw-r--r-- | src/lib/libcrypto/evp/digest.c | 8 | 
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 | ||
| 366 | void EVP_MD_CTX_destroy(EVP_MD_CTX *ctx) | 367 | void 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 */ | 
