Norbert Pocs
657d9143d1
SSH_LOG_DEBUG: Recategorize loglevels
...
Loglevel INFO is the default openssh configuration setting which does not print
redundant information. On a system using openssh with loglevels set by the
terms of openssh will cause unwanted log lines in the output.
recategorized based on - SSH_LOG_DEBUG are informational debug logs (no error)
Signed-off-by: Norbert Pocs <npocs@redhat.com >
Reviewed-by: Jakub Jelen <jjelen@redhat.com >
Reviewed-by: Andreas Schneider <asn@cryptomilk.org >
2022-10-07 09:13:19 +02:00
Norbert Pocs
7ea75cda45
SSH_LOG_TRACE: Recategorize loglevels
...
Do not print out logs when no fatal error happens.
This approach is similiar to openssh, when Error/Fatal does not print
recoverable error logs.
recategorized based on - SSH_LOG_TRACE are debug logs when error happens
Signed-off-by: Norbert Pocs <npocs@redhat.com >
Reviewed-by: Jakub Jelen <jjelen@redhat.com >
Reviewed-by: Andreas Schneider <asn@cryptomilk.org >
2022-10-07 09:13:19 +02:00
Norbert Pocs
bd1d06f51d
(bind_)config.c: Move "info" to SSH_LOG_INFO
...
No info log will be printed out when Loglevel WARN is set, only errors
Signed-off-by: Norbert Pocs <npocs@redhat.com >
Reviewed-by: Jakub Jelen <jjelen@redhat.com >
Reviewed-by: Andreas Schneider <asn@cryptomilk.org >
2022-10-07 09:13:19 +02:00
Carlo Bramini
37deed27d6
Libssh-0.10.4 cannot be compiled anymore on CYGWIN
...
Commit 8cf9c816 "Do not force GNU_SOURCE during build to fix #141 " has broken support for CYGWIN.
The build hangs with this error message:
libssh-0.10.4/src/config.c: In function ‘local_parse_glob’:
libssh-0.10.4/src/config.c:252:25: error: ‘GLOB_TILDE’ undeclared (first use in this function)
252 | rt = glob(fileglob, GLOB_TILDE, NULL, &globbuf);
| ^~~~~~~~~~
I think that it would be better to re-add it, by using target_compile_definitions() rather than target_compile_options(), which is more appropriate in my opinion.
Signed-off-by: Carlo Bramini carlo_bramini@users.sourceforge.net
Reviewed-by: Jakub Jelen <jjelen@redhat.com >
2022-10-04 14:12:11 +02:00
Norbert Pocs
38765d82fc
threads.c: Remove dot from documentation group definition
...
Signed-off-by: Norbert Pocs <npocs@redhat.com >
Reviewed-by: Jakub Jelen <jjelen@redhat.com >
2022-10-04 10:35:02 +02:00
Norbert Pocs
80e77802ab
session.c: Remove dot from documentation group definition
...
Signed-off-by: Norbert Pocs <npocs@redhat.com >
Reviewed-by: Jakub Jelen <jjelen@redhat.com >
2022-10-04 10:35:02 +02:00
Norbert Pocs
4070784029
server.c: Add missing function documentation
...
Signed-off-by: Norbert Pocs <npocs@redhat.com >
Reviewed-by: Jakub Jelen <jjelen@redhat.com >
2022-10-04 10:35:02 +02:00
Norbert Pocs
3d740c09da
poll.c: Remove dot from documentation group definition
...
Signed-off-by: Norbert Pocs <npocs@redhat.com >
Reviewed-by: Jakub Jelen <jjelen@redhat.com >
2022-10-04 10:35:02 +02:00
Norbert Pocs
27e223ba22
pki.c: Add missing function documentation
...
Signed-off-by: Norbert Pocs <npocs@redhat.com >
Reviewed-by: Jakub Jelen <jjelen@redhat.com >
2022-10-04 10:35:02 +02:00
Norbert Pocs
954f9c86ce
misc.c: Remove dot from documentation group definition
...
Signed-off-by: Norbert Pocs <npocs@redhat.com >
Reviewed-by: Jakub Jelen <jjelen@redhat.com >
2022-09-29 11:14:33 +02:00
Norbert Pocs
99bad9006e
messages.c: Add missing function documentation
...
Signed-off-by: Norbert Pocs <npocs@redhat.com >
Reviewed-by: Jakub Jelen <jjelen@redhat.com >
2022-09-29 11:14:15 +02:00
Norbert Pocs
c17b8f1fb2
log.c: Remove dot from documentation group definition
...
Signed-off-by: Norbert Pocs <npocs@redhat.com >
Reviewed-by: Jakub Jelen <jjelen@redhat.com >
2022-09-29 11:13:46 +02:00
Norbert Pocs
d57a383d43
getrandom_crypto.c: Add function to the documentation
...
Signed-off-by: Norbert Pocs <npocs@redhat.com >
Reviewed-by: Jakub Jelen <jjelen@redhat.com >
2022-09-29 11:12:55 +02:00
Norbert Pocs
5ef99fcaa5
error.c: Remove dot from documentation group definition
...
Signed-off-by: Norbert Pocs <npocs@redhat.com >
Reviewed-by: Jakub Jelen <jjelen@redhat.com >
2022-09-29 11:12:26 +02:00
Norbert Pocs
85f73a9bf6
client.c: Add documentation
...
Signed-off-by: Norbert Pocs <npocs@redhat.com >
Reviewed-by: Jakub Jelen <jjelen@redhat.com >
2022-09-29 11:11:09 +02:00
Norbert Pocs
6d67d3ca5d
buffer.c: Remove dot from documentation group definition
...
Signed-off-by: Norbert Pocs <npocs@redhat.com >
Reviewed-by: Jakub Jelen <jjelen@redhat.com >
2022-09-29 11:08:34 +02:00
Norbert Pocs
d3f0aabe7f
auth.c: Remove dot from documentation group definition
...
Signed-off-by: Norbert Pocs <npocs@redhat.com >
Reviewed-by: Jakub Jelen <jjelen@redhat.com >
2022-09-29 11:08:12 +02:00
Norbert Pocs
f8ba12f0a6
agent.c: Add missing docu to libssh_auth group
...
Signed-off-by: Norbert Pocs <npocs@redhat.com >
Reviewed-by: Jakub Jelen <jjelen@redhat.com >
2022-09-29 11:06:43 +02:00
Linus Kardell
26895498fb
Implement IdentitiesOnly
...
Signed-off-by: Linus Kardell <linus.kardell@gmail.com >
Reviewed-by: Jakub Jelen <jjelen@redhat.com >
2022-09-22 12:31:48 +02:00
Thomas Baag
bccb8513fa
config: Escape brackets in ProxyCommand build from ProxyJump
...
Missing escaping results in syntax errors in Zsh shell because of square
brackets getting interpreted as being a pattern for globbing.
Signed-off-by: Thomas Baag <libssh-git@spam.b2ag.de >
Reviewed-by: Jakub Jelen <jjelen@redhat.com >
2022-09-22 12:30:42 +02:00
Norbert Pocs
bcc541f467
dh_crypto.c: Add missing rv check
...
Signed-off-by: Norbert Pocs <npocs@redhat.com >
Reviewed-by: Jakub Jelen <jjelen@redhat.com >
2022-09-22 12:29:08 +02:00
Andreas Schneider
915df08058
kdf: Avoid endianess issues
...
The key_type is only a letter, if we use and `int` and then cast it to
(const char *) we will end up with a 0 value on big endian.
Signed-off-by: Andreas Schneider <asn@cryptomilk.org >
Reviewed-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com >
2022-09-07 14:37:29 +02:00
Andreas Schneider
3e4c2205c5
knownhosts: Fix and infinite loop when iterating known host entries
...
Fixes #145
Signed-off-by: Andreas Schneider <asn@cryptomilk.org >
Reviewed-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com >
2022-09-05 13:21:51 +02:00
Andreas Schneider
2d79c7a9d5
knownhosts: Give better warnings about unsupported key types
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org >
Reviewed-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com >
2022-09-05 13:21:45 +02:00
Jakub Jelen
d69026d7a4
config: Expand tilde when handling include directives
...
Related: #93
Signed-off-by: Jakub Jelen <jjelen@redhat.com >
Reviewed-by: Andreas Schneider <asn@cryptomilk.org >
2022-09-02 09:55:19 +02:00
Jakub Jelen
f86727e06a
libcrypto: Avoid unused variable warning
...
Signed-off-by: Jakub Jelen <jjelen@redhat.com >
Reviewed-by: Andreas Schneider <asn@cryptomilk.org >
2022-08-30 13:24:20 +02:00
Jakub Jelen
a69424d4c5
socket: Remove needless typedef
...
Signed-off-by: Jakub Jelen <jjelen@redhat.com >
Reviewed-by: Andreas Schneider <asn@cryptomilk.org >
2022-08-30 13:24:20 +02:00
Jakub Jelen
8aade7ce6f
wrapper: Avoid size_t to uint8 cast
...
Signed-off-by: Jakub Jelen <jjelen@redhat.com >
Reviewed-by: Andreas Schneider <asn@cryptomilk.org >
2022-08-30 13:24:20 +02:00
Jakub Jelen
41f2ee92c6
misc: Refactor ssh_strerror to check return values
...
Signed-off-by: Jakub Jelen <jjelen@redhat.com >
Reviewed-by: Andreas Schneider <asn@cryptomilk.org >
2022-08-30 13:24:20 +02:00
Jakub Jelen
8cf9c8162f
Do not force GNU_SOURCE during build to fix #141
...
Signed-off-by: Jakub Jelen <jjelen@redhat.com >
Reviewed-by: Andreas Schneider <asn@cryptomilk.org >
2022-08-30 13:24:20 +02:00
Andreas Schneider
bd2db30174
options: Use exec for the proxy command
...
This wont create a new process but replace the shell.
Signed-off-by: Andreas Schneider <asn@cryptomilk.org >
Reviewed-by: Jakub Jelen <jjelen@redhat.com >
2022-08-29 16:32:32 +02:00
Andreas Schneider
d642b20d9c
socket: Add a comment about shells
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org >
Reviewed-by: Jakub Jelen <jjelen@redhat.com >
2022-08-29 16:21:04 +02:00
Andreas Schneider
2546b62242
socket: Add error message if execv fails
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org >
Reviewed-by: Jakub Jelen <jjelen@redhat.com >
2022-08-29 16:21:04 +02:00
Andreas Schneider
f306aafdc6
session: Initialize the port with the standard port (22)
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org >
Reviewed-by: Jakub Jelen <jjelen@redhat.com >
2022-08-29 10:05:22 +02:00
Andreas Schneider
648baf0f3c
misc: Fix expanding port numbers
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org >
Reviewed-by: Jakub Jelen <jjelen@redhat.com >
2022-08-29 10:03:40 +02:00
Andreas Schneider
20406e51c9
misc: Fix format truncation in ssh_path_expand_escape()
...
error: ‘%u’ directive output may be truncated writing between 1 and 10
bytes into a region of size 6.
Signed-off-by: Andreas Schneider <asn@cryptomilk.org >
Reviewed-by: Jakub Jelen <jjelen@redhat.com >
2022-08-26 14:09:56 +02:00
Jakub Jelen
af85ee8e59
config: Avoid false positive report from Coveritt CID 1470006
...
Signed-off-by: Jakub Jelen <jjelen@redhat.com >
Reviewed-by: Andreas Schneider <asn@cryptomilk.org >
2022-08-25 14:53:59 +02:00
renmingshuai
0799775185
session->socket_callbacks.data will be set to ssh_packet_socket_callback
...
in ssh_packet_register_socket_callback. Here is redundant.
Signed-off-by: renmingshuai <renmingshuai@huawei.com >
Reviewed-by: Jakub Jelen <jjelen@redhat.com >
2022-08-25 14:51:53 +02:00
Timo Rothenpieler
17aec429f5
misc: rename gettimeofday symbol
...
mingw does have this function, even though it appears to be deprecated.
So the symbol has to have a different name, or linking becomes
impossible.
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org >
Reviewed-by: Jakub Jelen <jjelen@redhat.com >
2022-08-25 14:48:15 +02:00
Jakub Jelen
a81e78aff4
pki: Rework handling of EVP_PKEYs in OpenSSL backend
...
Signed-off-by: Jakub Jelen <jjelen@redhat.com >
Reviewed-by: Andreas Schneider <asn@cryptomilk.org >
Reviewed-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com >
2022-08-25 14:43:31 +02:00
Jakub Jelen
0800618f32
Initialize pkcs11 engine only once
...
Signed-off-by: Jakub Jelen <jjelen@redhat.com >
Reviewed-by: Andreas Schneider <asn@cryptomilk.org >
Reviewed-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com >
2022-08-25 14:43:31 +02:00
Jakub Jelen
f721ee847b
libcrypto: Skip unneccessary call to ENGINE_cleanup in OSSL>1.1
...
Signed-off-by: Jakub Jelen <jjelen@redhat.com >
Reviewed-by: Andreas Schneider <asn@cryptomilk.org >
Reviewed-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com >
2022-08-25 14:43:31 +02:00
Jakub Jelen
382ff38caa
pki: Factor out the backend-specifics from cleaning the key structure
...
Signed-off-by: Jakub Jelen <jjelen@redhat.com >
Reviewed-by: Andreas Schneider <asn@cryptomilk.org >
Reviewed-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com >
2022-08-25 14:43:31 +02:00
Jakub Jelen
aa1e136ea3
session: Avoid memory leak of agent_socket from configuration file
...
Thanks oss-fuzz
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=48268
Signed-off-by: Jakub Jelen <jjelen@redhat.com >
Reviewed-by: Andreas Schneider <asn@cryptomilk.org >
2022-08-08 10:11:16 +02:00
Jakub Jelen
0982715bb5
curve25519: Do not check for openssl functions when other crypto backend is used
...
Signed-off-by: Jakub Jelen <jjelen@redhat.com >
Reviewed-by: Andreas Schneider <asn@cryptomilk.org >
2022-08-03 10:41:49 +02:00
Jakub Jelen
ebeee7631d
pki: Do not check for DSA headers when DSA is not built in
...
Signed-off-by: Jakub Jelen <jjelen@redhat.com >
Reviewed-by: Andreas Schneider <asn@cryptomilk.org >
2022-08-03 10:41:49 +02:00
Jakub Jelen
aca482a5a5
mbedcrypto: Refactor PEM parsing
...
Signed-off-by: Jakub Jelen <jjelen@redhat.com >
Reviewed-by: Andreas Schneider <asn@cryptomilk.org >
2022-08-03 10:41:49 +02:00
Jakub Jelen
355e29d881
session: Initialize pointers
...
Signed-off-by: Jakub Jelen <jjelen@redhat.com >
Reviewed-by: Andreas Schneider <asn@cryptomilk.org >
2022-08-03 10:41:49 +02:00
Anderson Toshiyuki Sasaki
163951d869
init: Free global init mutex in the destructor on Windows
...
Fixes : #57 (T238)
Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com >
Reviewed-by: Jakub Jelen <jjelen@redhat.com >
2022-08-02 15:43:35 +02:00
Jakub Jelen
c09b02c573
Move digest functions into separate file
...
The external ed25519 requires also the sha512 functions to work.
Signed-off-by: Jakub Jelen <jjelen@redhat.com >
Reviewed-by: Andreas Schneider <asn@cryptomilk.org >
2022-07-19 15:21:50 +02:00