diff options
author | Richard Levitte <levitte@openssl.org> | 2015-12-02 00:49:35 +0100 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2015-12-07 17:40:20 +0100 |
commit | bfb0641f932490c2e7fb5f9f7cb4a88017a5abfa (patch) | |
tree | 6b6b0a9dfe55b4b3a2e5961ed1778dd156128f35 /ssl/t1_enc.c | |
parent | 959ed5316c84d0e12ad18acfd40cefe15603ddfb (diff) | |
download | openssl-bfb0641f932490c2e7fb5f9f7cb4a88017a5abfa.tar.gz |
Cleanup: fix all sources that used EVP_MD_CTX_(create|init|destroy)
Reviewed-by: Rich Salz <rsalz@openssl.org>
Diffstat (limited to 'ssl/t1_enc.c')
-rw-r--r-- | ssl/t1_enc.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/ssl/t1_enc.c b/ssl/t1_enc.c index 05a0ec7caa..5889558d7e 100644 --- a/ssl/t1_enc.c +++ b/ssl/t1_enc.c @@ -166,9 +166,9 @@ static int tls1_P_hash(const EVP_MD *md, const unsigned char *sec, chunk = EVP_MD_size(md); OPENSSL_assert(chunk >= 0); - ctx = EVP_MD_CTX_create(); - ctx_tmp = EVP_MD_CTX_create(); - ctx_init = EVP_MD_CTX_create(); + ctx = EVP_MD_CTX_new(); + ctx_tmp = EVP_MD_CTX_new(); + ctx_init = EVP_MD_CTX_new(); if (ctx == NULL || ctx_tmp == NULL || ctx_init == NULL) goto err; EVP_MD_CTX_set_flags(ctx_init, EVP_MD_CTX_FLAG_NON_FIPS_ALLOW); @@ -230,9 +230,9 @@ static int tls1_P_hash(const EVP_MD *md, const unsigned char *sec, ret = 1; err: EVP_PKEY_free(mac_key); - EVP_MD_CTX_destroy(ctx); - EVP_MD_CTX_destroy(ctx_tmp); - EVP_MD_CTX_destroy(ctx_init); + EVP_MD_CTX_free(ctx); + EVP_MD_CTX_free(ctx_tmp); + EVP_MD_CTX_free(ctx_init); OPENSSL_cleanse(A1, sizeof(A1)); return ret; } @@ -374,7 +374,7 @@ int tls1_change_cipher_state(SSL *s, int which) goto err; dd = s->enc_write_ctx; if (SSL_IS_DTLS(s)) { - mac_ctx = EVP_MD_CTX_create(); + mac_ctx = EVP_MD_CTX_new(); if (mac_ctx == NULL) goto err; s->write_hash = mac_ctx; |