tlux / sftp_client

An Elixir SFTP Client that wraps Erlang's ssh and ssh_sftp.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Does not work with OTP 23

nmbrone opened this issue · comments

Hi.

I'm using OTP 23 and cannot connect to the server. The problem is here:

https://github.com/i22-digitalagentur/sftp_client/blob/ff9d2f069140a668ad8736e05bb44be941ab0313/lib/sftp_client/key_provider.ex#L11-L15

warning: :ssh_file.add_host_key/3 is undefined or private. Did you mean one of:

      * add_host_key/4

  lib/sftp_client/key_provider.ex:12: SFTPClient.KeyProvider.add_host_key/3

warning: :ssh_file.is_host_key/4 is undefined or private. Did you mean one of:

      * is_host_key/5

  lib/sftp_client/key_provider.ex:15: SFTPClient.KeyProvider.is_host_key/4

The dirty fix by adding an additional parameter to both functions works for me, but I'm not sure how to fix it properly to preserve the compatibility with older OTP versions.