diff options
-rw-r--r-- | src/lib/libssl/d1_both.c | 4 | ||||
-rw-r--r-- | src/lib/libssl/ssl_clnt.c | 6 | ||||
-rw-r--r-- | src/lib/libssl/ssl_lib.c | 6 | ||||
-rw-r--r-- | src/lib/libssl/t1_enc.c | 6 | ||||
-rw-r--r-- | src/lib/libssl/t1_hash.c | 10 |
5 files changed, 16 insertions, 16 deletions
diff --git a/src/lib/libssl/d1_both.c b/src/lib/libssl/d1_both.c index 0c436f1f31..95157630f5 100644 --- a/src/lib/libssl/d1_both.c +++ b/src/lib/libssl/d1_both.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: d1_both.c,v 1.54 2018/08/30 16:56:16 jsing Exp $ */ | 1 | /* $OpenBSD: d1_both.c,v 1.55 2018/09/05 16:58:59 jsing Exp $ */ |
2 | /* | 2 | /* |
3 | * DTLS implementation written by Nagendra Modadugu | 3 | * DTLS implementation written by Nagendra Modadugu |
4 | * (nagendra@cs.stanford.edu) for the OpenSSL project 2005. | 4 | * (nagendra@cs.stanford.edu) for the OpenSSL project 2005. |
@@ -213,7 +213,7 @@ dtls1_hm_fragment_free(hm_fragment *frag) | |||
213 | if (frag->msg_header.is_ccs) { | 213 | if (frag->msg_header.is_ccs) { |
214 | EVP_CIPHER_CTX_free( | 214 | EVP_CIPHER_CTX_free( |
215 | frag->msg_header.saved_retransmit_state.enc_write_ctx); | 215 | frag->msg_header.saved_retransmit_state.enc_write_ctx); |
216 | EVP_MD_CTX_destroy( | 216 | EVP_MD_CTX_free( |
217 | frag->msg_header.saved_retransmit_state.write_hash); | 217 | frag->msg_header.saved_retransmit_state.write_hash); |
218 | } | 218 | } |
219 | free(frag->fragment); | 219 | free(frag->fragment); |
diff --git a/src/lib/libssl/ssl_clnt.c b/src/lib/libssl/ssl_clnt.c index cf055d3ee1..77211b622b 100644 --- a/src/lib/libssl/ssl_clnt.c +++ b/src/lib/libssl/ssl_clnt.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ssl_clnt.c,v 1.33 2018/08/24 17:30:32 jsing Exp $ */ | 1 | /* $OpenBSD: ssl_clnt.c,v 1.34 2018/09/05 16:58:59 jsing 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 | * |
@@ -2243,7 +2243,7 @@ ssl3_send_client_kex_gost(SSL *s, SESS_CERT *sess_cert, CBB *cbb) | |||
2243 | /* | 2243 | /* |
2244 | * Compute shared IV and store it in algorithm-specific context data. | 2244 | * Compute shared IV and store it in algorithm-specific context data. |
2245 | */ | 2245 | */ |
2246 | ukm_hash = EVP_MD_CTX_create(); | 2246 | ukm_hash = EVP_MD_CTX_new(); |
2247 | if (ukm_hash == NULL) { | 2247 | if (ukm_hash == NULL) { |
2248 | SSLerror(s, ERR_R_MALLOC_FAILURE); | 2248 | SSLerror(s, ERR_R_MALLOC_FAILURE); |
2249 | goto err; | 2249 | goto err; |
@@ -2258,7 +2258,7 @@ ssl3_send_client_kex_gost(SSL *s, SESS_CERT *sess_cert, CBB *cbb) | |||
2258 | EVP_DigestUpdate(ukm_hash, s->s3->client_random, SSL3_RANDOM_SIZE); | 2258 | EVP_DigestUpdate(ukm_hash, s->s3->client_random, SSL3_RANDOM_SIZE); |
2259 | EVP_DigestUpdate(ukm_hash, s->s3->server_random, SSL3_RANDOM_SIZE); | 2259 | EVP_DigestUpdate(ukm_hash, s->s3->server_random, SSL3_RANDOM_SIZE); |
2260 | EVP_DigestFinal_ex(ukm_hash, shared_ukm, &md_len); | 2260 | EVP_DigestFinal_ex(ukm_hash, shared_ukm, &md_len); |
2261 | EVP_MD_CTX_destroy(ukm_hash); | 2261 | EVP_MD_CTX_free(ukm_hash); |
2262 | if (EVP_PKEY_CTX_ctrl(pkey_ctx, -1, EVP_PKEY_OP_ENCRYPT, | 2262 | if (EVP_PKEY_CTX_ctrl(pkey_ctx, -1, EVP_PKEY_OP_ENCRYPT, |
2263 | EVP_PKEY_CTRL_SET_IV, 8, shared_ukm) < 0) { | 2263 | EVP_PKEY_CTRL_SET_IV, 8, shared_ukm) < 0) { |
2264 | SSLerror(s, SSL_R_LIBRARY_BUG); | 2264 | SSLerror(s, SSL_R_LIBRARY_BUG); |
diff --git a/src/lib/libssl/ssl_lib.c b/src/lib/libssl/ssl_lib.c index 44d11d4b16..d8415bcf6d 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.188 2018/09/05 16:48:11 jsing Exp $ */ | 1 | /* $OpenBSD: ssl_lib.c,v 1.189 2018/09/05 16:58:59 jsing 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 | * |
@@ -2624,7 +2624,7 @@ ssl_clear_cipher_read_state(SSL *s) | |||
2624 | { | 2624 | { |
2625 | EVP_CIPHER_CTX_free(s->enc_read_ctx); | 2625 | EVP_CIPHER_CTX_free(s->enc_read_ctx); |
2626 | s->enc_read_ctx = NULL; | 2626 | s->enc_read_ctx = NULL; |
2627 | EVP_MD_CTX_destroy(s->read_hash); | 2627 | EVP_MD_CTX_free(s->read_hash); |
2628 | s->read_hash = NULL; | 2628 | s->read_hash = NULL; |
2629 | 2629 | ||
2630 | if (s->internal->aead_read_ctx != NULL) { | 2630 | if (s->internal->aead_read_ctx != NULL) { |
@@ -2639,7 +2639,7 @@ ssl_clear_cipher_write_state(SSL *s) | |||
2639 | { | 2639 | { |
2640 | EVP_CIPHER_CTX_free(s->internal->enc_write_ctx); | 2640 | EVP_CIPHER_CTX_free(s->internal->enc_write_ctx); |
2641 | s->internal->enc_write_ctx = NULL; | 2641 | s->internal->enc_write_ctx = NULL; |
2642 | EVP_MD_CTX_destroy(s->internal->write_hash); | 2642 | EVP_MD_CTX_free(s->internal->write_hash); |
2643 | s->internal->write_hash = NULL; | 2643 | s->internal->write_hash = NULL; |
2644 | 2644 | ||
2645 | if (s->internal->aead_write_ctx != NULL) { | 2645 | if (s->internal->aead_write_ctx != NULL) { |
diff --git a/src/lib/libssl/t1_enc.c b/src/lib/libssl/t1_enc.c index 39f542215b..01ff05952c 100644 --- a/src/lib/libssl/t1_enc.c +++ b/src/lib/libssl/t1_enc.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: t1_enc.c,v 1.111 2018/09/05 16:48:11 jsing Exp $ */ | 1 | /* $OpenBSD: t1_enc.c,v 1.112 2018/09/05 16:58:59 jsing 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 | * |
@@ -476,7 +476,7 @@ tls1_change_cipher_state_cipher(SSL *s, char is_read, | |||
476 | if ((cipher_ctx = EVP_CIPHER_CTX_new()) == NULL) | 476 | if ((cipher_ctx = EVP_CIPHER_CTX_new()) == NULL) |
477 | goto err; | 477 | goto err; |
478 | s->enc_read_ctx = cipher_ctx; | 478 | s->enc_read_ctx = cipher_ctx; |
479 | if ((mac_ctx = EVP_MD_CTX_create()) == NULL) | 479 | if ((mac_ctx = EVP_MD_CTX_new()) == NULL) |
480 | goto err; | 480 | goto err; |
481 | s->read_hash = mac_ctx; | 481 | s->read_hash = mac_ctx; |
482 | } else { | 482 | } else { |
@@ -498,7 +498,7 @@ tls1_change_cipher_state_cipher(SSL *s, char is_read, | |||
498 | if ((cipher_ctx = EVP_CIPHER_CTX_new()) == NULL) | 498 | if ((cipher_ctx = EVP_CIPHER_CTX_new()) == NULL) |
499 | goto err; | 499 | goto err; |
500 | s->internal->enc_write_ctx = cipher_ctx; | 500 | s->internal->enc_write_ctx = cipher_ctx; |
501 | if ((mac_ctx = EVP_MD_CTX_create()) == NULL) | 501 | if ((mac_ctx = EVP_MD_CTX_new()) == NULL) |
502 | goto err; | 502 | goto err; |
503 | s->internal->write_hash = mac_ctx; | 503 | s->internal->write_hash = mac_ctx; |
504 | } | 504 | } |
diff --git a/src/lib/libssl/t1_hash.c b/src/lib/libssl/t1_hash.c index aef6e65729..a7e46601e8 100644 --- a/src/lib/libssl/t1_hash.c +++ b/src/lib/libssl/t1_hash.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: t1_hash.c,v 1.2 2017/05/06 16:18:36 jsing Exp $ */ | 1 | /* $OpenBSD: t1_hash.c,v 1.3 2018/09/05 16:58:59 jsing Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2017 Joel Sing <jsing@openbsd.org> | 3 | * Copyright (c) 2017 Joel Sing <jsing@openbsd.org> |
4 | * | 4 | * |
@@ -33,7 +33,7 @@ tls1_handshake_hash_init(SSL *s) | |||
33 | goto err; | 33 | goto err; |
34 | } | 34 | } |
35 | 35 | ||
36 | if ((S3I(s)->handshake_hash = EVP_MD_CTX_create()) == NULL) { | 36 | if ((S3I(s)->handshake_hash = EVP_MD_CTX_new()) == NULL) { |
37 | SSLerror(s, ERR_R_MALLOC_FAILURE); | 37 | SSLerror(s, ERR_R_MALLOC_FAILURE); |
38 | goto err; | 38 | goto err; |
39 | } | 39 | } |
@@ -80,7 +80,7 @@ tls1_handshake_hash_value(SSL *s, const unsigned char *out, size_t len, | |||
80 | if (EVP_MD_CTX_size(S3I(s)->handshake_hash) > len) | 80 | if (EVP_MD_CTX_size(S3I(s)->handshake_hash) > len) |
81 | goto err; | 81 | goto err; |
82 | 82 | ||
83 | if ((mdctx = EVP_MD_CTX_create()) == NULL) { | 83 | if ((mdctx = EVP_MD_CTX_new()) == NULL) { |
84 | SSLerror(s, ERR_R_MALLOC_FAILURE); | 84 | SSLerror(s, ERR_R_MALLOC_FAILURE); |
85 | goto err; | 85 | goto err; |
86 | } | 86 | } |
@@ -98,7 +98,7 @@ tls1_handshake_hash_value(SSL *s, const unsigned char *out, size_t len, | |||
98 | ret = 1; | 98 | ret = 1; |
99 | 99 | ||
100 | err: | 100 | err: |
101 | EVP_MD_CTX_destroy(mdctx); | 101 | EVP_MD_CTX_free(mdctx); |
102 | 102 | ||
103 | return (ret); | 103 | return (ret); |
104 | } | 104 | } |
@@ -106,6 +106,6 @@ tls1_handshake_hash_value(SSL *s, const unsigned char *out, size_t len, | |||
106 | void | 106 | void |
107 | tls1_handshake_hash_free(SSL *s) | 107 | tls1_handshake_hash_free(SSL *s) |
108 | { | 108 | { |
109 | EVP_MD_CTX_destroy(S3I(s)->handshake_hash); | 109 | EVP_MD_CTX_free(S3I(s)->handshake_hash); |
110 | S3I(s)->handshake_hash = NULL; | 110 | S3I(s)->handshake_hash = NULL; |
111 | } | 111 | } |