1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-09-17 00:22:04 +03:00
Commit Graph

892 Commits

Author SHA1 Message Date
Andreas Schneider
de464cb74e src: Update my mail address. 2014-01-07 16:09:04 +01:00
Aris Adamantiadis
61e701caaa update copyright information 2014-01-07 15:18:44 +01:00
Aris Adamantiadis
ad287371fb pki: fix gcrypt signature process 2014-01-07 14:21:15 +01:00
Andreas Schneider
7b2e07ecbc session: Fix a possible memory leak. 2014-01-06 16:18:06 +01:00
Aris Adamantiadis
0404d45c29 poll: fix poll_handles ownerships 2014-01-06 16:18:06 +01:00
Aris Adamantiadis
f2215d14de socket: don't attempt reading a non-connected socket 2014-01-06 16:18:06 +01:00
Andreas Schneider
2068973ff3 poll: Correctly free ssh_event_fd_wrapper.
This is allocated by ssh_event_add_fd.
2013-12-22 22:26:51 +01:00
Andreas Schneider
6eea08a9ef config: Support expansion in the Host variable too.
BUG: https://red.libssh.org/issues/127
2013-12-21 14:37:55 +01:00
Jon Simons
a633deb985 channel: fix setting of channel->flags
Fix the setting of 'channel->flags' to use '|='.  Before this
change, one bug symptom can be that channels are never fully
free'd via ssh_channel_free, resulting in memory leaks.

Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2013-12-11 21:03:45 +01:00
Jon Simons
50b9a182f5 client: use ssh_channel_do_free in ssh_disconnect
Ensure to use 'ssh_channel_do_free' in 'ssh_disconnect', when removing and
free'ing up a session's channels.  This matches the behavior in 'ssh_free',
and is necessary to fully free any channel which may not have been closed
completely (see usage of flags SSH_CHANNEL_FLAG_CLOSED_REMOTE,
SSH_CHANNEL_FLAG_FREED_LOCAL).

Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2013-12-11 21:03:43 +01:00
Andreas Schneider
bb88b637a9 bind: Correctly free all memory in ssh_bind_free().
Thanks to Jacob Baines.
2013-12-09 19:50:52 +01:00
Jon Simons
60d5824760 session: Add ssh_get_clientbanner(). 2013-12-07 16:24:53 +01:00
Andreas Schneider
397be918cd channels: Add a ssh_channel_read_timeout function. 2013-12-04 20:34:52 +01:00
Andreas Schneider
2c66eeaf75 pki: Fix a memory leak.
CID #1132819
2013-11-28 11:44:34 +01:00
Andreas Schneider
f1c56e4309 pki: Add ssh_pki_import_privkey_file(). 2013-11-27 22:54:40 +01:00
Andreas Schneider
1fdc1025a8 pki_crypto: Add pki_private_key_to_pem(). 2013-11-27 22:54:40 +01:00
Andreas Schneider
a375b6c996 pki_gcrypt: Add pki_private_key_to_pem() stub. 2013-11-27 22:54:40 +01:00
Andreas Schneider
ecb01e05a2 curve25519: Fix memory leaks in ssh_server_curve25519_init().
CID #1125255
2013-11-27 22:53:53 +01:00
Andreas Schneider
b3911d0fa2 curve25519: Do not leak q_s_string.
CID #1125256
2013-11-27 22:53:53 +01:00
Andreas Schneider
1ee687ea6f curve25519: Fix a memory leak.
CID #1125257
2013-11-27 22:53:53 +01:00
Andreas Schneider
84e29f9c06 packet: Remove logically dead code.
CID #1128796
2013-11-27 22:53:53 +01:00
Andreas Schneider
3e11cb8071 ecdh: Use bignum_bin2bn. 2013-11-27 22:53:48 +01:00
Nicolas Viennot
78e78642e7 server: Add a ssh_send_keepalive() function.
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2013-11-24 23:21:39 +01:00
Jon Simons
7ab0e3fe62 channel: fix infinite loop in channel_write_common
BUG: https://red.libssh.org/issues/130

Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2013-11-22 10:34:49 +01:00
Rod Vagg
94db978218 flush channel after EOF and CLOSE 2013-11-18 17:23:52 +01:00
Aris Adamantiadis
78ea8608b0 logging: fix server-side logging 2013-11-18 15:28:59 +01:00
Aris Adamantiadis
7d9940d6eb gssapi: fix logging 2013-11-18 15:10:56 +01:00
Aris Adamantiadis
9f4fa22250 sockets: null pointer check 2013-11-18 14:42:06 +01:00
Simo Sorce
330f6c73f6 gssapi: Fix support of delegated credentials
In a previous refactoring patch, the code underpinning the
ssh_gssapi_set_creds() API was inadvertently removed. This patch
fixes the problem.

