1
0
mirror of https://github.com/libssh2/libssh2.git synced 2025-11-18 15:20:56 +03:00
Commit Graph

271 Commits

Author SHA1 Message Date
Nicolas Mora
12427f4fb8 tests: avoid using MAXPATHLEN, for portability
`MAXPATHLEN` is not present in some systems, e.g. GNU Hurd.

Co-authored-by: Viktor Szakats
Ref: 54bef4c5da #198
Fixes #1414
Closes #1415
2024-07-03 23:42:43 +02:00
Viktor Szakats
fbd9d19279 tests: fix excluding AES-GCM tests
Replace hard-coded crypto backends and rely on `LIBSSH2_GCM` macro
to decide whether to run AES-GCM tests.

Without this, build attempted to run AES-GCM tests (and failed)
for crypto backends that have conditional support for this feature, e.g.
wolfSSL without the necessary features built-in
(as in before Homewbrew wolfssl 5.7.0_1, or OpenSSL v1.1.0 and older).

This patch is part of a series of fixes to make wolfSSL AES-GCM support
work together with libssh2.

Cherry-picked from #1407
Closes #1410
2024-06-24 14:39:31 +02:00
Viktor Szakats
839bb84e89 ci/GHA: fix Dockerfile failing after Ubuntu package update
Likely due an upstream Ubuntu package update (requiring an apt-get
install call beforehand), tests run via autotools started failing with
no change in the libssh2 repo:
```
FAIL: test_aa_warmup
====================

Error running command 'docker build --quiet -t libssh2/openssh_server %s' (exit 256): Dockerfile:10
--------------------
   8 |      && apt-get clean \
   9 |      && rm -rf /var/lib/apt/lists/*
  10 | >>> RUN mkdir /var/run/sshd
  11 |
  12 |     # Chmodding because, when building on Windows, files are copied in with
--------------------
ERROR: failed to solve: process "/bin/sh -c mkdir /var/run/sshd" did not complete successfully: exit code: 1

Failed to build docker image
Cannot stop session - none started
Cannot stop container - none started
Command: docker build --quiet -t libssh2/openssh_server ../../tests/openssh_server
FAIL test_aa_warmup (exit status: 1)
```
Ref: https://github.com/libssh2/libssh2/actions/runs/9322194756/job/25662748095#step:11:390

Fix it by skipping `mkdir` if `/var/run/sshd` already exists.

(Why cmake-based jobs aren't affected, I don't know.)

Ref: 50143d5867 (commitcomment-142560875)
Closes #1400
2024-05-31 21:21:30 +02:00
Viktor Szakats
38e50aa06e tests: drop default cygpath option -u 2024-05-24 15:40:54 +02:00
Viktor Szakats
6556bfbd43 autotools: use AM_CFLAGS
Use `AM_CFLAGS` to pass custom, per-target C flags. This replaces using
`CFLAGS` which triggered this warning when running `autoreconf -fi`:
```
tests/Makefile.am:8: warning: 'CFLAGS' is a user variable, you should not override it;
tests/Makefile.am:8: use 'AM_CFLAGS' instead
```
(Only for `tests`, even though `example` and `src` also used this
method. The warning is also missing from curl, that also uses
`CFLAGS`.)

