Skip to content

sha1: fix compilation of WinHTTP backend#5174

Merged
ethomson merged 3 commits into
libgit2:masterfrom
pks-t:pks/winhttp-hash
Jul 20, 2019
Merged

sha1: fix compilation of WinHTTP backend#5174
ethomson merged 3 commits into
libgit2:masterfrom
pks-t:pks/winhttp-hash

Conversation

@pks-t

@pks-t pks-t commented Jul 18, 2019

Copy link
Copy Markdown
Member

With my HTTPS refactorings, I've introduced breakage to the WinHTTP SHA1 backend which went unnoticed. This PR fixes the error and changes one MSVC CI job to compile with "-DUSE_SHA1=HTTPS".

Fixes #5165

pks-t added 3 commits July 18, 2019 13:37
When selecting the SHA1 backend, we only include the respective C
implementation of the selected backend. But since commit bd48bf3
(hash: introduce source files to break include circles, 2019-06-14), we
have introduced separate headers and compilation units for all hashes.
So by not including the headers, we may not honor them to compute
whether a file needs to be recompiled and they also will not be
displayed in IDEs.

Add the header files to fix this problem.
In commit bbf034a (hash: move `git_hash_prov` into Win32 backend,
2019-02-22), the `git_hash_prov`'s structure name has been removed in
favour of its typedef'ed name. But as we have no CI that compiles with
the WinHTTPS hashing backend right now, it wasn't noticed that the
implementation that uses this struct wasn't changed correctly.

Fix the struct type to make it compile again.
We currently have no job that compiles libgit2 with the WinHTTP backend
for SHA1. Due to this, a compile error has been introduced and not
noticed for several months. Change the x86 MSVC job to use the HTTPS
backend for SHA1. The x86 job was chosen with no particular reason.
@ethomson

Copy link
Copy Markdown
Member

This PR fixes the error and changes one MSVC CI job to compile with "-DUSE_SHA1=HTTPS".

I was hesitant to do this, but I think that it's the right thing, because we'll want to ensure that we don't break the hash backend selection for when we tackle sha256.

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.

Windows HTTPS SHA1 backend does not compile

2 participants