Repository navigation
Upstream Git vs OpenSSL 4, who will win? - #774
Merged
Merged
Conversation
Upstream Git takes its sweet little time integrating a fix for a function that has been introduced in OpenSSL v4.0 but already been deprecated in OpenSSL v4.1. See https://github.com/git/git/blob/3802183aaaee/whats-cooking.txt#L1473 for details. In the meantime, the `ci-artifacts` job (and hence the build of the `build-installers` CI artifact, used to build Git for Windows' installer) is failing, see e.g. https://github.com/git-for-windows/git-sdk-64/actions/runs/43847033970/job/133229681817#step:8:267: imap-send.c: In function 'host_matches': imap-send.c:230:9: error: 'ASN1_STRING_length' is deprecated: Since OpenSSL 4.1; use ASN1_STRING_get_length() [-Werror=deprecated-declarations] 230 | if (memchr(pattern, '\0', ASN1_STRING_length(asn1_str))) | ^~ In file included from [...]/ucrt64/include/openssl/objects.h:21, from [...]/ucrt64/include/openssl/evp.h:48, from [...]/ucrt64/include/openssl/x509.h:31, from [...]/ucrt64/include/openssl/ssl.h:34, from compat/mingw.h:12, from git-compat-util.h:160, from imap-send.c:27: [...]/ucrt64/include/openssl/asn1.h:794:5: note: declared here 794 | int ASN1_STRING_length(const ASN1_STRING *x); | ^~~~~~~~~~~~~~~~~~ cc1.exe: all warnings being treated as errors make: *** [Makefile:2965: imap-send.o] Error 1 Let's work around this by ignoring that particular deprecation for now. Signed-off-by: Johannes Schindelin <[email protected]>
Signed-off-by: Johannes Schindelin <[email protected]>
mjcheetham
approved these changes
Nov 20, 2026
mjcheetham
left a comment
Member
There was a problem hiding this comment.
a function that was deprecated in v4.1 (after being introduced in v4.0...)
Lovely...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Since the MSYS2 project upgraded
mingw-w64-opensslto v4.1, Git for Windows'ci-artifactsworkflow is failing. The reason is thatimap-send.cuses a function that was deprecated in v4.1 (after being introduced in v4.0...):Since the
ci-artifactsworkflow not only produces theminimal-sdkCI artifact (which is used by Git in its CI runs, which is why there is this guard to ensure that that has a chance of working successfully), but also thebuild-installersCI artifact, which is used to build Git for Windows' installers (using the same guard to ensure that Git for Windows' installers have a chance of delivering a working Git to the users), we cannot currently release Git for Windows.There is already a topic branch (
bb/imap-send-openssl-set-verify) that would address this (by removing the function call altogether), but it is still cooking inseen.To work around that build error without having to wait for that topic branch to advance to
master, we'll just "un-deprecate" that function in Git for Windows' SDK, for the time being.Here is a run that proves that this work-around works around the issue as intended.