1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-04-19 02:24:03 +03:00

10 Commits

Author SHA1 Message Date
Jakub Jelen
f3d80833fe examples: Remove remaining references to default hostkeys
This is fixup of a9d1cfa9e233601269f1ca20a952f7b9504d1a5c, where we missed this
corner case.

Fixes: #285
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2024-12-20 13:52:37 +01:00
Jakub Jelen
17a8a8b3c3 examples: Reformat ssh_server.c
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Reviewed-by: Sahana Prasad <sahana@redhat.com>
Reviewed-by: Eshan Kelkar <eshankelkar@galorithm.com>
2024-07-18 21:36:28 +02:00
Jakub Jelen
5dd42dfa22 examples: Avoid buffer overrun
and provide helpful warning message

CID 1533680:  Memory - illegal accesses  (OVERRUN)

Thanks coverity

Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2024-04-11 16:08:50 +02:00
Gauravsingh Sisodia
a9d1cfa9e2 feat: Handle hostkeys like OpenSSH
fix: memory leak
fix: add defaults after parsing
fix: set defaults in ssh_bind_listen
tests: add test for checking default hostkey paths
remove: null check for hostkey paths, can't happen since we set defaults now
examples: ssh_server remove "no default keys", default hostkeys set in ssh_bind_listen

Signed-off-by: Gauravsingh Sisodia <xaerru@gmail.com>
Reviewed-by: Sahana Prasad <sahana@redhat.com>
2024-03-19 10:26:44 +01:00
Gauravsingh Sisodia
1176a71d61 examples: server check all keys in authorized_keys instead of one
Fix read file with fgets and remove memory leaks

Remove use of ssh_pki_import_pubkey_file in ssh server and update max line size

Fix example server line no. and formatting

Fix check for leading whitespace in line

Reformat to avoid nesting

Remove setting sdata->authenticated to 0, the default is 0

Better error messages and handle case for fgets failing

Increment lineno at start

Signed-off-by: Gauravsingh Sisodia <xaerru@gmail.com>
Reviewed-by: Jakub Jelen <jjelen@redhat.com>
2024-01-22 09:50:06 +01:00
Jakub Jelen
d53236d69f Fix typos detected with new codespell
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Reviewed-by: Sahana Prasad <sahana@redhat.com>
2024-01-02 16:52:52 +01:00
Jakub Jelen
9847f3f638 Deprecate SSH_BIND_OPTIONS_{RSA,ECDSA}KEY in favor of generic HOSTKEY
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Reviewed-by: Norbert Pocs <npocs@redhat.com>
2023-06-26 15:10:52 +02:00
Mohammad Shehar Yaar Tausif
a3a13eb3a8 Remove support for DSA Keys
Solving issue #110. The original work is at !231
Some changes were needed because the newly added features in master through time

Signed-off-by: Mohammad Shehar Yaar Tausif <sheharyaar48@gmail.com>
Signed-off-by: Norbert Pocs <npocs@redhat.com>
Reviewed-by: Jakub Jelen <jjelen@redhat.com>
2023-02-02 14:49:06 +01:00
Xiang Xiao
dbe504ea0a Make the transfer buffer size configurable
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Reviewed-by: Jakub Jelen <jjelen@redhat.com>
Change-Id: I5052bac703b5a0c289ca5c28569cadeb54d3d507
2021-06-16 11:56:44 +02:00
Xiang Xiao
a8a74a70fa examples/ssh_server_fork: Support the multi-client through pthread
so the same code base demo both multi-process and multi-thread model

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Reviewed-by: Jakub Jelen <jjelen@redhat.com>
Change-Id: I98554a99b7a31586be37abde7c357f81a05c3d6e
2021-05-31 12:21:42 +02:00