510-e_devcrypto-ignore-error-when-closing-session.patch 1.0 KB

1234567891011121314151617181920212223242526
  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. In cipher_init, ignore an eventual error when closing the previous
  6. session. It may have been closed by another process after a fork.
  7. Signed-off-by: Eneas U de Queiroz <cote2004-github@yahoo.com>
  8. diff --git a/engines/e_devcrypto.c b/engines/e_devcrypto.c
  9. index d25230d366..f4570f1666 100644
  10. --- a/engines/e_devcrypto.c
  11. +++ b/engines/e_devcrypto.c
  12. @@ -195,9 +195,8 @@ static int cipher_init(EVP_CIPHER_CTX *ctx, const unsigned char *key,
  13. get_cipher_data(EVP_CIPHER_CTX_nid(ctx));
  14. /* cleanup a previous session */
  15. - if (cipher_ctx->sess.ses != 0 &&
  16. - clean_devcrypto_session(&cipher_ctx->sess) == 0)
  17. - return 0;
  18. + if (cipher_ctx->sess.ses != 0)
  19. + clean_devcrypto_session(&cipher_ctx->sess);
  20. cipher_ctx->sess.cipher = cipher_d->devcryptoid;
  21. cipher_ctx->sess.keylen = cipher_d->keylen;