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

Don't set http.sslCAInfo for schannel #172

Merged
merged 2 commits into from
Feb 16, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 24 additions & 17 deletions installer/install.iss
Original file line number Diff line number Diff line change
Expand Up @@ -1853,23 +1853,6 @@ begin
Log('Line {#__LINE__}: Creating initial "' + ProgramData + '\Git\config" failed.');
end;
end;
if FileExists(ProgramData+'\Git\config') then begin
if not Exec(AppDir+'\bin\bash.exe','-c "value=\"$(git config -f config pack.packsizelimit)\" && if test 2g = \"$value\"; then git config -f config --unset pack.packsizelimit; fi"',ProgramData+'\Git',SW_HIDE,ewWaitUntilTerminated,i) then
LogError('Unable to remove packsize limit from ProgramData config');
#if BITNESS=='32'
if not Exec(AppDir+'\{#MINGW_BITNESS}\bin\git.exe','config --system pack.packsizelimit 2g',AppDir,SW_HIDE,ewWaitUntilTerminated,i) then
LogError('Unable to limit packsize to 2GB');
#endif
Cmd:=AppDir+'/';
StringChangeEx(Cmd,'\','/',True);
if not Exec(AppDir+'\bin\bash.exe','-c "value=\"$(git config -f config http.sslcainfo)\" && case \"$value\" in \"'+Cmd+'\"/*|\"C:/Program Files/Git/\"*|\"c:/Program Files/Git/\"*) git config -f config --unset http.sslcainfo;; esac"',ProgramData+'\Git',SW_HIDE,ewWaitUntilTerminated,i) then
LogError('Unable to delete http.sslCAInfo from ProgramData config');
Cmd:='http.sslCAInfo "'+AppDir+'/{#MINGW_BITNESS}/ssl/certs/ca-bundle.crt"';
StringChangeEx(Cmd,'\','/',True);
if not Exec(AppDir+'\{#MINGW_BITNESS}\bin\git.exe','config --system '+Cmd,
AppDir,SW_HIDE,ewWaitUntilTerminated,i) then
LogError('Unable to configure SSL CA info: ' + Cmd);
end;

{
Configure http.sslBackend according to the user's choice.
Expand All @@ -1884,6 +1867,30 @@ begin
AppDir,SW_HIDE,ewWaitUntilTerminated,i) then
LogError('Unable to configure the HTTPS backend: '+Cmd);

if FileExists(ProgramData+'\Git\config') then begin
if not Exec(AppDir+'\bin\bash.exe','-c "value=\"$(git config -f config pack.packsizelimit)\" && if test 2g = \"$value\"; then git config -f config --unset pack.packsizelimit; fi"',ProgramData+'\Git',SW_HIDE,ewWaitUntilTerminated,i) then
LogError('Unable to remove packsize limit from ProgramData config');
#if BITNESS=='32'
if not Exec(AppDir+'\{#MINGW_BITNESS}\bin\git.exe','config --system pack.packsizelimit 2g',AppDir,SW_HIDE,ewWaitUntilTerminated,i) then
LogError('Unable to limit packsize to 2GB');
#endif
Cmd:=AppDir+'/';
StringChangeEx(Cmd,'\','/',True);
if not Exec(AppDir+'\bin\bash.exe','-c "value=\"$(git config -f config http.sslcainfo)\" && case \"$value\" in \"'+Cmd+'\"/*|\"C:/Program Files/Git/\"*|\"c:/Program Files/Git/\"*) git config -f config --unset http.sslcainfo;; esac"',ProgramData+'\Git',SW_HIDE,ewWaitUntilTerminated,i) then
LogError('Unable to delete http.sslCAInfo from ProgramData config');
if not RdbCurlVariant[GC_WinSSL].Checked then begin
Cmd:='http.sslCAInfo "'+AppDir+'/{#MINGW_BITNESS}/ssl/certs/ca-bundle.crt"';
StringChangeEx(Cmd,'\','/',True);
if not Exec(AppDir+'\{#MINGW_BITNESS}\bin\git.exe','config --system '+Cmd,
AppDir,SW_HIDE,ewWaitUntilTerminated,i) then
LogError('Unable to configure SSL CA info: ' + Cmd);
end else begin
if not Exec(AppDir+'\{#MINGW_BITNESS}\bin\git.exe','config --system --unset http.sslCAInfo',
AppDir,SW_HIDE,ewWaitUntilTerminated,i) then
LogError('Unable to unset SSL CA info');
end;
end;

{
Adapt core.autocrlf
}
Expand Down