summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbcook <>2016-09-09 00:03:22 +0000
committerbcook <>2016-09-09 00:03:22 +0000
commitee7fadb5bf3c6358023d31338abd6537dd7492c6 (patch)
treebfd09db617811ce4d13e90d222136a781d8472c3
parent68469354aab54129893f81b572222d17e8a3d511 (diff)
downloadopenbsd-ee7fadb5bf3c6358023d31338abd6537dd7492c6.tar.gz
openbsd-ee7fadb5bf3c6358023d31338abd6537dd7492c6.tar.bz2
openbsd-ee7fadb5bf3c6358023d31338abd6537dd7492c6.zip
back out calls to EVP_CIPHER_CTX_cleanup() in EVP_Cipher/Encrypt/DecryptFinal
Software that refers to ctx after calling Final breaks with these changes. revert parts of 1.31 and 1.32
-rw-r--r--src/lib/libcrypto/evp/evp_enc.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/lib/libcrypto/evp/evp_enc.c b/src/lib/libcrypto/evp/evp_enc.c
index f0b2639f60..0dfb7a5dc3 100644
--- a/src/lib/libcrypto/evp/evp_enc.c
+++ b/src/lib/libcrypto/evp/evp_enc.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: evp_enc.c,v 1.34 2016/09/04 12:35:23 bcook Exp $ */ 1/* $OpenBSD: evp_enc.c,v 1.35 2016/09/09 00:03:22 bcook 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 *
@@ -273,7 +273,6 @@ EVP_CipherFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl)
273 ret = EVP_EncryptFinal_ex(ctx, out, outl); 273 ret = EVP_EncryptFinal_ex(ctx, out, outl);
274 else 274 else
275 ret = EVP_DecryptFinal_ex(ctx, out, outl); 275 ret = EVP_DecryptFinal_ex(ctx, out, outl);
276 (void) EVP_CIPHER_CTX_cleanup(ctx);
277 return ret; 276 return ret;
278} 277}
279 278
@@ -382,7 +381,6 @@ EVP_EncryptFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl)
382 int ret; 381 int ret;
383 382
384 ret = EVP_EncryptFinal_ex(ctx, out, outl); 383 ret = EVP_EncryptFinal_ex(ctx, out, outl);
385 (void) EVP_CIPHER_CTX_cleanup(ctx);
386 return ret; 384 return ret;
387} 385}
388 386
@@ -499,7 +497,6 @@ EVP_DecryptFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl)
499 int ret; 497 int ret;
500 498
501 ret = EVP_DecryptFinal_ex(ctx, out, outl); 499 ret = EVP_DecryptFinal_ex(ctx, out, outl);
502 (void) EVP_CIPHER_CTX_cleanup(ctx);
503 return ret; 500 return ret;
504} 501}
505 502