blob: 40b1dc78d3195fd923f71730f2b3b7cf77d66e01 [file] [log] [blame]
b.liue9582032025-04-17 19:18:16 +08001From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2From: Eneas U de Queiroz <cote2004-github@yahoo.com>
3Date: Mon, 11 Mar 2019 10:15:14 -0300
4Subject: e_devcrypto: ignore error when closing session
5
6In cipher_init, ignore an eventual error when closing the previous
7session. It may have been closed by another process after a fork.
8
9Signed-off-by: Eneas U de Queiroz <cote2004-github@yahoo.com>
10
11--- a/engines/e_devcrypto.c
12+++ b/engines/e_devcrypto.c
13@@ -211,9 +211,8 @@ static int cipher_init(EVP_CIPHER_CTX *c
14 int ret;
15
16 /* cleanup a previous session */
17- if (cipher_ctx->sess.ses != 0 &&
18- clean_devcrypto_session(&cipher_ctx->sess) == 0)
19- return 0;
20+ if (cipher_ctx->sess.ses != 0)
21+ clean_devcrypto_session(&cipher_ctx->sess);
22
23 cipher_ctx->sess.cipher = cipher_d->devcryptoid;
24 cipher_ctx->sess.keylen = cipher_d->keylen;