lib: rsa: use actual OpenSSL 1.1.0 EVP MD API
authorYann Droneaud <ydroneaud@opteya.com>
Tue, 1 Mar 2022 15:12:34 +0000 (16:12 +0100)
committerTom Rini <trini@konsulko.com>
Fri, 4 Mar 2022 20:20:07 +0000 (15:20 -0500)
commit9b5ad4f5da756939eac4123fc347af533eeb339e
tree6e69554b0f9e3e5c3971da75fe1f10dc6098db10
parent4fa4227cdd14020bb6d588293f3cb8591aeebfa0
lib: rsa: use actual OpenSSL 1.1.0 EVP MD API

Since OpenSSL 1.1.0, EVP_MD_CTX_create() is EVP_MD_CTX_new()
                     EVP_MD_CTX_destroy() is EVP_MD_CTX_free()
                     EVP_MD_CTX_init() is EVP_MD_CTX_reset()

As there's no need to reset a newly created EVP_MD_CTX, moreover
EVP_DigestSignInit() does the reset, thus call to EVP_MD_CTX_init()
can be dropped.
As there's no need to reset an EVP_MD_CTX before it's destroyed,
as it will be reset by EVP_MD_CTX_free(), call to EVP_MD_CTX_reset()
is not needed and can be dropped.

Signed-off-by: Yann Droneaud <ydroneaud@opteya.com>
lib/rsa/rsa-sign.c