eng_devcrypto: close open session on init
cipher_init may be called on an already initialized context, without a necessary cleanup. This separates cleanup from initialization, closing an eventual open session before creating a new one. Move the /dev/crypto session cleanup code to its own function. Signed-off-by: NEneas U de Queiroz <cote2004-github@yahoo.com> Reviewed-by: NRichard Levitte <levitte@openssl.org> Reviewed-by: NNicola Tuveri <nic.tuv@gmail.com> (Merged from https://github.com/openssl/openssl/pull/8306)
Showing
想要评论请 注册 或 登录