1
0
mirror of https://github.com/libssh2/libssh2.git synced 2026-10-24 03:48:58 +03:00
Commit Graph

6 Commits

Author SHA1 Message Date
Viktor Szakats
6a37f6b318 tidy-up: comments, messages, docs typos, whitespace nits
Closes #2212
2026-07-05 15:31:49 +02:00
Viktor Szakats
2673970d2a version: add libssh2_build_options()
Returning for example (without newlines):
```
crypto:LibreSSL MD5:off MD5-PEM:off RIPEMD160:off DSA:off
RSA:on RSA-SHA1:on ECDSA:on ED25519:on ML-KEM:off
AES-CTR:on AES-CBC:on BLOWFISH:off RC4:off CAST:off
3DES:off zlib:on clear-memory:on debug-logging:on
```

To allow library users to find out these details, and add a searchable
static string to binaries with this information.

Possible values for `crypto`: `AWS-LC`, `BoringSSL`, `Libgcrypt`,
`LibreSSL`, `mbedTLS`, `OpenSSL`, `OpenSSL/1.1.1`, `OS400QC3`, `WinCNG`,
`wolfSSL`.

Also:
- replace manual translation of crypto engine enum to name in CMake
  integration test snippet with the new API.

Fixes #2161

Closes #2178
2026-07-03 16:12:22 +02:00
Viktor Szakats
5d3a28b7f0 tidy-up: miscellaneous
- fix comment typos and formatting.
- drop unnecessary parentheses.
- rename `ml_kem_size` -> `mlkem_size` for consistency.
- drop a few `{}` blocks.
- docs/libssh2_version.md: fix code formatting.
- docs/libssh2_version.md: delete roff (?) escaping remains.
- `"<null>"` -> `"(null)"` for consistency (also with curl).
- fix indent, clang-format.
- openssl: drop redundant cast.
- wincng: constify `wcng_memcpy_with_be_padding()` input buffer.

Closes #2194
2026-07-03 13:38:13 +02:00
Viktor Szakats
ca43b304cf tidy-up: miscellaneous
- man pages: grammar
- examples: add missing parentheses to macro values
- examples: replace `write()` with `_write()` on Windows.
  (to avoid warnings.)
- examples, tests: drop redundant NULL assigments.
- examples: fix to cleanup on error in ssh2_echo, ssh2_exec.
- libssh2.rpgle.in: make hex notation consistent in comment.
- chacha, session.h: avoid comparison with literal NULL.
- prefer 'unrecognized' vs 'unknown' in error messages.
- mbedtls: sync a code pattern with others in the code in
  `ssh2_rsa_new()`.
- openssl: declutter and update comment for wolfSSL `HMAC_Update()`
  exception. Also drop FIXME as the upstream incompatibility seems
  intentional.
- pem, userauth, wincng: fix, clarify error messages.
- wincng: add explanation for `NOLINT` exception, reword another
  comment.
  (suggested by Copilot)
- misc: drop redundant parentheses.
- test_read: fix a type mismatch.
- openssl: use indexed syntax for readability.
- vms/man2help: fix tool name is help text.
- formatting: reflow, newlines, spaces, comment typos.

Some of these reported by GitHub Code Quality / Copilot.

Closes #2042
2026-06-11 14:49:52 +02:00
Viktor Szakats
9538c99fc4 badwords: add checker script, fix issues found
Checker script and wordlist comes from curl.

Also:
- checksrc.pl: sync up with curl.
- unfold an IETF URL.
- update all IETF URLs where missing.

Closes #1959
2026-06-01 13:22:40 +02:00
Viktor Szakats
b889b39945 docs: convert man page sources to "curldown" format
To render in Git webviews as-is, to make it easier to edit, verify,
and to sync up with curl.

- add options to not build the `.3` man pages:
  - autotools: `--disable-docs`
  - cmake: `LIBSSH2_BUILD_DOCS=OFF`
- building `.3` man pages requires Perl after this patch.
- drop `mansyntax` and the shell / `grep` / GNU `man` tool requirements with it.
- scripts and most logic were copied from curl.
- add `cd2nroff` from curl, with edits to relax curl-specific checks.
- used `nroff2cd` (from curl) to convert from `.3` to `.md`. Then
  manually fixed copyrights, inline function references and a couple
  of other things.

Credits-to: Daniel Stenberg

Ref: eefcc1bda4
Ref: https://github.com/curl/curl/pull/12730
Ref: https://github.com/libssh2/www/issues/25#issuecomment-3289431671

Closes #1660
2025-10-09 04:05:38 +02:00