diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/libssl/s3_clnt.c | 5 | ||||
-rw-r--r-- | src/lib/libssl/src/ssl/s3_clnt.c | 5 | ||||
-rw-r--r-- | src/lib/libssl/src/ssl/s3_enc.c | 4 | ||||
-rw-r--r-- | src/lib/libssl/src/ssl/ssl_lib.c | 2 | ||||
-rw-r--r-- | src/lib/libssl/ssl_lib.c | 2 |
5 files changed, 16 insertions, 2 deletions
diff --git a/src/lib/libssl/s3_clnt.c b/src/lib/libssl/s3_clnt.c index ffbd83b060..602ab03fe1 100644 --- a/src/lib/libssl/s3_clnt.c +++ b/src/lib/libssl/s3_clnt.c | |||
@@ -2458,6 +2458,11 @@ ssl3_send_client_key_exchange(SSL *s) | |||
2458 | * context data | 2458 | * context data |
2459 | */ | 2459 | */ |
2460 | ukm_hash = EVP_MD_CTX_create(); | 2460 | ukm_hash = EVP_MD_CTX_create(); |
2461 | if (ukm_hash == NULL) { | ||
2462 | SSLerr(SSL_F_SSL3_SEND_CLIENT_KEY_EXCHANGE, | ||
2463 | ERR_R_MALLOC_FAILURE); | ||
2464 | goto err; | ||
2465 | } | ||
2461 | EVP_DigestInit(ukm_hash, | 2466 | EVP_DigestInit(ukm_hash, |
2462 | EVP_get_digestbynid(NID_id_GostR3411_94)); | 2467 | EVP_get_digestbynid(NID_id_GostR3411_94)); |
2463 | EVP_DigestUpdate(ukm_hash, | 2468 | EVP_DigestUpdate(ukm_hash, |
diff --git a/src/lib/libssl/src/ssl/s3_clnt.c b/src/lib/libssl/src/ssl/s3_clnt.c index ffbd83b060..602ab03fe1 100644 --- a/src/lib/libssl/src/ssl/s3_clnt.c +++ b/src/lib/libssl/src/ssl/s3_clnt.c | |||
@@ -2458,6 +2458,11 @@ ssl3_send_client_key_exchange(SSL *s) | |||
2458 | * context data | 2458 | * context data |
2459 | */ | 2459 | */ |
2460 | ukm_hash = EVP_MD_CTX_create(); | 2460 | ukm_hash = EVP_MD_CTX_create(); |
2461 | if (ukm_hash == NULL) { | ||
2462 | SSLerr(SSL_F_SSL3_SEND_CLIENT_KEY_EXCHANGE, | ||
2463 | ERR_R_MALLOC_FAILURE); | ||
2464 | goto err; | ||
2465 | } | ||
2461 | EVP_DigestInit(ukm_hash, | 2466 | EVP_DigestInit(ukm_hash, |
2462 | EVP_get_digestbynid(NID_id_GostR3411_94)); | 2467 | EVP_get_digestbynid(NID_id_GostR3411_94)); |
2463 | EVP_DigestUpdate(ukm_hash, | 2468 | EVP_DigestUpdate(ukm_hash, |
diff --git a/src/lib/libssl/src/ssl/s3_enc.c b/src/lib/libssl/src/ssl/s3_enc.c index c9284c395f..aa729860fe 100644 --- a/src/lib/libssl/src/ssl/s3_enc.c +++ b/src/lib/libssl/src/ssl/s3_enc.c | |||
@@ -593,6 +593,10 @@ ssl3_digest_cached_records(SSL *s) | |||
593 | for (i = 0; ssl_get_handshake_digest(i, &mask, &md); i++) { | 593 | for (i = 0; ssl_get_handshake_digest(i, &mask, &md); i++) { |
594 | if ((mask & ssl_get_algorithm2(s)) && md) { | 594 | if ((mask & ssl_get_algorithm2(s)) && md) { |
595 | s->s3->handshake_dgst[i] = EVP_MD_CTX_create(); | 595 | s->s3->handshake_dgst[i] = EVP_MD_CTX_create(); |
596 | if (s->s3->handshake_dgst[i] == NULL) { | ||
597 | SSLerr(SSL_F_SSL3_DIGEST_CACHED_RECORDS, | ||
598 | ERR_R_MALLOC_FAILURE); | ||
599 | } | ||
596 | EVP_DigestInit_ex(s->s3->handshake_dgst[i], md, NULL); | 600 | EVP_DigestInit_ex(s->s3->handshake_dgst[i], md, NULL); |
597 | EVP_DigestUpdate(s->s3->handshake_dgst[i], hdata, hdatalen); | 601 | EVP_DigestUpdate(s->s3->handshake_dgst[i], hdata, hdatalen); |
598 | } else { | 602 | } else { |
diff --git a/src/lib/libssl/src/ssl/ssl_lib.c b/src/lib/libssl/src/ssl/ssl_lib.c index bf98354294..12d45ea025 100644 --- a/src/lib/libssl/src/ssl/ssl_lib.c +++ b/src/lib/libssl/src/ssl/ssl_lib.c | |||
@@ -3235,7 +3235,7 @@ ssl_replace_hash(EVP_MD_CTX **hash, const EVP_MD *md) | |||
3235 | { | 3235 | { |
3236 | ssl_clear_hash_ctx(hash); | 3236 | ssl_clear_hash_ctx(hash); |
3237 | *hash = EVP_MD_CTX_create(); | 3237 | *hash = EVP_MD_CTX_create(); |
3238 | if (md) | 3238 | if (*hash != NULL && md != NULL) |
3239 | EVP_DigestInit_ex(*hash, md, NULL); | 3239 | EVP_DigestInit_ex(*hash, md, NULL); |
3240 | return (*hash); | 3240 | return (*hash); |
3241 | } | 3241 | } |
diff --git a/src/lib/libssl/ssl_lib.c b/src/lib/libssl/ssl_lib.c index bf98354294..12d45ea025 100644 --- a/src/lib/libssl/ssl_lib.c +++ b/src/lib/libssl/ssl_lib.c | |||
@@ -3235,7 +3235,7 @@ ssl_replace_hash(EVP_MD_CTX **hash, const EVP_MD *md) | |||
3235 | { | 3235 | { |
3236 | ssl_clear_hash_ctx(hash); | 3236 | ssl_clear_hash_ctx(hash); |
3237 | *hash = EVP_MD_CTX_create(); | 3237 | *hash = EVP_MD_CTX_create(); |
3238 | if (md) | 3238 | if (*hash != NULL && md != NULL) |
3239 | EVP_DigestInit_ex(*hash, md, NULL); | 3239 | EVP_DigestInit_ex(*hash, md, NULL); |
3240 | return (*hash); | 3240 | return (*hash); |
3241 | } | 3241 | } |