510-e_devcrypto-ignore-error-when-closing-session.patch 934 B

123456789101112131415161718192021222324
  1. From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
  2. From: Eneas U de Queiroz <[email protected]>
  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 <[email protected]>
  8. --- a/engines/e_devcrypto.c
  9. +++ b/engines/e_devcrypto.c
  10. @@ -195,9 +195,8 @@ static int cipher_init(EVP_CIPHER_CTX *c
  11. get_cipher_data(EVP_CIPHER_CTX_nid(ctx));
  12. /* cleanup a previous session */
  13. - if (cipher_ctx->sess.ses != 0 &&
  14. - clean_devcrypto_session(&cipher_ctx->sess) == 0)
  15. - return 0;
  16. + if (cipher_ctx->sess.ses != 0)
  17. + clean_devcrypto_session(&cipher_ctx->sess);
  18. cipher_ctx->sess.cipher = cipher_d->devcryptoid;
  19. cipher_ctx->sess.keylen = cipher_d->keylen;