{"author":"Viktor Szakats","author_email":"commit@vsz.me","author_time":1742554107,"commit_time":1742757986,"committer":"Viktor Szakats","committer_email":"commit@vsz.me","hash":"89f306ae40b678bd91595ba41fe5f9d5ed374897","message":"runtests: fix test key format for libssh2 WinCNG (and others)\n\nSFTP/SCP tests were failing in CI with WinCNG libssh2 since we first\nadded such job. With `curl: (67) Authentication failure`.\n\nThe reason is that the default `ssh-keygen` RSA private key format\nchanged to OpenSSH (RFC4716) in 2018. libssh2 does not support this\nformat with some of its crypto backends.\n\nFix it by generating keys explicitly in PEM format as necessary via\nthe `-m` option. This format is universally recognized for RSA keys.\n\n2018-08-24: https://www.openssh.com/txt/release-7.8: OpenSSH format becomes default\n2010-08-23: https://www.openssh.com/txt/release-5.6: `-m` option first supported\n\nThis fixed the auth issue, just to reveal a known flakiness issue in\nlibssh2 + WinCNG, causing:\n```\ncurl: (2) Failure establishing ssh session: -8, Unable to exchange encryption keys\n```\nRef: https://github.com/curl/curl/actions/runs/14000494428/job/39205633258?pr=16781#step:15:1796\nTracked here: https://github.com/libssh2/libssh2/issues/804\nMitigated in libssh2 tests by retrying them.\n\nDue to this, keep ignoring these test results.\n\nAlso:\n- add an env to customize key format: `CURL_TEST_SSH_KEY_FORMAT`\n- display the generated format in the log.\n- GHA/linux: document the wolfSSH error code causing it to fail tests:\n  ```\n  curl: (79) wolfssh SFTP connect error -1051 / WS_MATCH_KEY_ALGO_E / cannot match key algo with peer\n  ```\n\nFollow-up to 4911e7af119c1b7efd46a742d47bca44832c3041 #16735\nFollow-up to 0ec72c1ef8d87a29bf2eaa5e36ab173147a4d015 #16672\nFollow-up to e53523fef07894991c69d907a7c7794c7ada4ff4 #14859\nFollow-up to e26cbe20cbedbea0ca743dd33880517309315cb2 #13979\n\nCloses #16781\n","parents":["dd0c9feb54b1194751eea192769e9c3d75832978"],"tree_hash":"94b6747bf649a2a2480e8b8e4551395b7dcac955"}