c++sslcurlopensslschannel

CURL SFTP support with Windows SChannel?


I'm working on shrinking an executable's size and a big saving was replacing OpenSSL/Libssh for curl with the windows standard SChannel (DLL on all windows machines)

This works correctly and has the SSL support for some things, but curl is unable to do SFTP with SChannel (unless I'm misconfiguring). I tried adding back LibSSH to curl to handle SFTP but that has a reliance on OpenSSL.

Is there any way to use curl/Schannel while maintaining SFTP functionality?


Conclusion

Ended up building curl with LibSSH2 which can use a Windows DLL instead of OpenSSL, removing the need for OpenSSL at all.


Solution

  • LibSSH relies on OpenSSL. LibSSH is needed for SSH functionality which itself is needed for SFTP functionality. SChannel does not provide SSH functionality and LibSSH cannot use SChannel. In other words: there is no way to get rid of any of these if you want to have SFTP functionality.