ipq40xx: only include ath10k-board-qca4019 for the generic subtarget
[openwrt/staging/chunkeey.git] / package / libs / openssl / patches / 510-e_devcrypto-ignore-error-when-closing-session.patch
1 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2 From: Eneas U de Queiroz <cote2004-github@yahoo.com>
3 Date: Mon, 11 Mar 2019 10:15:14 -0300
4 Subject: e_devcrypto: ignore error when closing session
5
6 In cipher_init, ignore an eventual error when closing the previous
7 session. It may have been closed by another process after a fork.
8
9 Signed-off-by: Eneas U de Queiroz <cote2004-github@yahoo.com>
10
11 diff --git a/engines/e_devcrypto.c b/engines/e_devcrypto.c
12 index d25230d366..f4570f1666 100644
13 --- a/engines/e_devcrypto.c
14 +++ b/engines/e_devcrypto.c
15 @@ -195,9 +195,8 @@ static int cipher_init(EVP_CIPHER_CTX *ctx, const unsigned char *key,
16 get_cipher_data(EVP_CIPHER_CTX_nid(ctx));
17
18 /* cleanup a previous session */
19 - if (cipher_ctx->sess.ses != 0 &&
20 - clean_devcrypto_session(&cipher_ctx->sess) == 0)
21 - return 0;
22 + if (cipher_ctx->sess.ses != 0)
23 + clean_devcrypto_session(&cipher_ctx->sess);
24
25 cipher_ctx->sess.cipher = cipher_d->devcryptoid;
26 cipher_ctx->sess.keylen = cipher_d->keylen;