Skip to content

md4, md5: switch to wolfCrypt API in wolfSSL builds#21093

Closed
vszakats wants to merge 9 commits intocurl:masterfrom
vszakats:wolfnativemd
Closed

md4, md5: switch to wolfCrypt API in wolfSSL builds#21093
vszakats wants to merge 9 commits intocurl:masterfrom
vszakats:wolfnativemd

Conversation

@vszakats
Copy link
Copy Markdown
Member

@vszakats vszakats commented Mar 25, 2026

Replacing the OpenSSL-like compatibility interface, and syncing with other
hashes, when building with wolfSSL.

Also: stop stomping on OpenSSL public MD4 symbols. This makes the wolfSSL
coexist workaround unnecessary, while also syncing up with MD5 sources.

After this patch the only remaining reference to wolfSSL's OpenSSL
compatibility layer is in lib/curl_ntlm_core.c.

@vszakats vszakats marked this pull request as draft March 25, 2026 10:09
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates curl’s MD4/MD5 implementations for wolfSSL builds to use the native wolfCrypt API instead of the OpenSSL-compatibility layer, aligning behavior with other wolfCrypt-backed hashes in the codebase.

Changes:

  • MD5: remove wolfSSL OpenSSL-compat header usage and switch to <wolfssl/wolfcrypt/md5.h> + wc_* APIs.
  • MD4: switch wolfSSL implementation to <wolfssl/wolfcrypt/md4.h> and add thin wrappers matching the existing MD4_Init/Update/Final call pattern.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
lib/md5.c Switch wolfSSL MD5 backend from OpenSSL-compat API to wolfCrypt wc_Md5 APIs.
lib/md4.c Switch wolfSSL MD4 backend to wolfCrypt and wrap wc_* calls behind MD4_Init/Update/Final.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread lib/md4.c Outdated
Comment thread lib/md5.c
@testclutch

This comment was marked as resolved.

@vszakats vszakats marked this pull request as ready for review March 25, 2026 11:44
@vszakats vszakats changed the title md4, md5: switch to wolfCrypt API md4, md5: switch to wolfCrypt API in wolfSSL builds Mar 25, 2026
@vszakats vszakats closed this in bf6a34d Mar 25, 2026
@vszakats vszakats deleted the wolfnativemd branch March 25, 2026 17:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

3 participants