summaryrefslogtreecommitdiff
path: root/src/lib/libssl/ssl_lib.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libssl/ssl_lib.c')
-rw-r--r--src/lib/libssl/ssl_lib.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/lib/libssl/ssl_lib.c b/src/lib/libssl/ssl_lib.c
index e809ff0bc0..8dbd4a3f39 100644
--- a/src/lib/libssl/ssl_lib.c
+++ b/src/lib/libssl/ssl_lib.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssl_lib.c,v 1.93 2014/12/14 14:34:43 jsing Exp $ */ 1/* $OpenBSD: ssl_lib.c,v 1.94 2014/12/15 00:46:53 doug Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -3033,8 +3033,12 @@ ssl_replace_hash(EVP_MD_CTX **hash, const EVP_MD *md)
3033{ 3033{
3034 ssl_clear_hash_ctx(hash); 3034 ssl_clear_hash_ctx(hash);
3035 *hash = EVP_MD_CTX_create(); 3035 *hash = EVP_MD_CTX_create();
3036 if (*hash != NULL && md != NULL) 3036 if (*hash != NULL && md != NULL) {
3037 EVP_DigestInit_ex(*hash, md, NULL); 3037 if (!EVP_DigestInit_ex(*hash, md, NULL)) {
3038 ssl_clear_hash_ctx(hash);
3039 return (NULL);
3040 }
3041 }
3038 return (*hash); 3042 return (*hash);
3039} 3043}
3040 3044