You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add support for reading and validating HTTPS certificates via Windows Certificate Store #301
To aid in enterprise rollouts of git, supporting the Windows Certificate Store would be useful. Many enterprises have the ability to distribute trusted certificates as part of their Active Directory setups for their Windows users.
Similar support was added for git on OS X (at 1.8.0 I believe) to read the system Keychain for certificate validation when using HTTPS, and has been useful for deployments.
Are you talking about the credential store? As far as I understand that does not validate HTTPS certificates but only remembers (and offers) user/password combinations.
It sounds more like a request to have the WinSSL feature of Curl - I've only had a quick glance, so sorry if it's off-track, but Git's (lib)curl seems to be compiled to use a ca-bundle.crt file only. The WinSSL feature of CURL (configure with --with-winssl) allows it to use the Windows Certificate Store root certificates (including, critically, domain certificates).
Appologies for the late response, and thanks for following up @dscho . Wanted to confirm that what @dra27 indicated is what I'm looking for.
The personal reason for this request is from an observation of the behavior differences of Git on Windows and OS X. On Windows with the 2.5.0 git release, it won't verify a valid certificate from a root CA included in the ca-bundle.crt if an intermediate certificate is in the chain. I still need to verify the behavior on a Linux distro to compare. On OS X, it looks like Git uses the Keychain feature of the OS to validate certificates possibly via a feature similar to winssl in Curl.
I generalized the request a bit to also support enterprises possibly using their own internal CA instead of an external one, something I've found in common use at a few companies. They frequently will use a feature of Active Directory to distribute their internal CA cert to Windows boxes, and it ends up being stored in the Windows Certificate Store.
@drakino happily, with the information I gave you, you can go wild and experiment -- with your existing setup -- how to rebuild the mingw-w64-curl package best. All you have to do is read up on rebuilding packages in the Git for Windows SDK, then follow the pointers I gave above. That will enable you to
build cURL with WinSSL support,
install the package in the Git SDK,
test whether, say, git clone respects the certificates you have in your Windows Certificate Manager, and
verify that cloning from GitHub still works (i.e. the CA bundle is still respected, too).
That process might take an hour in total, although only 15 minutes of your time (most of the time will be spent by the SDK installer to download and install the SDK packages, and to clone and build Git for Windows itself).
There's a security argument for not enabling openssl by default (though by now that's probably a huge regression!) - ca-bundle.crt is potentially a security hole if the user messes up file permissions, where the Windows Certificate Store is slightly harder to attack.
@splatteredbits if you want to become so familiar as to become a regular contributor to the Git for Windows project, it will be easy to do without a reinstall.
Otherwise, I would strongly suggest to simply reinstall; the installer will have remembered all your previous choices and all you need to do is to correct your mistake.
This option affects only the Git connection for now. I fear that git svn (by virtue of being a Perl script, using Subversion's Perl bindings) may be unaffected. Maybe you can find out how Subversion accesses HTTPS (I.e. whether it uses cURL)?
Activity
dscho commentedon Aug 22, 2015
Are you talking about the credential store? As far as I understand that does not validate HTTPS certificates but only remembers (and offers) user/password combinations.
dscho commentedon Aug 27, 2015
@drakino please note that I am waiting for your answer, and for clarification in general.
dra27 commentedon Aug 27, 2015
It sounds more like a request to have the WinSSL feature of Curl - I've only had a quick glance, so sorry if it's off-track, but Git's (lib)curl seems to be compiled to use a ca-bundle.crt file only. The WinSSL feature of CURL (configure with --with-winssl) allows it to use the Windows Certificate Store root certificates (including, critically, domain certificates).
dscho commentedon Aug 27, 2015
@dra27 oh, that makes sense (I actually did not know that WinSSL is supported).
Apparently this is already kinda supported: https://github.com/Alexpux/MINGW-packages/blob/983ea7944e735459e5b48c4b0ecd09cdc9fe2d9e/mingw-w64-curl/PKGBUILD#L57-L62
But the variant is
openssl, notwinssl: https://github.com/Alexpux/MINGW-packages/blob/983ea7944e735459e5b48c4b0ecd09cdc9fe2d9e/mingw-w64-curl/PKGBUILD#L2I guess what we want is
openssl+winsslor some such?faolan42 commentedon Aug 27, 2015
Appologies for the late response, and thanks for following up @dscho . Wanted to confirm that what @dra27 indicated is what I'm looking for.
The personal reason for this request is from an observation of the behavior differences of Git on Windows and OS X. On Windows with the 2.5.0 git release, it won't verify a valid certificate from a root CA included in the ca-bundle.crt if an intermediate certificate is in the chain. I still need to verify the behavior on a Linux distro to compare. On OS X, it looks like Git uses the Keychain feature of the OS to validate certificates possibly via a feature similar to winssl in Curl.
I generalized the request a bit to also support enterprises possibly using their own internal CA instead of an external one, something I've found in common use at a few companies. They frequently will use a feature of Active Directory to distribute their internal CA cert to Windows boxes, and it ends up being stored in the Windows Certificate Store.
dscho commentedon Aug 28, 2015
@drakino happily, with the information I gave you, you can go wild and experiment -- with your existing setup -- how to rebuild the
mingw-w64-curlpackage best. All you have to do is read up on rebuilding packages in the Git for Windows SDK, then follow the pointers I gave above. That will enable you togit clonerespects the certificates you have in your Windows Certificate Manager, andThat process might take an hour in total, although only 15 minutes of your time (most of the time will be spent by the SDK installer to download and install the SDK packages, and to clone and build Git for Windows itself).
dra27 commentedon Aug 30, 2015
There's a security argument for not enabling openssl by default (though by now that's probably a huge regression!) - ca-bundle.crt is potentially a security hole if the user messes up file permissions, where the Windows Certificate Store is slightly harder to attack.
dscho commentedon Sep 9, 2015
@drakino please note that once again, I wait for your feedback.
55 remaining items
dscho commentedon May 8, 2017
@splatteredbits if you want to become so familiar as to become a regular contributor to the Git for Windows project, it will be easy to do without a reinstall.
Otherwise, I would strongly suggest to simply reinstall; the installer will have remembered all your previous choices and all you need to do is to correct your mistake.
jaylemur commentedon Jun 28, 2017
Does this new option only affect the GIT connection ?
or also the SVN connection in case of command "git svn clone" ?
dscho commentedon Jul 16, 2017
This option affects only the Git connection for now. I fear that
git svn(by virtue of being a Perl script, using Subversion's Perl bindings) may be unaffected. Maybe you can find out how Subversion accesses HTTPS (I.e. whether it uses cURL)?Merge pull request git-for-windows#301: Update 'git maintenance' to m…
Merge pull request git-for-windows#301: Update 'git maintenance' to m…
Merge pull request git-for-windows#301: Update 'git maintenance' to m…
Merge pull request git-for-windows#301: Update 'git maintenance' to m…
Merge pull request git-for-windows#301: Update 'git maintenance' to m…
Merge pull request git-for-windows#301: Update 'git maintenance' to m…
Merge pull request git-for-windows#301: Update 'git maintenance' to m…
Merge pull request git-for-windows#301: Update 'git maintenance' to m…
Merge pull request git-for-windows#301: Update 'git maintenance' to m…
Merge pull request #301: Update 'git maintenance' to match upstream
Merge pull request git-for-windows#301: Update 'git maintenance' to m…
Merge pull request #301: Update 'git maintenance' to match upstream