src: remove superfluous cipher_ data member · nodejs/node@db65422 · GitHub
Skip to content

Commit db65422

Browse files
bnoordhuisaddaleax
authored andcommitted
src: remove superfluous cipher_ data member
The EVP_CIPHER can be reconstructed from the EVP_CIPHER_CTX instance, no need to store it separately. This brought to light the somewhat dubious practice of accessing the EVP_CIPHER after the EVP_CIPHER_CTX instance had been destroyed. It's mostly harmless due to the static nature of built-in EVP_CIPHER instances but it segfaults when the cipher is provided by an ENGINE and the ENGINE is unloaded because its reference count drops to zero. PR-URL: #14122 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent 1af064b commit db65422

2 files changed

Lines changed: 18 additions & 17 deletions

File tree

src/node_crypto.cc

Lines changed: 18 additions & 15 deletions

src/node_crypto.h

Lines changed: 0 additions & 2 deletions

0 commit comments

Comments
 (0)