On Windows Server 2008, I have an installation of Git for Windows (Git-1.9.4-preview20140929).

Within a bash shell, openssl version reports version 0.9.8zb, but ssh -V reports Open SSL 1.0.1i.

So, which version accurately reflects the version of OpenSSL that would be used by an SSL connector within JBoss (via torquebox) running on this server?

Why would these two tools, supplied within the same version of Git for Windows not have matching OpenSSL versions?

  • 2
    They might be linked against different versions of the library, or are even statically linked. – Sven Mar 25 '15 at 17:18
  • @Sven, true in general, but not how stock Git for Windows is build and shipped. I'm afraid @tjg might have a path lookup precedence issue. – kostix Mar 25 '15 at 18:16

I have an outdated (1.8.X) installation of Git for Windows1 so this might be not up to date, but from what I see in my installation, ssh.exe (which is a build of OpenSSH) depends on msys-crypto-X.Y.Z.dll while openssl.exe depends on that library and msys-ssl-X.Y.Z.dll with these X.Y.Z parts matching ("0.9.8" in my case). These libraries are located in the same directory as the executable files in question: {gitInstallDir}/bin.

AFAIK, when building GfW, the build suite pulls and builds exactly one copy of OpenSSL so both the reslting openssl.exe and ssh.exe are expected to use the same set of libraries provided by OpenSSL. Hence I sense some sort of %PATH% precedence problem.

What I would check:

  1. Run

    type -a openssl


    type -a ssh

    in your Git Bash prompt, and see if they both return something starting with the "/bin/" prefix as the first (or sole) entry of their respective outputs. If you see something other, like "/c/whatever/other/path/openssl", you have another instance of the openssl.exe program available earlier than the Git for Windows' copy thanks to your %PATH%; the same applies to ssh.exe.

    If yes, fix the contents of %PATH%.

  2. Get a copy of depends.exe and run it against ssh.exe and openssl.exe from your GfW install to see which libraries they link to, and where those are located. This might give you the clue as to where to look if something appears to be wrong.

1 It's not "msysGit" but "Git for Windows": "msysGit" is a very old name of the project which is used for quite some time to refer to the development environment for Git for Windows while the latter term is used to refer to the end product: the Windows port of Git and a binary installer you've used to install GfW. Please stick to this terminology to not increase the confusion.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.