]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commit
src/fssum: use newer EVP_* interface to replace deprecated MD5_* interace
authorQu Wenruo <wqu@suse.com>
Wed, 2 Feb 2022 04:29:29 +0000 (12:29 +0800)
committerEryu Guan <guaneryu@gmail.com>
Sun, 20 Feb 2022 15:40:19 +0000 (23:40 +0800)
commit11342071e1054c65a28d32f3c6ab63c4bd6ef5a6
tree3a1fd479a7b53729e30a3ce3e93faf23e17b1048
parentb91862aa4c950e0157f241136207e3827cee407e
src/fssum: use newer EVP_* interface to replace deprecated MD5_* interace

In OpenSSL 3.0, MD_Init/Update/Final() interfaces are marked
deprecated, and we have to go EVP_DigestInit/Update/Final() instead.

Personally I'm not a fan of this, especially the new EVP_MD_CTX
structure can no longer be stack allocated, thus we have to
dynamically allocate and free EVP_MD_CTX in sum_init() and sum_free().

Hopes this is proper way to go and would solve the problem until
OpenSSL chooses to change their interface again.

Signed-off-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: Eryu Guan <guaneryu@gmail.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
src/fssum.c
src/md5.h