glusterfs icon indicating copy to clipboard operation
glusterfs copied to clipboard

checksum.c: Use the EVP API to compute the MD5 checksum

Open Shwetha-Acharya opened this issue 1 year ago • 3 comments

As MD5 function has been marked as deprecated in OpenSSL 3.0, this change uses EVP (Envelope) API to compute the MD5 checksum. Reference: https://www.openssl.org/docs/man1.0.2/man3/EVP_md5.html

Fixes: #4243

Shwetha-Acharya avatar Oct 20 '23 08:10 Shwetha-Acharya

CLANG-FORMAT FAILURE: Before merging the patch, this diff needs to be considered for passing clang-format

index 74a3a0cb7..2c8ffa691 100644
--- a/libglusterfs/src/checksum.c
+++ b/libglusterfs/src/checksum.c
@@ -41,7 +41,7 @@ void
 gf_rsync_md5_checksum(unsigned char *data, size_t len, unsigned char *md5)
 {
     EVP_MD_CTX *mdctx;
-    const EVP_MD *md = EVP_md5(); // Use the MD5 digest algorithm
+    const EVP_MD *md = EVP_md5();  // Use the MD5 digest algorithm
 
     mdctx = EVP_MD_CTX_new();
     EVP_DigestInit_ex(mdctx, md, NULL);

gluster-ant avatar Oct 20 '23 08:10 gluster-ant

/recheck smoke

Shwetha-Acharya avatar Oct 25 '23 06:10 Shwetha-Acharya

/recheck smoke

Shwetha-Acharya avatar Nov 03 '23 06:11 Shwetha-Acharya