Support SHA256 finger prints for SSH servers#7646
Support SHA256 finger prints for SSH servers#7646Axis-Mats wants to merge 1 commit intocurl:masterfrom
Conversation
|
Hi, |
|
I have made a mistake with this commit. It is based on Tag:curl-7_78_0 and not master. Would it be possible for me to move my changes to master-branch and continue this commit or must I make another pull-request? |
|
Just rebase it and force-push, no need to create a new one! |
c955ab8 to
918caa7
Compare
|
Hi, |
|
Hi, |
Yes, since that's a recent addition to libssh2 you cannot assume that the user has such a new installation present. You need to make the code handle older versions as well as new enough:
It looks like our "normal" flaky Windows CI failures. Not your fault. 😢 |
|
Would it be good if we #ifdef like this? The new command-line option, STRING_SSH_HOST_PUBLIC_KEY_SHA256 and help texts always exist with the patch. If STRING_SSH_HOST_PUBLIC_KEY_SHA256 is passed and LIBSSH2_HOSTKEY_HASH_SHA256 is not available, we return an error from ssh_check_fingerprint in libssh2.c. |
bagder
left a comment
There was a problem hiding this comment.
Also note that this is too late for inclusion in 7.79.0 but will have a good chance for 7.80.0
918caa7 to
7cf77a2
Compare
7cf77a2 to
6f43cca
Compare
|
I don't understand what goes wrong with the curl/check test that are failing: https://github.com/curl/curl/pull/7646/checks?check_run_id=3524545729. |
|
those links have only given me "502 Bad Gateway" for the last day or two! 😭 |
|
Yepp, it the same for me. Would it possible to restart/rerun the tests and maybe get new links? |
|
Hi, The test links seems to be up and running again. |
|
Hi, |
|
I believe the distcheck failed CI job is still a valid error. I think because |
|
When I build curl locally I don't see the issue with CURLOPT_SSH_HOST_PUBLIC_KEY_SHA256.3 missing in the Makefile.inc. I build curl and the tests. Is there a way to build the documentation separately or how can I trigger this issue? |
|
The 'distcheck' CI job builds a release tarball and then verifies that some key things within the tarball is correct and matches what's in git. Like this: Lines 130 to 162 in 4a46177 I think you can reproduce this particular failure locally like this:
The |
|
Will 'make install' install my curl-fork on my system? |
|
Yes, which is why you want to use the |
|
In my most common build, I use |
Added support for SHA256 fingerprint in command line curl and in libcurl. https://curl.se/docs/todo.html#Support_better_than_MD5_hostkey Change-Id: Icccd204b3b9a0066ab1760cac20913bd76ac803c
6f43cca to
78b41f0
Compare
|
The test you suggested worked locally. I could reproduce the error. Now it looks fine: |
|
Some of the checks are still failing. When it comes to the other errors we don't understand what goes wrong: |
|
Hi, |
|
The CI failures are "the usual" flaky ones. Not the fault of your PR. |
|
Thanks! |
Syncing behavior with MD5 host public keys. libcurl implemented to force a host key type when the host is present in `known_hosts`, and disabled this logic when an MD5 host public key is explicitly set. libcurl later received support for SHA256 host public keys. This update missed to extend the `known_hosts` logic with the new key type. This caused test 3022 to fail if a pre-existing `known_hosts` listed the test server IP (127.0.0.1) with a non-RSA host key algo. Follow-up to d1e7d91 curl#7646 Follow-up to 272282a curl#4747 Closes curl#16805
Syncing behavior with MD5 host public keys. libcurl implemented to force a host key type when the host is present in `known_hosts`, and disabled this logic when an MD5 host public key is explicitly set. libcurl later received support for SHA256 host public keys. This update missed to extend the `known_hosts` logic with the new key type. This caused test 3022 to fail if a pre-existing `known_hosts` listed the test server IP (127.0.0.1) with a non-RSA host key algo. Follow-up to d1e7d91 curl#7646 Follow-up to 272282a curl#4747 Closes curl#16805
Syncing behavior with MD5 host public keys. libcurl implemented to force a host key type for hosts is present in `known_hosts`, and disabled this logic when an MD5 host public key is explicitly set. libcurl later received support for SHA256 host public keys. This update missed to extend the `known_hosts` logic with the new key type. This caused test 3022 to fail if a pre-existing `known_hosts` listed the test server IP (127.0.0.1) with a non-RSA host key algo. Follow-up to d1e7d91 #7646 Follow-up to 272282a #4747 Closes #16805
Syncing behavior with MD5 host public keys. libcurl implemented to force a host key type for hosts is present in `known_hosts`, and disabled this logic when an MD5 host public key is explicitly set. libcurl later received support for SHA256 host public keys. This update missed to extend the `known_hosts` logic with the new key type. This caused test 3022 to fail if a pre-existing `known_hosts` listed the test server IP (127.0.0.1) with a non-RSA host key algo. Follow-up to d1e7d91 curl#7646 Follow-up to 272282a curl#4747 Closes curl#16805
Add support for SHA256 fingerprint in command line curl
and in libcurl.
https://curl.se/docs/todo.html#Support_better_than_MD5_hostkey
N.B. This patch should not be merged until the Curl-patch: #7646 has been released. Target release, for the Curl-project, is 7.80.0. Since this patch is conditional on the 7.80.0 release this patch has to be tested against 7.80.0.