libssh2-hs
libssh2-hs copied to clipboard
Windows fix for session_handshake
Fix for session_handshake on Windows. The "if windows, if x64, unsigned 64 bit, else unsigned 32 bit, else signed 32 bit" logic was being repeated in a few places (and I had to add it to another place) so I decided to move it into an alias. c2hs does not know the alias can be converted to what it aliases to, so specifying the id function as a marshaller works (since Haskell knows how to unalias). I was able to list a directory on my machine using login/password authentication and sftp, which probably means it is all working fine.