1
0
mirror of https://github.com/libssh2/libssh2.git synced 2025-12-09 15:41:11 +03:00

tests: fix newlines in test keys for sshd on Windows

Make sure these files get LF newlines on checkout. Before this patch
a checked out libssh2 Git repository may have used CRLF newlines in text
files, include test keys. Private keys with CRLF newlines could confuse
sshd on Windows:

```
# sshd version: 'OpenSSH_9.2, OpenSSL 1.1.1t  7 Feb 2023'
Unable to load host key "/d/a/libssh2/libssh2/tests/openssh_server/ssh_host_ed25519_key": invalid format
Unable to load host key: /d/a/libssh2/libssh2/tests/openssh_server/ssh_host_ed25519_key
```
Ref: https://github.com/libssh2/libssh2/actions/runs/4846188677/jobs/8635575847#step:6:39

Cherry-picked from #1017
This commit is contained in:
Viktor Szakats
2023-04-30 20:39:50 +00:00
parent ec8689b264
commit 33f3260a4a

3
tests/openssh_server/.gitattributes vendored Normal file
View File

@@ -0,0 +1,3 @@
# OpenSSH requires LF EOLs in key files, even on Windows, where
# a git checkout checkout may set CRLF EOLs by default.
* text eol=lf