Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 1 commit into
base: devel
Choose a base branch
from

Conversation

Shwetha-Acharya
Copy link
Contributor

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

@gluster-ant
Copy link
Collaborator

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);

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

Also resolved make error of 'client_uid' never being NULL.

Fixes: gluster#4243 and gluster#4245
Signed-off-by: root <[email protected]>
@Shwetha-Acharya
Copy link
Contributor Author

/recheck smoke

1 similar comment
@Shwetha-Acharya
Copy link
Contributor Author

/recheck smoke

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

'MD5' is deprecated: Since OpenSSL 3.0
2 participants