mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-03-25 04:50:09 +09:00
Merge ssh_key_type_from_signature_name() and ssh_key_hash_from_name() into a single function ssh_key_type_and_hash_from_signature_name() to: - Avoid double string comparisons on the same algorithm name - Return SSH_ERROR on unknown/NULL input instead of silently returning SSH_DIGEST_AUTO - Use strlen() before strcmp() to short-circuit string comparisons. Handle GSSAPI "null" hostkey case in wrapper.c. Add unit tests for the new function. Fixes: https://gitlab.com/libssh/libssh-mirror/-/issues/355 Signed-off-by: Haythem666 <haythem.farhat@epfl.ch> Reviewed-by: Jakub Jelen <jjelen@redhat.com>