Follow-up to 3ec53f3ea2 #1286
Closes #1378
2024-04-26 22:58:55 +02:00
Viktor Szakats
a2ac8c55be tests: fix shellcheck issues in test_sshd.test
Cherry-picked from #1358
2024-04-10 00:45:46 +00:00
Tejaswikandula
3a6ab70dcf Support RSA SHA2 cert-based authentication (rsa-sha2-512_cert and rsa-sha2-256_cert) (#1314)
Replicating OpenSSH's behavior to handle RSA certificate authentication
differently based on the remote server version.

1. For OpenSSH versions >= 7.8, ascertain server's support for RSA Cert
   types by checking if the certificate's signature type is present in
   the `server-sig-algs`.

2. For OpenSSH versions < 7.8, Set the "SSH_BUG_SIGTYPE" flag when the
   RSA key in question is a certificate to ignore `server-sig-algs` and
   only offer ssh-rsa signature algorithm for RSA certs.

This arises from the fact that OpenSSH versions up to 7.7 accept
RSA-SHA2 keys but not RSA-SHA2 certificate types. Although OpenSSH <=7.7
includes RSA-SHA2 keys in the `server-sig-algs`, versions <=7.7 do not
actually support RSA certs. Therefore, server sending RSA-SHA2 keys in
`server-sig-algs` should not be interpreted as indicating support for
RSA-SHA2 certs. So, `server-sig-algs` are ignored when the RSA key in
question is a cert, and the remote server version is 7.7 or below.

Relevant sections of the OpenSSH source code:
                                                                                          
<https://github.com/openssh/openssh-portable/blob/V_8_9_P1/sshconnect2.c#L1191-L1197>     
<https://github.com/openssh/openssh-portable/blob/master/compat.c#L43>                    
                                                                                          
Assisted-by: Will Cosgrove                                                                
Reviewed-by: Viktor Szakats
2024-04-03 17:55:48 +02:00
Viktor Szakats
1d815d666c test debian:testing-slim post xz backdoor removal (#1346)
The unexplained CI fallouts are gone with the latest debian:testing (20240330).

Ref #1328 #1329 #1338.
Closes #1346
2024-04-02 21:52:23 +02:00
Viktor Szakats
c452c5cc6e build: drop -Wformat-nonliteral warning suppressions
Also markup a vararg function as such.

In functions marked up as vararg functions, there is no need to suppress
`-Wformat-nonliteral` warnings. It's done automatically by the compiler.

Closes #1342
2024-03-29 13:52:52 +00:00
Jiwoo Park
82b09f9b3a cmake: use the imported target of FindOpenSSL module (#1322)
* Use the imported target of FindOpenSSL module
* Build libssh2 before test runner
* Use find_package() in the CMake config file
* Use find_dependency() rather than find_package()
* Install CMake module files and use them in the config file
* Use elseif() to choose the crypto backend
2024-03-28 23:30:20 +01:00
Viktor Szakats
97aa8388aa Dockerfile: switch to Debian stable (from testing)
This fixes flakiness experienced recently with two OpenSSL jobs and one
libgcrypt job, and/or intermittently causing all Docker-based tests to
fail.

Reported-by: András Fekete
Fixes #1328
Fixes #1329
Closes #1338
2024-03-28 22:18:45 +00:00
Viktor Szakats
3ec53f3ea2 build: enable -pedantic-errors
According to the manual, this isn't the same as `-Werror -pedantic`.
Enable it together with `-Werror`.

https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-pedantic-errors-1

This option results in autotools feature detection going into crazies.
To avoid this, we add it to `CFLAGS` late. Idea copied from curl.

This option has an effect only with gcc 5.0 and newer as of this commit.
Let's enable it for clang and older versions too for simplicity. Ref:
d5c0351055
https://github.com/curl/curl/pull/2747

Closes #1286
2023-12-17 15:15:34 +00:00
Viktor Szakats
7010049969 tidy-up: add empty line for clarity [ci skip] 2023-12-14 20:14:55 +00:00
Viktor Szakats
94b6bad3c8 example, tests: call WSACleanup() for each WSAStartup()
On Windows.

Closes #1283
2023-12-13 01:28:14 +00:00
Viktor Szakats
46333adfb8 ci: add FreeBSD 14 job, fix issues
- install bash to fix error when running tests:
  ```
  ERROR: test_sshd.test - missing test plan
  ERROR: test_sshd.test - exited with status 127 (command not found?)
  =====================================
  [...]
  # TOTAL: 4
  # PASS:  2
  # SKIP:  0
  # XFAIL: 0
  # FAIL:  0
  # XPASS: 0
  # ERROR: 2
  [...]
  env: bash: No such file or directory
  ```
  Ref: https://github.com/libssh2/libssh2/actions/runs/7133852508/job/19427420687#step:3:3998

- fix sshd issue when running tests:
  ```
    # sshd log:
    #  Server listening on :: port 4711.
    #  Server listening on 0.0.0.0 port 4711.
    #  Authentication refused: bad ownership or modes for file /home/runner/work/libssh2/libssh2/tests/key_rsa.pub
    #  Authentication refused: bad ownership or modes for file /home/runner/work/libssh2/libssh2/tests/openssh_server/authorized_keys
  ```
  Ref: https://github.com/libssh2/libssh2/actions/runs/7134629175/job/19429828342#step:3:4059

Cherry-picked from #1277
Closes #1277
2023-12-08 02:04:18 +00:00
Viktor Szakats
2e5a8719d7 tidy-up: bump casts from int to long for large C99 types in printfs
Cast large integer types to avoid dealing with printf masks for
`size_t` and other C99 types. Some of existing code used `int`
for this, bump them to `long`.

Ref: afa6b86560 #1257

Closes #1264
2023-12-04 13:11:28 +00:00
Viktor Szakats
afa6b86560 build: enable missing OpenSSF-recommended warnings, with fixes
Ref:
https://best.openssf.org/Compiler-Hardening-Guides/Compiler-Options-Hardening-Guide-for-C-and-C++.html
(2023-11-29)

Enable new warnings:

- replace `-Wno-sign-conversion` with `-Wsign-conversion`.

  Fix them in example, tests and wincng. There remain about 360 of these
  warnings in `src`. Add a TODO item for those and disable `-Werror` for
  this particular warning.

- enable `-Wformat=2` for clang (in both cmake and autotools).

- enable `__attribute__((format))` for `_libssh2_debug()`,
  `_libssh2_snprintf()` and in tests for `run_command()`.

  `LIBSSH2_PRINTF()` copied from `CURL_TEMP_PRINTF()` in curl.

- enable `-Wimplicit-fallthrough`.

- enable `-Wtrampolines`.

Fix them:

- src: replace obsolete fall-through-comments with
  `__attribute__((fallthrough))`.

- wincng: fix `-Wsign-conversion` warnings.

- tests: fix `-Wsign-conversion` warnings.

- example: fix `-Wsign-conversion` warnings.

- src: fix `-Wformat` issues in trace calls.

  Also, where necessary fix `int` and `unsigned char` casts to
  `unsigned int` and adjust printf format strings. These were not
  causing compiler warnings.

  Cast large types to `long` to avoid dealing with printf masks for
  `size_t` and other C99 types. Existing code often used `int` for this.
  I'll update them to `long` in an upcoming commit.

- tests: fix `-Wformat` warning.

- silence `-Wformat-nonliteral` warnings.

- mbedtls: silence `-Wsign-conversion`/`-Warith-conversion`
  in external header.

Closes #1257
2023-12-03 01:32:20 +00:00
Viktor Szakats
eb996af851 tests: sync port number type with the rest of codebase
Tested via #1257
2023-12-02 09:53:55 +00:00
Viktor Szakats
744e059f31 example, tests: fix/silence -Wformat-truncation=2 gcc warnings
Then sync this warning option with curl.

Seems like a false positive and/or couldn't figure how to fix it, so silence:
```
example/ssh2.c:227:38: error: '%s' directive output may be truncated writing likely 1 or more bytes into a region of size 0 [-Werror=format-truncation=]
  227 |             snprintf(fn1, fn1sz, "%s/%s", h, pubkey);
      |                                      ^~
example/ssh2.c:227:34: note: assuming directive output of 1 byte
  227 |             snprintf(fn1, fn1sz, "%s/%s", h, pubkey);
      |                                  ^~~~~~~
example/ssh2.c:227:13: note: 'snprintf' output 3 or more bytes (assuming 4) into a destination of size 2
  227 |             snprintf(fn1, fn1sz, "%s/%s", h, pubkey);
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
example/ssh2.c:228:38: error: '%s' directive output may be truncated writing likely 1 or more bytes into a region of size 0 [-Werror=format-truncation=]
  228 |             snprintf(fn2, fn2sz, "%s/%s", h, privkey);
      |                                      ^~
example/ssh2.c:228:34: note: assuming directive output of 1 byte
  228 |             snprintf(fn2, fn2sz, "%s/%s", h, privkey);
      |                                  ^~~~~~~
example/ssh2.c:228:13: note: 'snprintf' output 3 or more bytes (assuming 4) into a destination of size 2
  228 |             snprintf(fn2, fn2sz, "%s/%s", h, privkey);
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
Ref: https://github.com/libssh2/libssh2/actions/runs/7055480458/job/19205970397#step:10:98

Fix:
```
tests/openssh_fixture.c:116:38: error: ' 2>&1' directive output may be truncated writing 5 bytes into a region of size between 1 and 1024 [-Werror=format-truncation=]
tests/openssh_fixture.c:116:11: note: 'snprintf' output between 6 and 1029 bytes into a destination of size 1024
```
Ref: https://github.com/libssh2/libssh2/actions/runs/7055480458/job/19205969221#step:10:51

Tested via #1257
2023-12-01 13:31:47 +00:00
Viktor Szakats
5326a5ce26 tests: fall back to $LOGNAME for username
If the `$USER` variable is empty, fall back to using `$LOGNAME` to
retrieve the logged-in username.

In POSIX, `$LOGNAME` is a mandatory variable, while `$USER` isn't, and
on some systems it may not be set. Without this value, tests were unable
to provide the correct username when logging into the SSH server running
under the active user's session.

Reported-by: Nicolas Mora
Suggested-by: Nicolas Mora
Ref: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1056348
Fixes #1240
Closes #1241
2023-11-24 15:14:00 +00:00
Viktor Szakats
932d6a3277 cmake: fix multiple include of libssh2 package
Also extend our integration test double inclusion. It will still not
catch this case, because that requires
`cmake_minimum_required(VERSION 3.18)` or higher.

Fixes:
```
CMake Error at .../lib/cmake/libssh2/libssh2-config.cmake:8 (add_library):
  add_library cannot create ALIAS target "libssh2::libssh2" because another
  target with the same name already exists.
Call Stack (most recent call first):
  CMakeLists.txt:24 (find_package)

CMake Error at .../lib/cmake/libssh2/libssh2-config.cmake:13 (add_library):
  add_library cannot create ALIAS target "Libssh2::libssh2" because another
  target with the same name already exists.
Call Stack (most recent call first):
  CMakeLists.txt:24 (find_package)
```

Test to reproduce:
```cmake
cmake_minimum_required(VERSION 3.18)  # must be 3.18 or higher

project(test)

find_package(libssh2 CONFIG)
find_package(libssh2 CONFIG)  # fails

add_executable(test main.c)
target_link_libraries(test libssh2::libssh2)
```

Ref: https://cmake.org/cmake/help/latest/release/3.18.html#other-changes
Ref: https://cmake.org/cmake/help/v3.18/policy/CMP0107.html

Assisted-by: Kai Pastor
Assisted-by: Harry Mallon
Ref: https://github.com/curl/curl/pull/11913

Closes #1216
2023-11-09 22:38:07 +00:00
Viktor Szakats
b9a4ed83b4 reuse: fix duplicate copyright warning
```
PendingDeprecationWarning:
Copyright and licensing information for 'tests/openssh_server/Dockerfile'
has been found in both 'tests/openssh_server/Dockerfile' and in the DEP5
file located at '.reuse/dep5'. The information for these two sources has
been aggregated. In the future this behaviour will change, and you will
need to explicitly enable aggregation. [...]
```
Ref: https://github.com/libssh2/libssh2/actions/runs/6789274955/job/18456085964#step:4:4
2023-11-08 03:52:45 +00:00
Viktor Szakats
bfa00f1bd5 tidy-up: around stdint.h
- os400: delete unused `HAVE_STDINT_H`.

- fuzz: delete redundant `stdint.h` use.
  `inttypes.h` is already included via `testinput.h`.

- docs/TODO: adjust type in planned function.

Closes #1212
2023-11-06 15:00:08 +00:00
Viktor Szakats
fc00bdd7f1 cmake: simplify showing CMake version
Move it to `CMakeLists.txt`. Drop `cmake --version` commands.

Credit to the `zlib-ng` project for the idea:
61e181c8ae/CMakeLists.txt (L7)

Closes #1203
2023-10-07 16:56:32 +00:00
Viktor Szakats
2cd2f40e37 tests: show cmake version used in integration tests
Closes #1201
2023-10-07 11:02:23 +00:00
Viktor Szakats
6fbc9505d8 windows: use built-in _WIN32 macro to detect Windows
Instead of `WIN32`.

The compiler defines `_WIN32`. Windows SDK headers or build env defines
`WIN32`, or we have to take care of it. The agreement seems to be that
`_WIN32` is the preferred practice here.

Minor downside is that CMake uses `WIN32` and we also adopted it in
`Makefile.mk`.

In public libssh2 headers we stick with accepting either `_WIN32` or
`WIN32` and define our own namespaced `LIBSSH2_WIN32` based on them.

grepping for `WIN32` remains useful to detect Windows-specific code.

Closes #1195
2023-09-29 19:15:08 +00:00
Viktor Szakats
eb9f9de2c1 md5: allow disabling old-style encrypted private keys at build-time
Before this patch, this happened at runtime when using an old (pre-3.0),
FIPS-enabled OpenSSL backend.

This patch makes it possible to disable this via the build-time option
`LIBSSH2_NO_MD5_PEM`.

Also:
- make sure to exclude all MD5 internal APIs when both the above and
  `LIBSSH2_NO_MD5` are enabled.
- fix tests to support build with`LIBSSH2_NO_MD5`, `LIBSSH2_NO_MD5_PEM`
  and `LIBSSH2_NO_3DES`.
- add FIXME to apply this change to `os400qc3.*`.

Old-style encrypted private keys require MD5 and they look like this:
```
-----BEGIN RSA PRIVATE KEY-----
 Proc-Type: 4,ENCRYPTED
 DEK-Info: AES-128-CBC,<MD5-hex>

 <base64>
 -----END RSA PRIVATE KEY-----
```

E.g.: `tests/key_rsa_encrypted`

Ref: https://github.com/libssh2/www/issues/20
Closes #1181
2023-08-28 22:57:26 +00:00
Viktor Szakats
4a64ca1430 cmake: tidy-up foreach() syntax
Use `IN LISTS` and `IN ITEMS`. This appears to be the preferred way
within CMake's own source code and possibly improves readability.

Fixup a side-effect of `IN LISTS`, where it retains empty values at
the end of the list, as opposed to the syntax used before, which
dropped it. In our case this happened with lines read from a text
file via `file(READ)`.

https://cmake.org/cmake/help/v3.7/command/foreach.html

Closes #1180
2023-08-28 22:57:02 +00:00
Viktor Szakats
5754fed686 ci: replace mv + chmod with install in Dockerfile
Cherry-picked from #1175
Closes #1175
2023-08-23 11:05:56 +00:00
Viktor Szakats
a20572e9af cmake: also test for libssh2_VERSION
Cherry-picked from #1175
2023-08-23 10:54:23 +00:00
Viktor Szakats
e61987a3bf tests: formatting and tidy-ups
- Dockerfile: use standard sep with `sed`
- Dockerfile: use single quotes in shell command
- appveyor.yml: use long-form option with `choco`
- tests/cmake: add language to test project
- reuse.yml: fix indentation
  ```
  $ yamllint reuse.yml
  reuse.yml
    [...]
    11:5      error    wrong indentation: expected 6 but found 4  (indentation)
    15:5      error    wrong indentation: expected 6 but found 4  (indentation)
    [...]
    27:5      error    wrong indentation: expected 6 but found 4  (indentation)
  ```

Cherry-picked from #1175
2023-08-23 10:53:53 +00:00
Viktor Szakats
e9c7d3afa0 cmake: quote more strings
Follow-up to 3fa5282d62

Closes #1173
2023-08-18 16:42:32 +00:00
Viktor Szakats
aeaefaf6cc cmake: add ExternalProject integration test
- via `ExternalProject_Add()`:
  https://cmake.org/cmake/help/latest/module/ExternalProject.html
  (as documented in `docs/INSTALL_CMAKE.md`)

- also make `FetchContent` fetch from local repo instead of live master.

Closes #1171
2023-08-18 09:47:09 +00:00
Viktor Szakats
8715c3d51b cmake: add integration tests
Add a small project to test dependent/downstream CMake build using
libssh2. Also added to the GHA CI, and you can also run it locally with
`tests/cmake/test.sh`.

Test three methods of integrating libssh2 into a project:
- via `find_package()`:
  https://cmake.org/cmake/help/latest/command/find_package.html
- via `add_subdirectory()`:
  https://cmake.org/cmake/help/latest/command/add_subdirectory.html
- via `FetchContent`:
  https://cmake.org/cmake/help/latest/module/FetchContent.html

Closes #1170
2023-08-17 09:01:08 +00:00
Viktor Szakats
3fa5282d62 cmake: style tidy up
- quote text literals to improve readability.
  (exceptions: `FILES` items, `add_subdirectory` names, `find_package`
  names, literal target names, version numbers, 0/1, built-in CMake
  values and CMake keywords, list items in `cmake/max_warnings.cmake`)
- quote standalone variables that could break syntax on empty values.
- replace `libssh2_SOURCE_DIR` with `PROJECT_SOURCE_DIR`.
- add missing mode to `message()` call.
- `TRUE`/`FALSE` → `ON`/`OFF`.
- add missing default value `OFF` to `option()` for clarity.
- unfold some lines.
- `INSTALL_CMAKE.md` fixes and updates. Show defaults.

Closes #1166
2023-08-15 15:08:30 +00:00
Viktor Szakats
42d3bf1348 cmake: fix STREQUAL check in error branch
This caused a CMake error instead of our custom error when manually
selecting the `WinCNG` crypto-backend for a non-Windows target.

Also cleanup `STREQUAL` checks to use variable name without `${}` on
the left side and quoted string literals on the right.

Closes #1151
2023-08-09 15:47:49 +00:00
Viktor Szakats
1a99a86a29 tests: replace FIXME with comments
`key_dsa_wrong` is the same kind of (valid) key as `key_dsa`, both with
an empty passphrase. Named "wrong" because it's intentionally not added
to our `openssh_server/authorized_keys` file.
2023-08-03 01:12:21 +00:00
Viktor Szakats
76307435b8 tidy-up: delete duplicate word from comment 2023-08-02 23:04:43 +00:00
Viktor Szakats
57e9d18e38 test_read: make it run without Docker
Apply an existing fix to `test_read`, so that it falls back to use
the current username instead of the hardcoded `libssh2` when run
outside Docker.

This allows to run algo tests with this command:
```shell
cd tests
./test_sshd.test ./test_read_algos.test
```

Closes #1139
2023-07-27 10:49:42 +00:00
Viktor Szakats
802336cf95 tests: add aes256-gcm encrypted key test
Follow-up to #1133

Also update `tests/gen_keys.sh` to set `aes256-ctr` encryption method
for `key_ed25519_encrypted' explicitly.

Closes #1135
2023-07-26 07:17:29 +00:00
Viktor Szakats
2fdc10ba04 cmake: formatting [ci skip] 2023-07-25 08:38:54 +00:00
Nursan Valeyev
0f396aa926 cmake: CMAKE_SOURCE_DIR -> PROJECT_SOURCE_DIR (#1121)
Fixes compiling as dependency with FetchContent

Co-authored-by: Viktor Szakats
2023-07-14 23:25:05 +02:00
Viktor Szakats
2fc3679007 cmake: tidy-ups
- dedupe `Requires.private` in `libssh2.pc`.
  `zlib` could appear on the list twice:
  ```
  Requires.private: libssl,libcrypto,zlib,zlib
  ```
  According to CMake docs `list(REMOVE_DUPLICATES ...)`, is supported by
  our minimum required CMake version (and by   earlier ones even):
  https://cmake.org/cmake/help/v3.1/command/list.html#remove-duplicates

- move `cmake_minimum_required()` to the top.

- move `set(CMAKE_MODULE_PATH)` to the top.

- delete duplicate `set(CMAKE_MODULE_PATH)`.

- replace `CMAKE_CURRENT_SOURCE_DIR` with `PROJECT_SOURCE_DIR` in root
  `CMakeLists.txt` for robustness.

- replace `gcovr` option with long-form for readability/consistency.

- rename `GCOV_OPTIONS` to `GCOV_CFLAGS`. These are C options we enable
  when using gcov, not gcov tooling options.

Closes #1122
2023-07-14 12:36:02 +00:00
Viktor Szakats
fe6239a11f reuse: comply with 3.1 spec and 2.0.0 checker
The checker tool was upgraded upstream to 2.0.0 and the REUSE
Specification to version 3.1 (from 3.0), causing these new errors:
```
reuse.project - WARNING - Copyright and licensing information for 'docs/INSTALL_AUTOTOOLS' have been found in 'docs/INSTALL_AUTOTOOLS' and the DEP5 file located at '.reuse/dep5'. The information in the DEP5 file has been overridden. Please ensure that this is correct.
reuse.project - WARNING - Copyright and licensing information for 'tests/openssh_server/Dockerfile' have been found in 'tests/openssh_server/Dockerfile' and the DEP5 file located at '.reuse/dep5'. The information in the DEP5 file has been overridden. Please ensure that this is correct.

The following files have no licensing information:
* docs/INSTALL_AUTOTOOLS
* tests/openssh_server/Dockerfile
```
Via: https://github.com/libssh2/libssh2/actions/runs/5333572682/jobs/9664211341?pr=1098#step:4:4

Ref: https://github.com/fsfe/reuse-tool/releases/tag/v2.0.0
Ref: https://git.fsfe.org/reuse/docs/src/branch/stable/CHANGELOG.md#3-1-2023-06-21

Original discovery: https://github.com/libssh2/libssh2/pull/1098#issuecomment-1600719575

Fixes #1101
Closes #1102
2023-06-21 17:43:42 +00:00
Viktor Szakats
b2916b286b tests: trap signals in scripts
Closes #1098
2023-06-21 12:50:26 +00:00
Viktor Szakats
ad7188456f test_sshd.test: fixup to distcheck failure
Fixes:
```
ERROR: test_sshd.test - missing test plan
ERROR: test_sshd.test - exited with status 1
```
Ref: https://github.com/libssh2/libssh2/actions/runs/5322354271/jobs/9638694218#step:10:532

Caused by trying to create the log file in a read-only directory.

Follow-up to 299c204062
Closes #1099
2023-06-21 11:08:44 +00:00
Viktor Szakats
299c204062 test_sshd.test: show sshd and test connect logs on harness failure (#1097) 2023-06-21 10:09:45 +02:00
Dan Fandrich
e8cabdcf2c test_sshd.test: set a safe PID directory (#1089)
The compiled in default to sshd can be a non-writable location since it
expects to be run as root.
2023-06-14 00:09:48 +02:00
Viktor Szakats
d29eea1d29 test_sshd.test: minor cleanups 2023-06-07 15:10:01 +02:00
Daniel Stenberg
f6aa31f48f provide SPDX identifiers
- All files have prominent copyright and SPDX identifier
- If not embedded in the file, in the .reuse/dep5 file
- All used licenses are in LICENSES/ (not shipped in tarballs)
- A new REUSE CI job verify that all files are OK

Assisted-by: Viktor Szakats

Closes #1084
2023-06-07 08:18:55 +02:00