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

Update libssh2 to 1.11.1 #16

Merged
merged 10 commits into from
Oct 22, 2024
Merged

Update libssh2 to 1.11.1 #16

merged 10 commits into from
Oct 22, 2024

Conversation

logmanoriginal
Copy link
Owner

@logmanoriginal logmanoriginal commented Oct 18, 2024

This PR updates libssh2 to 1.11.1 and any API updates.

TODO

  • (DEPRECATED) libssh2_knownhost_add - LIBSSH2_KNOWNHOST_KEY_SSHDSS
  • (DEPRECATED) libssh2_knownhost_addc - LIBSSH2_KNOWNHOST_KEY_SSHDSS
  • (DEPRECATED) libssh2_session_callback_set
  • (DEPRECATED) libssh2_session_hostkey - LIBSSH2_HOSTKEY_TYPE_DSS
  • (NEW) libssh2_session_callback_set2
  • (NEW) libssh2_sftp_posix_rename
  • (NEW) libssh2_sftp_posix_rename_ex
  • (NEW) build flags:
    • LIBSSH2_NO_DEPRECATED
    • LIBSSH2_ECDSA_WINCNG
  • (NEW) errors:
    • LIBSSH2_ERROR_MAC_FAILURE
    • LIBSSH2_ERROR_HASH_INIT
    • LIBSSH2_ERROR_HASH_CALC

This avoids test failures when testing against pre-release versions of
libssh2.
This is a new feature in libssh2 1.11.1 which excludes deprecated APIs
when compiling the project. Affected APIs:

- libssh2_banner_set
- libssh2_session_startup
- libssh2_channel_receive_window_adjust
- libssh2_channel_handle_extended_data
- libssh2_scp_recv

None of these APIs have bindings in lvssh2 so it is safe to exclude
them.

Note that LIBSSH2_NO_DEPRECATED does not actually remove all deprecated
APIs but only those that are deprecated for a long time (e.g.,
libssh2_session_callback_set is deprecated but not removed)
This enables ECDSA support for the WinCNG backend when building libssh2.
ECDSA support is a new feature in libssh2 1.11.1 and required Windows 10
or later.
This adds new error codes introduced by libssh 1.11.1
The error codes are mapped to error numbers 5051, 5052, 5053:
- 5051: LIBSSH2_ERROR_MAC_FAILURE
- 5052: LIBSSH2_ERROR_HASH_INIT
- 5053: LIBSSH2_ERROR_HASH_CALC
libssh2_session_callback_set() is deprecated in libssh2-1.11.1

This adds a deprecation warning to the VI description and updates the
icon to stand out on the block diagram. The error cluster returns a
warning with a brief explanation when the VI is called.

Note that libssh2_session_callback_set(), while deprecated, is still
available in libssh2-1.11.1.
libssh2_session_callback_set2() was added in libssh2-1.11.1 as a
replacement for libssh2_session_callback_set(), which is not type safe.

This also updates the extensions library to utilize the new
libssh2_cb_generic type and replaces the old function in all callers and
the palette.

Note that the implementation between *set and *set2 in LabVIEW are
practically identical because all instances of libssh2_cb_generic* are
simply exposed as pointer-sized integers.
LIBSSH2_KNOWNHOST_KEY_SSHDSS is deprecated in libssh2-1.11.1

This also updates the typedef to add "(deprecated)" to the item name.
However, item names are not automatically updated on Ring types.
libssh2_sftp_posix_rename_ex() was added in libssh2-1.11.1. It provides
POSIX semantics for rename operations. This means that the file appears
to be moved to any services monitoring for file changes [1]. It is not
supported by all SSH servers.

This also adds more descriptive descriptions to all rename functions.

[1]: https://github.com/PowerShell/openssh-portable/blob/v8.1.0.0/PROTOCOL#L380..L395
@logmanoriginal logmanoriginal marked this pull request as ready for review October 19, 2024 14:09
@logmanoriginal logmanoriginal merged commit 775d3e2 into main Oct 22, 2024
1 check passed
@logmanoriginal logmanoriginal deleted the libssh2-1.11.1 branch October 22, 2024 04:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant