-
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
libssh2: show crypto backend in the verbose connect log #16790
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
Conversation
I think it's confusing that libssh does it that way. Do we really need to know anything more than the version number for any of these libraries? diff --git a/lib/vssh/libssh.c b/lib/vssh/libssh.c
index 299b7c8..e27ee1b 100644
--- a/lib/vssh/libssh.c
+++ b/lib/vssh/libssh.c
@@ -2982,7 +2982,13 @@ void Curl_ssh_cleanup(void)
void Curl_ssh_version(char *buffer, size_t buflen)
{
+ char *p;
(void)msnprintf(buffer, buflen, "libssh/%s", ssh_version(0));
+ /* remove libssh supporting libraries from version number
+ eg: libssh/0.10.6/openssl => libssh/0.10.6 */
+ p = strchr(buffer + 7, '/');
+ if(p)
+ *p = '\0';
}
#endif /* USE_LIBSSH */ |
Speaking of libssh2 it can significantly change behavior, in accepted keys, supported algos, stability. Probably '/openssl' could be dropped for libssh as well. Edit: this needs care because that may be followed by a Vast majority of builds is with openssl. But seeing the rarer non-openssl ones seems useful. |
cdfe86e
to
6835b47
Compare
Reworked to show this information in the verbose connect log. |
With libssh2 1.11.0 or newer. Different crypto backends may offer different features, e.g. in the keys and algos they support. Examples: ``` * Trying 127.0.0.1:22... * Connected to localhost (127.0.0.1) port 22 * libssh2 crypto backend: openssl compatible [or] * libssh2 crypto backend: WinCNG ``` Also fix indentation and drop redundant curly braces. Closes curl#16790
With libssh2 1.11.0 or newer.
Different crypto backends may offer different features, e.g. in the keys
and algos they support.
Examples:
Also fix indentation and drop redundant curly braces.
w/o ws https://github.com/curl/curl/pull/16790/files?w=1