Also clarify what variable holds which credentials and insure that
credentials created within the library are propelry freed.

Signed-off-by: Simo Sorce <simo@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2013-11-17 11:43:52 +01:00
Simo Sorce
4a3934da48 gssapi: Add support for GSSAPIDelegateCredentials config option.
Signed-off-by: Simo Sorce <simo@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2013-11-17 11:43:52 +01:00
Simo Sorce
68b996bdbf options: Add SSH_OPTIONS_GSSAPI_DELEGATE_CREDENTIALS option.
Signed-off-by: Simo Sorce <simo@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2013-11-17 11:43:50 +01:00
Andreas Schneider
d364374422 gssapi: Add error checks and cleanup the code in ssh_gssapi_auth_mic(). 2013-11-15 16:29:49 +01:00
Simo Sorce
00af5bd582 gssapi: Use GSSAPIClientIdentity to acquire creds
Signed-off-by: Simo Sorce <simo@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2013-11-15 16:29:49 +01:00
Andreas Schneider
1ab5abf0e6 gssapi: Add support for GSSAPIClientIdentity config option. 2013-11-15 16:29:49 +01:00
Andreas Schneider
f5d1d813fb options: Add SSH_OPTIONS_GSSAPI_CLIENT_IDENTITY option. 2013-11-15 16:29:49 +01:00
Andreas Schneider
92928a7d8d gssapi: Add support for GSSAPIServerIdentity config option. 2013-11-15 16:29:49 +01:00
Andreas Schneider
651c173e72 gssapi: Add suppport to set GSSAPI server identity. 2013-11-15 16:29:49 +01:00
Simo Sorce
f76cd8b6d5 Fix gssapi credential handling.
- Properly acquire and inquitre credentials to get the list of available
credentials.
- Avoid enforcing a specific username it breaks some use cases (k5login).
- Remove confusing references to delegated credentials as there is no code
that actually uses delegated credentials in the initialization case.

Signed-off-by: Siom Sorce <simo@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2013-11-15 16:29:49 +01:00
Andreas Schneider
2bbeebd505 socket: Fix connect if we pass in a fd.
BUG: https://red.libssh.org/issues/106

Thanks to Saju Panikulam.
2013-11-15 08:54:18 +01:00
Andreas Schneider
fef32b4c14 packet: Remove dead code. 2013-11-14 11:44:12 +01:00
Andreas Schneider
2eaff2b363 packet: Set the packet to the processed data position.
Else we could end up with packet - current_macsize if to_be_read is 0.
2013-11-14 11:44:11 +01:00
Andreas Schneider
2b3e69fd5f dh: Fix wrong assignment.
Ups, sorry.
2013-11-14 08:09:42 +01:00
Andreas Schneider
cd992a90fb poll: Fix realloc in ssh_poll_ctx_resize(). 2013-11-13 16:29:41 +01:00
Andreas Schneider
6ea111fd8a dh: Avoid possible memory leaks with realloc. 2013-11-13 16:29:41 +01:00
Andreas Schneider
cda641176d packet: Refactor ssh_packet_socket_callback().
Make error checking more readable and add additional NULL checks.
2013-11-13 16:29:41 +01:00
Andreas Schneider
5581645500 server: Fix malloc call. 2013-11-13 16:29:41 +01:00
Colin Walters
3e64ef3bf5 session: Always request POLLIN
The assumption is that if libssh functions are being invoked, we want
to read data.

Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2013-11-09 12:29:26 +01:00
Colin Walters
7372cd837a Add ssh_get_poll_flags()
For integration with an external mainloop, we need to know how to
replicate libssh's internal poll() calls.  We originally through
ssh_get_status() was that API, but it's not really - those flags only
get updated from the *result* of a poll(), where what we really need
is to know how libssh would *start* a poll().

Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2013-11-09 12:29:25 +01:00
Colin Walters
1ecf7003f6 client: If we have a pre-connected FD, set state to SOCKET_CONNECTED
Otherwise applications providing their own fd end up tripping an
assertion, since the session is just in _CONNECTING.

Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2013-11-09 12:29:24 +01:00
Andreas Schneider
e52ff2c8ff dh: Move ssh_get_hexa() and ssh_print_hexa() down.
This way they are in the documentation block for the session and we get
documentation for them.
2013-11-06 17:11:25 +01:00