1
1
Граф коммитов

774 Коммитов

Автор SHA1 Сообщение Дата
Aris Adamantiadis
8e2699e161 start of work to have callbackbased ssh_bind 2010-10-19 23:51:32 +02:00
Aris Adamantiadis
3253ece2a2 Oops, libssh.h did not compile anymore 2010-10-15 16:43:38 +02:00
Aris Adamantiadis
4b462449cf Fix OPTIONS_BINDADDR, PROXYCOMMAND constant change 2010-10-14 11:53:30 +02:00
Aris Adamantiadis
4f8907a524 Removed the global poll ctx in fav. of /session ctx 2010-10-12 17:57:15 +02:00
Aris Adamantiadis
0bc032726d Fix prepend bug 2010-10-03 13:01:21 +02:00
Aris Adamantiadis
a9ec8b055f Fix warnings on testcases 2010-10-02 23:27:26 +02:00
milo
524302ca7e Added ssh_channel_write_stderr() for the server 2010-10-02 22:52:06 +02:00
milo
2617024136 Added channel features on the server
- ssh_channel_request_send_exit_status()
- ssh_channel_request_send_exit_signal()

- enhanced these features client-side
2010-10-02 22:51:49 +02:00
milo
26d40b5354 Handle global requests and reverse forwarding 2010-10-02 22:51:35 +02:00
milo
c4356531f7 Add new callbacks in session and channels 2010-10-02 22:51:14 +02:00
Aris Adamantiadis
5b1c985a0e Changed the threads cbks from struct to publ func 2010-09-30 11:10:08 +02:00
Andreas Schneider
1b471256d4 misc: Differentiate between client and server in ssh_analyze_banner. 2010-09-29 12:11:43 +02:00
Andreas Schneider
8b719e51cf misc: Move ssh_analyze_banner to a common location.
Don't duplicate functions!
2010-09-29 11:26:35 +02:00
Andreas Schneider
15e4ec38f2 pki: Added GPL to header file. 2010-09-28 19:07:16 +02:00
Andreas Schneider
a2fe4b2b2c options: Rename HOSTKEYCHECK to STRICTHOSTKEYCHECK.
Looks like people are confused by the name and think this is normal host
key checking.
2010-09-28 14:13:18 +02:00
Aris Adamantiadis
75a0281a6b Fixed outgoing flow control + writes behaviours 2010-09-26 22:33:58 +02:00
Aris Adamantiadis
b0c03280d1 ssh_threads_init is private 2010-09-12 22:01:21 +02:00
Aris Adamantiadis
5eb7c7b6ec Added initialisation logs for threading 2010-09-12 21:53:42 +02:00
Aris Adamantiadis
b7af2b2959 Changed callbacks type 2010-09-12 21:45:53 +02:00
Aris Adamantiadis
49f57a8d0d Implemented the noop and native pointers 2010-09-06 16:52:14 +02:00
Andreas Schneider
fbe102bada threads: Build a libssh threading library. 2010-09-06 15:17:03 +02:00
Aris Adamantiadis
2cca490076 Moved pthread specific code in src/threads/pthread.c
pthread example doesn't compile du to the lack of
libssh_threads_native.so library
2010-09-06 14:51:01 +02:00
Andreas Schneider
2656c6b4ac server: Fixed a shadowed variable. 2010-09-05 12:34:12 +02:00
Aris Adamantiadis
285388409f Made pthread threading a user macro 2010-09-03 12:03:04 +02:00
Aris Adamantiadis
8c55294ea9 Openssl implementation of threading + default imp 2010-09-01 14:07:45 +02:00
Aris Adamantiadis
bcc2d8474c Begin of a solution for threading 2010-08-30 23:44:03 +02:00
Aris Adamantiadis
1fa9409554 ssh_channel_forward_* -> ssh_forward_*
Fixes bug #108
2010-08-28 23:31:07 +02:00
Aris Adamantiadis
adcd2e38e9 libsshpp: do not use deprecated functions 2010-08-28 22:53:18 +02:00
Aris Adamantiadis
c19fb5656b Fixed missing libsshpp methods 2010-08-28 22:51:23 +02:00
Aris Adamantiadis
74939b8b8d Added missing /** in doxygen @}'s 2010-08-28 21:32:08 +02:00
Aris Adamantiadis
29a229724b Fix a few documentation issues 2010-08-28 21:05:24 +02:00
Aris Adamantiadis
a9fafc32a8 Near to end of implementation of the C++ wrapper 2010-08-28 13:59:24 +02:00
Aris Adamantiadis
bcf4e56fe0 Fix C++ documentation about the exceptions 2010-08-27 12:01:42 +02:00
Aris Adamantiadis
1834ca3820 Added a SSH_NO_CPP_EXCEPTIONS mode to libsshpp.h 2010-08-27 11:53:38 +02:00
Andreas Schneider
36576babe8 doc: Document the server responses. 2010-08-27 11:27:42 +02:00
Aris Adamantiadis
8066100f53 Doxygen fixes 2010-08-23 20:48:30 +02:00
Aris Adamantiadis
f60c22628a lot of C++ wrapper work 2010-08-23 20:34:17 +02:00
Milo Jhoran
24b524040b server: Added an API entry for the message callback.
Signed-off-by: Andreas Schneider <asn@cynapses.org>
2010-08-13 11:17:18 +02:00
milo
e533c3f33b server: Fix missing socket close notification.
Signed-off-by: Andreas Schneider <asn@cynapses.org>
2010-08-13 11:17:09 +02:00
milo
855b73de87 server: Split ssh_bind_accept and create ssh_handle_key_exchange.
Signed-off-by: Andreas Schneider <asn@cynapses.org>
2010-08-10 00:30:25 +02:00
Andreas Schneider
a6b6a61775 server: Make ssh_accept a depreacted function to not break the API. 2010-08-09 21:39:32 +02:00
Andreas Schneider
39c9a6dfed server: Merge ssh_bind_accept. 2010-08-09 21:28:47 +02:00
Andreas Schneider
561df8d9a2 server: Rename ssh_accept to ssh_bind_accept. 2010-08-09 20:54:43 +02:00
milo
eb361626cb session: Added callback for the connection per session.
Signed-off-by: Andreas Schneider <asn@cynapses.org>
2010-08-09 20:53:49 +02:00
milo
b0f8ca556b session: Fixed the type of the session dh_handshake_state.
Signed-off-by: Andreas Schneider <asn@cynapses.org>
2010-08-09 20:53:03 +02:00
Andreas Schneider
296f6a9217 build: Fixed the Windows preprocessor macros and defines. 2010-08-03 18:13:59 +02:00
Aris Adamantiadis
d688ed2553 Begining of zlib@openssh.org implementation 2010-07-23 16:49:28 +02:00
Aris Adamantiadis
e721c122d3 Continue removing old flushing code 2010-07-23 11:01:06 +02:00
Aris Adamantiadis
8cd0d0040e Removed obsolete socket functions 2010-07-23 08:27:05 +02:00
Aris Adamantiadis
5aa9cf2fcf Add consistency check to ssh_set_callbacks 2010-07-23 08:09:57 +02:00
Aris Adamantiadis
a924869096 Receive and send SSH_MSG_UNIMPLEMENTED 2010-07-18 00:39:51 +02:00
Andreas Schneider
ef0215fcf2 poll: Added poll constants for Windows.
WSAPoll uses different constanst values as the POSIX implementation,
what else ...
2010-07-09 09:49:21 +02:00
Andreas Schneider
82beeea619 options: Added option to bind a client to an ip address.
Thanks to Donatello Boccaforno <donatello.boccaforno@gmail.com>.
2010-07-07 12:43:50 +02:00
Aris Adamantiadis
a18a3813fb Removed dead code in socket.c 2010-07-07 10:19:47 +02:00
Aris Adamantiadis
94b00cc762 Add ssh_callbacks_exists internal macro + unittest
(first commit with eclipse helios, crossing fingers ...)
2010-06-25 16:19:19 +02:00
Andreas Schneider
870c9a7a08 socket: Rename INVALID_SOCKET_T to SSH_INVALID_SOCKET. 2010-06-17 13:19:24 +02:00
Andreas Schneider
2a6341c08c socket: Fixed checks for max fd. 2010-06-17 13:13:35 +02:00
Andreas Schneider
78e7873e92 socket: Fixed prototype of ssh_socket_pollcallback(). 2010-06-17 13:09:58 +02:00
Andreas Schneider
c30a25e64c poll: Fixed a malfunction with wrong max fd value check. 2010-06-17 11:16:24 +02:00
Andreas Schneider
b9a9f54c45 string: Added a function to delete a char basesd stirng object. 2010-06-11 11:05:37 +02:00
Andreas Schneider
8f0d40a1dd cpp: Fixed return value of userauthAutopubkey. 2010-06-02 10:01:46 +02:00
Aris Adamantiadis
517e58d3dc Fixed keyboard-interactive and unit test 2010-05-19 14:07:40 +02:00
Andreas Schneider
255f5bd73f Install missing legacy header file. 2010-05-17 23:36:39 +02:00
Andreas Schneider
488e822c8d poll: Added a cleanup function to free the ws2_32 library. 2010-05-17 11:19:31 +02:00
Aris Adamantiadis
2234c115f2 Separation work between openssl and libgcrypt 2010-05-14 01:22:22 +02:00
Aris Adamantiadis
b23b3f1d99 Sanitize libssh namespace + legacy wrappers 2010-05-14 00:51:08 +02:00
Andreas Schneider
91ef298e7d Added runtime detection of WSAPoll().
Signed-off-by: Andreas Schneider <mail@cynapses.org>
2010-05-12 18:22:09 +02:00
Andreas Schneider
fc508f9494 Fixed Windows build. 2010-05-12 12:46:50 +02:00
Andreas Schneider
3573bd4d87 Use the new expand functions. 2010-05-11 09:40:33 +02:00
Andreas Schneider
fac56bae32 Added a function to expand an escaped string. 2010-05-11 02:10:55 +02:00
Andreas Schneider
4df7daec82 Added a function to expand the tilde from a path. 2010-05-11 02:10:55 +02:00
Aris Adamantiadis
4a21b6f168 Some grammarnazi things + fix int->socket_t 2010-05-10 22:01:09 +02:00
Andreas Schneider
8ba02b6f4c Use configure checks to define vsnprintf and strncpy. 2010-05-10 15:32:17 +02:00
Andreas Schneider
8dcfc9849e Fixed building libssh with VC9. 2010-05-10 14:40:00 +02:00
Andreas Schneider
b28fb6654c Fixed a MSVC build error. 2010-05-10 13:18:16 +02:00
Andreas Schneider
9278dc0666 Added more defines to use secure VC functions. 2010-05-10 10:41:47 +02:00
Aris Adamantiadis
f31a14b793 ssh_socket support for 2 fd + Proxyhost command 2010-05-09 00:48:10 +02:00
Aris Adamantiadis
c691aa3e32 Forgot the pki files 2010-05-02 00:03:06 +02:00
Aris Adamantiadis
430e570629 Added pki.[ch] files as a new standard API for PKs
Right now it's just a wrapper to the existing calls
but soon it's gona be the effective implementation and
other calls will be wrappers.
2010-05-01 20:32:27 +02:00
Aris Adamantiadis
22be109956 First implementation of known_hosts with port read 2010-05-01 00:40:10 +02:00
Aris Adamantiadis
904c6ed853 Renamed private type TYPE_RSA to SSH_KEYTYPE_*
Also made this enum public
2010-04-28 12:14:03 +02:00
Aris Adamantiadis
186e07b415 Added ssh_privatekey_type public function 2010-04-28 11:51:42 +02:00
Aris Adamantiadis
250273cf1a Do not compile aes*-ctr with <=OpenSSL 0.9.7b 2010-04-14 21:11:29 +02:00
Aris Adamantiadis
7c3040c624 First experiment at trying to make libssh c89 2010-04-07 13:20:30 +02:00
Ruben Garcia Azuara
5a2abd34ce Added support for StrictHostKeyChecking and UserKnownHostsFile parameters.
Added OpenSSH parameters to libssh:
  - StrictHostKeyChecking
  - UserKnownHostsFile

This parameters are useful to avoid checking the fingerprint. Eg:

~/.ssh/config:
    Host 192.10.20.30
    StrictHostKeyChecking no
    UserKnownHostsFile /dev/null

Signed-off-by: Ruben Garcia Azuara <rubenga@tid.es>
Signed-off-by: Andreas Schneider <mail@cynapses.org>
2010-04-07 11:29:47 +02:00
Ruben Garcia Azuara
14eb593af3 Fixed solaris compilation warning and ignore case at host parameter.
- Suppress compilation warning in solaris caused by a comma at the end of
    the last value.
  - Ignore case at host parameter in config file

Signed-off-by: Ruben Garcia Azuara <rubenga@tid.es>
Signed-off-by: Andreas Schneider <mail@cynapses.org>
2010-04-07 11:29:47 +02:00
Andreas Schneider
fddbf1f94c Added a select(2) based poll-emulation if poll(2) is not available. 2010-04-04 17:38:50 +02:00
Andreas Schneider
ae64c19f20 Fixed the group of the server functions. 2010-04-04 17:38:50 +02:00
Andreas Schneider
dab450be32 Fixed the doxygen group of the libssh c++ wrapper. 2010-04-04 17:37:05 +02:00
Andreas Schneider
a127c8827a Fixed the documentation of log.c 2010-04-04 15:51:54 +02:00
Andreas Schneider
9e9e7e95ee Fixed spelling. 2010-03-25 13:46:09 +01:00
Andreas Schneider
f34cd24f80 Fixed and added support for several identity files. 2010-03-04 20:41:17 +01:00
Andreas Schneider
9f59be3224 Rename ssh_list_add to ssh_list_append. 2010-03-04 20:08:04 +01:00
Andreas Schneider
dea644bbd6 Added a prepend function for ssh_list. 2010-03-04 20:08:04 +01:00
Aris Adamantiadis
c987fd8c53 renamed ssh_list_get_head to ssh_list_pop_head 2010-03-01 18:11:40 +01:00
Andreas Schneider
39d6ef884a Added owner and group information in sftp attributes.
Parse the longname which is the output of 'ls -l' and set the owner and
group if we are talking to an openssh server.
2010-02-23 22:50:43 +01:00
Aris Adamantiadis
60e5a32d27 Small doc fix 2010-02-12 23:29:24 +01:00
Aris Adamantiadis
f8d0055503 More C++ work 2010-02-12 22:17:50 +01:00
Aris Adamantiadis
92ca76721a More C++ wrapper work.
Wrote stubs of functions needed in the wrapper
Created an Exception class which greatly simplifies
the use of libssh in C++
2010-02-11 23:08:07 +01:00
Andreas Schneider
12d43e2967 Rename the libssh sftp documentation group. 2010-02-07 22:36:03 +01:00
Andreas Schneider
a25b06ecfc Increase version number. 2010-02-05 12:07:50 +01:00
Aris Adamantiadis
6b703b8d6a Update c++ prototypes 2010-02-02 18:30:26 +01:00
Aris Adamantiadis
e7b74c57f3 Hacked SSH1 to get past authentication
Also resolved some bugs that may impact 0.4. need to check
2010-01-25 23:23:01 +01:00
Aris Adamantiadis
3407509ed7 Correctly handle channel failures and chan states 2010-01-24 23:03:56 +01:00
Aris Adamantiadis
3465b592e7 Few function name changes 2010-01-24 22:30:43 +01:00
Aris Adamantiadis
ca499a5495 Made ssh_packet_read asynchronous
Normally that's all that was needed into making SSH1 compliant
with the new API.
Beware, I have only implemented it, not actually tested it.
2010-01-24 22:27:44 +01:00
Aris Adamantiadis
8a1d832f80 Removed last calls to packet_read 2010-01-24 22:08:20 +01:00
Aris Adamantiadis
758df26582 Made parts of SSH asynchronous (inc kex1) 2010-01-24 21:03:03 +01:00
Aris Adamantiadis
6ae558b541 Beginning of async solution for SSH1 2010-01-24 01:07:08 +01:00
Aris Adamantiadis
68f53540df Move SSH-1 specific packet functions in packet1.c 2010-01-23 22:59:10 +01:00
Aris Adamantiadis
48ba9c9bc1 stub of C++ wrapper for libssh 2010-01-21 21:54:20 +01:00
Aris Adamantiadis
94d1112c55 SSH-1 cleanup and compile
Not tested, probably not working correctly yet
2010-01-10 21:05:46 +01:00
Aris Adamantiadis
a2505078da Set socket blocking after connexion 2010-01-08 23:28:55 +01:00
Aris Adamantiadis
514ab6eed2 Fixed blocking bug in channel_poll 2010-01-08 23:05:10 +01:00
Aris Adamantiadis
40bcc0bed8 No more packet_read2() ! 2010-01-08 22:33:58 +01:00
Aris Adamantiadis
40871ab1cc Prefix message_handle_channel_request with ssh_ 2010-01-08 22:27:16 +01:00
Aris Adamantiadis
2fc4c7e335 Dequeue the processed messages 2010-01-08 22:25:26 +01:00
Aris Adamantiadis
da8263b3f6 Renamed message_queue to ssh_message_queue 2010-01-08 22:16:00 +01:00
Aris Adamantiadis
12db7c4bc1 Merged the channel_request hdlrs and clean hdlrs 2010-01-08 22:14:31 +01:00
Aris Adamantiadis
db3ef37771 ssh_packet_userauth_request with new system 2010-01-08 21:09:40 +01:00
Aris Adamantiadis
7f32558e08 Converted message handlers to new system 2010-01-07 22:41:38 +01:00
Aris Adamantiadis
228ac78397 Changes to messages for async message handling 2010-01-07 22:02:21 +01:00
Aris Adamantiadis
b6656a1525 Removed packet_wait for SSH2 2010-01-06 22:53:10 +01:00
Aris Adamantiadis
84ec17964e Made the server DH asynchronous.
It still needs testing and cleanup, it was done with less
care than the client-side.
The socket listening and connexion is still synchronous
2010-01-06 22:49:40 +01:00
Aris Adamantiadis
ef5dc6cd2b Add support for async global requests
Normally the infamous packet_wait() synchronous call
is gone in all SSH2 client code.
2010-01-06 21:48:44 +01:00
Aris Adamantiadis
335a0fe768 Remove some references to packet_wait() 2010-01-03 23:36:06 +01:00
Aris Adamantiadis
b25ebf4bdb Removed channel_handle now unused function 2010-01-03 23:23:56 +01:00
Aris Adamantiadis
648e5d62ba Some work for async channel requests 2010-01-03 22:14:21 +01:00
Vic Lee
1944dc8b5f Add new API function ssh_userauth_privatekey_file().
Signed-off-by: Vic Lee <llyzs@163.com>
Signed-off-by: Andreas Schneider <mail@cynapses.org>
2009-12-30 19:05:37 +01:00
Aris Adamantiadis
8d1faa0dbc Made channel_open_session partially asynchronous 2009-12-27 00:06:34 +01:00
Aris Adamantiadis
a229cb4676 Asynchronous authentication works ! 2009-12-26 21:59:37 +01:00
Aris Adamantiadis
682ed18123 New packet handler for SSH_USERAUTH_BANNER 2009-12-26 20:24:07 +01:00
Aris Adamantiadis
6f3505bf6b Asynchronous service request 2009-12-26 16:51:33 +01:00
Aris Adamantiadis
43288bc4f2 added ssh_message_auth_reply_pk_ok_simple 2009-12-20 18:51:37 +01:00
Aris Adamantiadis
2e22d6ef99 Add key validation in server side authentication 2009-12-20 18:05:02 +01:00
Aris Adamantiadis
a1870a62cf Documentation callbacks.h + standardization 2009-12-18 23:56:59 +01:00
Andreas Schneider
ebce70eba1 Fixed documentation of buffer struct. 2009-12-18 23:41:01 +01:00
Andreas Schneider
1b7877f6ed Moved the doxygen mainpage to doc/mainpage.dox 2009-12-18 23:35:41 +01:00
Andreas Schneider
7500b0564c Document the callback structure correctly. 2009-12-18 23:19:37 +01:00
Andreas Schneider
0c992ece3b Added a mainpage to doxygen. 2009-12-18 23:12:47 +01:00
Aris Adamantiadis
9780f22866 Made packet_wait issue warnings 2009-12-13 20:49:47 +01:00
Aris Adamantiadis
c92f54102e Key exchange currently done asynchronously
Fixed an important bug in packet buffering (two packets received in the same recv would'nt be processed correctly)
2009-12-13 18:20:05 +01:00
Aris Adamantiadis
ad7e9d88fb packet SSH_KEXINIT received and parsed
Resolved some bugs in the callback mechanism as well
2009-12-12 00:23:53 +01:00
Aris Adamantiadis
3ace7817b4 Async connection + banner fetch is working 2009-12-11 23:26:25 +01:00
Aris Adamantiadis
80b6cf77b0 Added a global poll context 2009-12-11 21:11:23 +01:00
Andreas Schneider
79b4bf4ac2 Don't install crypto.h which is an internal header file. 2009-12-10 13:55:42 +01:00
Aris Adamantiadis
64b72f8d3a Fix some doxygen errors 2009-12-09 19:43:16 +01:00
Andreas Schneider
ffc9806e6d Remove socklen_t definition.
Tthe problem is that winsock2.h defines socklen_t as a typedef, not as a
define, so depending on the order of includes you can get errors in
ws2tcpip.h with msvc.
2009-12-09 13:02:48 +01:00
Aris Adamantiadis
a1e05c62ae struct socket -> struct ssh_socket_struct +typedef 2009-12-06 22:48:56 +01:00
Aris Adamantiadis
076e884873 More callback stuff in connection
I have coded it, not actually tested it :) It still needs
work to get past the banner exchange.
2009-12-05 15:05:02 +01:00
Aris Adamantiadis
2f6fbbd706 Trying to adapt client.c to use callbacks 2009-12-03 23:55:46 +01:00
Aris Adamantiadis
4924ac8099 Asynchronous sockets work !
Still need a bit of tuning but it's stable enough
for our current needs
2009-12-01 23:34:55 +01:00
Andreas Schneider
f83f837de7 Added gettimeofday for Windows.
Thanks to Patrick Spendrin.
2009-12-01 16:57:49 +01:00
Andreas Schneider
48b719cf68 Fixed uint* to work on Windows.
Thanks to Patrick Spendrin.
2009-12-01 16:15:54 +01:00
Aris Adamantiadis
92a50f731c Socket connect callback working...
Still need to make sure the connect syscall is correctly
called
2009-11-30 23:44:40 +01:00
Aris Adamantiadis
76d6838223 Some brain surgery to add event-based sockets
chapter 1- SSH Socket Connections.
I would like to be able to
-Have a ssh_poll_ctx object
-Add a ssh socket over it
-launch the socket connection (using socket functions)
-ssh_poll_ctx_dopoll()
-Wait for the timeout or have the "connected" callback called
2009-11-30 22:35:43 +01:00
Aris Adamantiadis
0bfb9d476c Standardize callbacks style and add documentation 2009-11-29 22:51:14 +01:00
Aris Adamantiadis
91bb1b2de6 Squashed commit of the following:
commit 43fad8dfd977637c31fade76ace2905f6528c3bc
Author: Aris Adamantiadis <aris@0xbadc0de.be>
Date:   Fri Nov 27 18:39:06 2009 +0100

    adaptation to the new ssh_poll_handle object name

commit 1e5e6ac4605adf10d437d04f0fd4b7e66024853c
Merge: 3fd92a0... 810adad...
Author: Aris Adamantiadis <aris@0xbadc0de.be>
Date:   Fri Nov 27 18:33:06 2009 +0100

    Merge branch 'master' into badcode/libssh_async

commit 3fd92a08eb74b1447a9ff4ca4e1d137475c62cc6
Author: Aris Adamantiadis <aris@0xbadc0de.be>
Date:   Mon Nov 2 14:25:46 2009 +0100

    Compiles again

commit 8910d7b9692418c9ccea0234f6d49674d238dc16
Merge: e83f1b5... cce34a6...
Author: Aris Adamantiadis <aris@0xbadc0de.be>
Date:   Mon Nov 2 12:47:34 2009 +0100

    Merge branch 'master' into libssh_async

    Very big merge !

    Conflicts:
    	include/libssh/callbacks.h
    	include/libssh/priv.h
    	libssh/channels.c
    	libssh/messages.c
    	libssh/packet.c
    	libssh/server.c
    	libssh/session.c
    	libssh/socket.c

commit e83f1b593219e183082b015315f09bfe95a29cfc
Author: Aris Adamantiadis <aris@0xbadc0de.be>
Date:   Mon Nov 2 12:07:01 2009 +0100

    rename callback.h

commit dffa7b730e8f39e2198de18ab69a8e57bef95e58
Merge: 5a8b748... de8808c...
Author: Aris Adamantiadis <aris@0xbadc0de.be>
Date:   Tue Sep 15 10:50:07 2009 +0200

    Merge branch 'master' of git://git.libssh.org/projects/libssh/libssh into libssh_async

commit 5a8b7484f36599d28f2c0c14a23b76bfc7257638
Author: Aris Adamantiadis <aris@0xbadc0de.be>
Date:   Sun Sep 13 12:55:18 2009 +0200

    More updates to callback system

commit 18620c20d5e4e62107093f7fd330e553493253fa
Author: Aris Adamantiadis <aris@0xbadc0de.be>
Date:   Sat Sep 12 22:26:52 2009 +0200

    Same thing with channel_rcv_data

commit fc4a56f6726e409a5866272923f1cbebfc821af3
Author: Aris Adamantiadis <aris@0xbadc0de.be>
Date:   Sat Sep 12 22:17:45 2009 +0200

    added a few packet handlers for channels

commit 4b6bb4fd00b10cf1321a764126f277ab204bffe3
Author: Aris Adamantiadis <aris@0xbadc0de.be>
Date:   Fri Sep 11 23:15:25 2009 +0300

    sample packet handlers + bugfixes

commit 2784d09d6dec0a8f868912d14f90d860233b3f82
Author: Aris Adamantiadis <aris@0xbadc0de.be>
Date:   Fri Sep 11 20:30:50 2009 +0300

    Packet callbacks nearly finished

    Need tests and implementation of some packet callbacks

commit cd3ea43f20c9ae2f54576ca98a0ea75c5d4299d3
Author: Aris Adamantiadis <aris@0xbadc0de.be>
Date:   Thu Sep 10 12:46:02 2009 +0300

    First step of async packet handling

    The socket to packet handler is nearly done (needs testing)
    I still need to define the interface for callbacks.

commit 487f4d2a900a5fe3b90ceda4460ab7d38d7ad722
Author: Aris Adamantiadis <aris@0xbadc0de.be>
Date:   Tue Sep 8 23:24:09 2009 +0300

    Almost complete socket callback system

    Finished the callback function so it bufferizes data when
    callee does not use it.
    Flushes the buffer automaticaly after a ssh_socket_nonblocking_flush

commit 23571f22fac9e40c855dfa99569bba181a39648b
Author: Aris Adamantiadis <aris@0xbadc0de.be>
Date:   Tue Sep 8 22:22:32 2009 +0300

    First draft of a callback system
2009-11-27 20:42:43 +01:00
Aris Adamantiadis
ae11589205 Pcap: more cleanup and minimalist API 2009-11-16 23:20:16 +01:00
Aris Adamantiadis
02aecc1278 Improved pcap dumping support 2009-11-16 22:36:31 +01:00
Andreas Schneider
12da24c056 Added an option to set log verbosity as string. 2009-11-10 09:12:07 +01:00
Aris Adamantiadis
10b625e180 First lines of experimental pcap output support
This will serve to debug packets right under wireshark !
2009-11-08 23:42:41 +01:00
Aris Adamantiadis
51f1918109 Update structures name to new convention
SSH_POLL* -> ssh_poll_handle,
SSH_POLL_CTX* -> ssh_poll_ctx
2009-11-06 18:52:49 +01:00
Andreas Schneider
fa27956daf Improve MSVC support. Better binary compatibility.
Patch by Patrick Spendrin from KDE.
2009-11-06 09:57:09 +01:00
Aris Adamantiadis
e71c28f6a0 Fix warnings on old gcc's
they don't like variable names having type names
2009-11-03 21:04:07 +01:00
Aris Adamantiadis
c0e091a52f Fix openssl header inclusion
caused cbc_encrypt to be redefined by an openssl
macro
2009-11-03 21:03:22 +01:00
Aris Adamantiadis
17f2645a32 Fix server kex again 2009-10-29 10:36:00 +01:00
Aris Adamantiadis
27d25752e9 Allow use of SSH_DIR/ when expanding key paths 2009-10-17 18:10:42 +02:00
Andreas Schneider
7b7280e728 Added option to set log_verbosity in the server. 2009-10-15 17:17:36 +02:00
Andreas Schneider
2523ed0779 Added an option to set the port as string. 2009-10-15 17:02:51 +02:00
Andreas Schneider
22e74e3bab Remove deprecated functions. 2009-10-13 22:14:23 +02:00
Aris Adamantiadis
e74305c5eb updated the sftp subsystem to follow the type conv 2009-10-10 20:55:17 +02:00
Aris Adamantiadis
499f9aa707 Add structure cleaning in comment 2009-10-10 20:07:52 +02:00
Andreas Schneider
4dee9a3e68 Document the function to set the callbacks and provide an example. 2009-10-10 19:59:14 +02:00
Aris Adamantiadis
399041180f resolve callback crash 2009-10-10 16:25:40 +02:00
Aris Adamantiadis
3f55fb5b22 fix typo in header inclusion 2009-10-10 12:04:35 +02:00
Andreas Schneider
b1bc283e9a Rename callback header file. 2009-10-10 10:52:04 +02:00
Andreas Schneider
be75fac7ff Add a function to set the callback structure to the session. 2009-10-10 10:51:56 +02:00
Aris Adamantiadis
6ec65c6f9d ssh_disconnect doesn't free the session anymore 2009-10-09 22:50:48 +02:00
Aris Adamantiadis
71ab0cf6cc No more SSH_BIND SSH_MESSAGE etc. 2009-10-09 22:37:23 +02:00
Aris Adamantiadis
4b65aea401 Last nail on SSH_OPTIONS, SSH_SESSION etc. 2009-10-09 22:26:08 +02:00
Aris Adamantiadis
98ff6fbbce get rid of the option structure 2009-10-09 22:24:23 +02:00
Aris Adamantiadis
58294442d3 Moved samples into examples directory 2009-10-09 21:44:05 +02:00
Aris Adamantiadis
2e9c13dad0 Modified server API 2009-10-09 21:26:15 +02:00
Bernhard R. Link
7c759b9615 add ssh_set_error_oom and ssh_set_error_invalid
Signed-off-by: Andreas Schneider <mail@cynapses.org>
2009-10-05 00:02:43 +02:00
Bernhard R. Link
d54e9550da proper prototype of ssh_session_new
Signed-off-by: Andreas Schneider <mail@cynapses.org>
2009-10-05 00:01:50 +02:00
Andreas Schneider
7a37f9faf7 Fixed ssh_options_copy(). 2009-10-04 10:10:19 +02:00
Andreas Schneider
ab5b4c7cfe Get rid of the options structure. 2009-10-02 20:26:14 +02:00
Andreas Schneider
42aacc7106 Remove unused option functions. 2009-10-02 10:18:27 +02:00
Aris Adamantiadis
f6f0988d10 Fix warnings on opensolaris 2009-09-29 17:57:37 +02:00
Aris Adamantiadis
f9d1542542 resolve warning on opensolaris 2009-09-29 11:46:06 +02:00
Aris Adamantiadis
cd7f6bea57 more priv.h splitting 2009-09-26 14:05:58 +02:00
Aris Adamantiadis
0f77578ee2 Fixed doxygen compilation warnings 2009-09-26 01:34:14 +02:00
Aris Adamantiadis
3e314e863c More include file splitting 2009-09-26 01:15:48 +02:00
Aris Adamantiadis
adbb087221 Removed obsolete options 2009-09-26 00:36:02 +02:00
Aris Adamantiadis
3a8d839e86 More include file movings 2009-09-26 00:29:53 +02:00
Aris Adamantiadis
358647f5d9 More comment 2009-09-25 23:56:28 +02:00
Aris Adamantiadis
5e76118512 fix ssh_callbacks_init() macro + documentation
ssh_callbacks_init should not zero' the struct because
it could be used on staticaly declared structures
2009-09-25 23:50:18 +02:00
Aris Adamantiadis
e3bdc393cb callback.h should use public headers 2009-09-25 23:42:29 +02:00
Andreas Schneider
79c475c917 Fixed including of config.h.
If there is some option to modify libc behaviour (like if there was some
off_t usage to be modified by some flag to make that 64 bit) that
needs to be done before the first libc header. one could still do -D
there, though (unless cmake wants to do something automatically and puts
that in config.h)
2009-09-25 10:01:56 +02:00
Andreas Schneider
3dd03fec21 Add missing extern C. 2009-09-25 09:59:25 +02:00
Andreas Schneider
e8e07f7376 Fix typo. 2009-09-25 09:37:56 +02:00
Andreas Schneider
1c5ae7dd97 Install callbacks header file. 2009-09-25 09:33:11 +02:00
Aris Adamantiadis
6b0a89a288 Get rid of CRYPTO 2009-09-23 23:55:07 +02:00
Aris Adamantiadis
f84ebc2e27 Moved lots of declaration out of priv.h 2009-09-23 23:51:04 +02:00
Aris Adamantiadis
b359229a2e Change #defines to enums when it makes sense 2009-09-23 22:42:29 +02:00
Aris Adamantiadis
496a8e12d9 Get rid of SSH_MESSAGE 2009-09-23 22:19:11 +02:00
Aris Adamantiadis
0e8e124d20 get rid of SSH_OPTIONS 2009-09-23 22:13:19 +02:00
Aris Adamantiadis
9a8d4cd0fd get rid of SSH_SESSION 2009-09-23 21:55:54 +02:00
Aris Adamantiadis
ffed8b03bb remove the broken setters for options,cb init macro 2009-09-23 21:40:58 +02:00
Aris Adamantiadis
5bd38a5f37 Changed the current callback sys to be scalable 2009-09-23 21:30:56 +02:00
Aris Adamantiadis
ab60d1d678 Ordered functions in libssh.h alphabeticaly 2009-09-23 20:42:59 +02:00
Aris Adamantiadis
95558d54b0 Fix typos in SSH_OPTIONS 2009-09-23 11:21:12 +02:00
Andreas Schneider
f6d2a66de2 Added a cleaned up interface for setting options. 2009-09-22 13:14:16 +02:00
Andreas Schneider
7de3122b42 Added a userdata generic pointer to the log callback function. 2009-09-22 12:28:07 +02:00
Andreas Schneider
4133f484ae Fixed building libssh with MSVC.
Thanks to Carlo Segato for the patch.
2009-09-21 12:23:47 +02:00
Aris Adamantiadis
7c7096d8f8 Limit the size of acceptable compressed packets 2009-09-16 22:29:22 +02:00
Andreas Schneider
4845642611 Added support for ~/.ssh/config. 2009-09-15 17:26:13 +02:00
Aris Adamantiadis
4b363928f6 SCP warning request 2009-09-13 14:03:35 +03:00
Aris Adamantiadis
929f5ca25b scp recursive mode 2009-09-13 14:03:34 +03:00
Aris Adamantiadis
7ff80a2666 Add better error detection + EOF request 2009-09-13 14:03:34 +03:00
Aris Adamantiadis
07a9e6b7c6 Change scp API to use integers for perms 2009-09-13 14:03:33 +03:00
Dmitry V. Krivenok
df4c62212c Support for sending signals (RFC 4254, section 6.9).
Added function
int channel_request_send_signal(ssh_channel channel, const char *signal);
which implements signals delivery (as described in RFC 4254).
Only SSH-v2 is currently supported.

Signed-off-by: Dmitry V. Krivenok <krivenok@orangesystem.ru>
Signed-off-by: Andreas Schneider <mail@cynapses.org>
2009-09-10 12:34:58 +02:00
Andreas Schneider
97b6036cbf Add a portable ssh_mkdir function for Windows. 2009-09-09 13:42:00 +02:00
Andreas Schneider
7c575a2418 Fix typedef collisons on Solaris. 2009-08-25 13:54:46 +02:00
Aris Adamantiadis
f3454d571e ssh_scp_request_get_{filename,permissions,size} 2009-08-23 23:40:30 +02:00
Aris Adamantiadis
1df1f86f7e added ssh_scp_read 2009-08-23 23:24:46 +02:00
Aris Adamantiadis
385b640d1d Implementation of ssh_scp_pull_request
Still needed: code in ssh_scp_init,
implementation of ssh_scp_read
ssh_scp_request_get_filename,
ssh_scp_request_get_size,
ssh_scp_request_get_mode,
ssh_scp_deny_request
ssh_scp_accept_request
!!
2009-08-23 22:04:51 +02:00
Aris Adamantiadis
d4bc6fa954 Merge branch 'master' of git://git.libssh.org/projects/libssh/libssh
Conflicts:
	include/libssh/priv.h
2009-08-23 16:41:29 +02:00
Aris Adamantiadis
8bae43876f experimental callback system 2009-08-23 16:33:59 +02:00
Aris Adamantiadis
fbfea94559 Pending work 2009-08-23 16:29:31 +02:00
Aris Adamantiadis
6a04b43a45 added ssh_scp_request_new,ssh_scp_request_struct 2009-08-23 15:23:48 +02:00
Aris Adamantiadis
049c62098c add ssh_scp_push_directory,ssh_scp_leave_directory
Not yet carefully tested
2009-08-23 14:57:03 +02:00
Andreas Schneider
330c2004a1 Make the functions public. 2009-08-21 10:17:58 +02:00
Andreas Schneider
0b10493e90 Added ssh_basename() and ssh_dirname(). 2009-08-21 10:16:36 +02:00
Andreas Schneider
461e46b814 Improve checks for Windows version and wspiapi.h. 2009-08-20 11:43:37 +02:00
Andreas Schneider
3eb21053d0 Add a portable define to print size_t. 2009-08-20 10:49:27 +02:00
Andreas Schneider
92db6f8c6d Remove DEBUG_CRYPTO variable.
You can enable it with cmake -DWITH_DEBUG_CRYPTO:BOOL=TRUE.
2009-08-20 10:44:31 +02:00
Vic Lee
db6aa88bc4 Add forward listening feature
Signed-off-by: Andreas Schneider <mail@cynapses.org>
2009-08-16 14:40:18 +02:00
Andreas Schneider
2dc3b5c675 Add sftp_extension_supported() function. 2009-08-12 17:13:42 +02:00
Andreas Schneider
e68c3b09a6 Add support for OpenSSH's statvfs and fstatvfs calls. 2009-08-12 17:13:42 +02:00
Andreas Schneider
0793bf5aa6 Set version number to 0.4.0. 2009-08-12 17:13:04 +02:00
Aris Adamantiadis
86418bfbbe Merge branch 'master' of git://git.libssh.org/projects/libssh/libssh 2009-08-12 00:04:30 +02:00
Aris Adamantiadis
8dae851836 Make the calltrace logging optional 2009-08-12 00:03:36 +02:00
Andreas Schneider
db284d60b9 Fix static build.
If you want to link against the static library you have to define
LIBSSH_STATIC and link against ssh_static.

gcc -static -DLIBSSH_STATIC -lssh_static foo.c -o foo
2009-08-11 18:16:43 +02:00
Andreas Schneider
9b13390ad0 Use gcc visibility attribute to get rid of the map file. 2009-08-11 17:10:00 +02:00
Andreas Schneider
5e4bc6ec79 Fix compilation with MSVC and use declspec to export functions.
Thanks to Patrick Spendrin <ps_ml@gmx.de> for all the MSVC fixes.
2009-08-11 15:38:49 +02:00
Aris Adamantiadis
7e9f0803c5 Latest scp code
The sample is now able to scp a file
2009-08-10 22:59:35 +02:00
Aris Adamantiadis
f92e12c7b0 ssh_scp_push_file and ssh_scp_write
still needs tests
2009-08-09 22:51:03 +02:00
Aris Adamantiadis
e4da8b99fe Initial scp implementation in source tree 2009-08-09 02:01:54 +02:00
Andreas Schneider
e9974c2053 Remove ssh_fd_poll which is gone. 2009-08-05 17:38:43 +02:00
Andreas Schneider
de532ee550 Move extension structure to the end. 2009-08-01 11:15:53 +02:00
Andreas Schneider
83f65031c0 Fixed libssh compilation without server support. 2009-07-31 12:31:46 +02:00
Vic Lee
63053541e6 Add x11 forwarding support for ssh client
Signed-off-by: Vic Lee <llyzs@163.com>
Signed-off-by: Andreas Schneider <mail@cynapses.org>
2009-07-31 11:17:51 +02:00
Andreas Schneider
766bae9d76 Fix build with MSVC. 2009-07-30 10:45:58 +02:00
Andreas Schneider
bccb9b16a5 Move channel_write_stderr to server.c. 2009-07-29 23:21:01 +02:00
Andreas Schneider
60837b1538 Add channel_write_stderr prototype to the right header file.
Signed-off-by: Andreas Schneider <mail@cynapses.org>
2009-07-29 18:42:10 +02:00
Preston A. Elder
4f70cc13e2 Fleshed out server interface
- Enables channel_request_open types of DIRECT_TCPIP, FORWARDED_TCPIP and X11 (ie. implemented the handling of those channel_request_open types).
- Adds functions to retrieve the extra information relating to channel_request_open messages and channel_request messages.
- Adds a channel_write_stderr method (obviously for writing to the STDERR channel from server side) - well, technically just converted the exiting channel_write to take an extra argument and created two wrapper functions.
- Actually does the invoking of message_handle() from channel_recv_request.
- Implemented the handling of the window-change and env channel_requests.
- Implemented a few functions in server.h that were declared but not defined (eg. ssh_message_channel_request_channel).

Signed-off-by: Preston A. Elder <prez@neuromancy.net>
Signed-off-by: Andreas Schneider <mail@cynapses.org>
2009-07-29 18:41:48 +02:00
Andreas Schneider
b4111c5c18 Add functions to get the extension count, name and data. 2009-07-28 14:13:22 +02:00
Andreas Schneider
b9b7174d85 Add support to read and store sftp extensions. 2009-07-28 13:25:35 +02:00
Andreas Schneider
69ceaae9a9 Check for OpenSSH and implement sftp_symlink correct.
When OpenSSH's sftp-server was implemented, the order of the arguments
to the SSH_FXP_SYMLINK method was inadvertently reversed. Unfortunately,
the reversal was not noticed until the server was widely deployed.
Since fixing this to follow the specification would cause
incompatibility, the current order was retained.
2009-07-28 13:25:26 +02:00
milo
1311d03415 Fix typo orignator_port -> originator_port 2009-07-27 20:52:36 +02:00
Andreas Schneider
9f14bbd6ad Remove double SSH2_MSG_USERAUTH_PK_OK. 2009-07-27 20:30:27 +02:00
milo
e8f7801540 Public key authentication server side 2009-07-27 20:27:07 +02:00
Andreas Schneider
28b5d0f875 Switch completly to stdint types. 2009-07-25 23:19:41 +02:00
Andreas Schneider
3b8c4dc750 Fix conflicting declarations of ssh_session and ssh_kbdint. 2009-07-25 20:26:56 +02:00
Andreas Schneider
5d1fa1be24 Fix return value of sftp_tell64(). 2009-07-25 19:52:07 +02:00
Andreas Schneider
104e6d39ab Add a sftp_tel64() function. 2009-07-25 17:55:58 +02:00
Andreas Schneider
3f778d9a31 Add ssh_clean_pubkey_hash() which is needed on Windows. 2009-07-25 17:52:00 +02:00
Andreas Schneider
8ce6bd3459 Add sftp_readlink function. 2009-07-25 11:55:42 +02:00
Andreas Schneider
5b8338d115 Add sftp_symlink function. 2009-07-25 11:55:33 +02:00
Aris Adamantiadis
69a01b3657 move all u32,u16,u8 and u64 declarations in priv.h
And fix all headers which need u32,u8,u64
2009-07-24 22:31:39 +02:00
Aris Adamantiadis
fdc2751952 Make the SSH_SAFE_NAMESPACE flag active 2009-07-24 22:20:41 +02:00
Aris Adamantiadis
fa11083fcb Change refs from AGENT * to ssh_agent
Fixes also a typo in ssh_agent declaration
2009-07-24 22:19:40 +02:00
Aris Adamantiadis
2bc8819e8f Changes all CHANNEL * to ssh_channel 2009-07-24 22:15:33 +02:00
Aris Adamantiadis
23b6c95e04 Change PRIVATE_KEY * to ssh_private_key 2009-07-24 22:08:04 +02:00
Aris Adamantiadis
fc5dd23afa Changed all PUBLIC_KEY * to ssh_public_key 2009-07-24 22:02:32 +02:00
Aris Adamantiadis
91d0660cc3 Changed all occurences of BUFFER * to ssh_buffer 2009-07-24 21:56:11 +02:00
Aris Adamantiadis
56ee212641 Change all occurences of STRING * to ssh_string 2009-07-24 21:45:41 +02:00
Aris Adamantiadis
8f3891e968 moved try_publickey_from_file in priv.h
Had nothing to do in libssh.h. 100% sure nobody
used it since one of the structure declaration
was not public.
2009-07-24 21:23:07 +02:00
Aris Adamantiadis
958a775afa replacing keys_struct with ssh_keys_struct 2009-07-24 21:18:15 +02:00
Aris Adamantiadis
e776dc16c9 Fixed namespace problem in public structures
changed
struct string_struct to ssh_string_struct
buffer_struct to ssh_buffer_struct
and so on.

Should not break apps using the caps version of these
2009-07-24 20:49:46 +02:00
Andreas Schneider
41a8fb5810 Make the ssh_userauth_kbdint functions to get the prompts const.
They shouldn't be modified or free'd by a user.
2009-07-21 10:34:21 +02:00
Andreas Schneider
8843d8b68d Fix sol8 + ss11 compile errors.
Thanks to tysonite@gmail.com.
2009-07-20 22:50:45 +02:00
Aris Adamantiadis
103292dd99 Fixed copyright notices 2009-07-13 00:23:42 +02:00
Aris Adamantiadis
d5b6f6cc37 Added return code SSH_SERVER_FILE_NOT_FOUND
This error is returned by ssh_is_server_known when known_hosts
file does not exist and gives more action to the developer.
2009-07-12 23:13:21 +02:00
Aris Adamantiadis
052073c36d Set correct hint when connecting to an IP address
libssh now uses a regular expression against destination
hostnames to match numerical IP addresses and set the
appropriate hint.

Patches also add init and finalize code to compile the regexp
2009-07-12 23:01:43 +02:00
Aris Adamantiadis
60c778ad7f fix int -> socket_t in SSH_POLL 2009-07-04 14:16:13 +02:00
Aris Adamantiadis
71100dadcd Temporary move of ssh_poll_* back to priv.h
We'll see later what needs to be put back in public
functions
2009-07-04 13:52:34 +02:00
Aris Adamantiadis
5ba33438f3 Move doxygen tags into C files 2009-07-04 13:47:57 +02:00
Aris Adamantiadis
708c0d32a2 Put back the poll declarations into priv.h
That are, poll constants.
2009-07-04 13:41:16 +02:00
Aleksandar Kanchev
3659e8c04a Add a generic way to handle sockets asynchronously.
It's based on poll objects, each of which store a socket, it's events and a callback,
which gets called whenever an event is set. The poll objects are attached to a poll
context, which should be allocated on per thread basis.

Polling the poll context will poll all the attached poll objects and call their
callbacks (handlers) if any of the socket events are set. This should be done within
the main loop of an application.

This is intended as a ground work for making libssh asynchronous.

Signed-off-by: Aleksandar Kanchev <aleksandar.kanchev@googlemail.com>
2009-07-03 21:53:53 +02:00
Aris Adamantiadis
8336c91e9c Verify memory return codes in ssh_list functions 2009-06-19 10:18:24 +02:00
Aris Adamantiadis
1bea53375b added ssh_message_callback support.
Not fully working yet. User can set his ssh_message_callback, and the function ssh_execute_message_callbacks will call them when appropriate. Messages are correctly stacked (in packet_parse) but no call to ssh_execute_callbacks exists yet.
2009-06-18 23:48:55 +02:00
Aris Adamantiadis
3af55a4f49 Created general singlelinked list implementation 2009-06-18 23:01:05 +02:00
Aris Adamantiadis
cf482ae3bf Begin of asynchronous SSH message parsing 2009-06-17 23:53:00 +02:00
Aris Adamantiadis
e2af94289f ssh_message_retrieve + memoryleak fixed in ssh_message_free
ssh_message_retrieve parses a specific SSH message and returns a pointer to it.
Hacked ssh_message_get to use it. This is the first step to have asynchronous ssh messages callbacks.
2009-06-17 23:28:05 +02:00
Aris Adamantiadis
7dbc66e4a3 ssh_init()
fixes in client.c and server.c for this


git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@778 7dcaeef0-15fb-0310-b436-a5af3365683c
2009-06-15 15:31:23 +00:00
Andreas Schneider
87995db8fe Make use of poll() and add a poll-emulation for win32.
git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@772 7dcaeef0-15fb-0310-b436-a5af3365683c
2009-06-04 07:23:55 +00:00
Andreas Schneider
2e0b2e2e91 Fix the vim modeline and place it at the end of the file.
git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@763 7dcaeef0-15fb-0310-b436-a5af3365683c
2009-05-12 17:49:23 +00:00
Andreas Schneider
1657d0932f Document the ssh server bind functions.
git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@756 7dcaeef0-15fb-0310-b436-a5af3365683c
2009-05-11 10:24:37 +00:00
Andreas Schneider
d008e5aeb8 Added a ssh_bind_set_fd() function.
git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@754 7dcaeef0-15fb-0310-b436-a5af3365683c
2009-05-11 10:05:47 +00:00
Andreas Schneider
2934765c76 Change variable names of the keys_struct to avoid conflicts.
git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@753 7dcaeef0-15fb-0310-b436-a5af3365683c
2009-05-11 09:24:39 +00:00
Andreas Schneider
c7806a6a16 Improve bin_to_base64() and use const for source.
git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@743 7dcaeef0-15fb-0310-b436-a5af3365683c
2009-05-05 09:16:08 +00:00
Andreas Schneider
fc50facaa3 Improve base64_to_bin().
git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@735 7dcaeef0-15fb-0310-b436-a5af3365683c
2009-05-05 08:57:16 +00:00
Andreas Schneider
f9baa6552c Format ssh_select().
git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@729 7dcaeef0-15fb-0310-b436-a5af3365683c
2009-05-05 08:22:06 +00:00
Andreas Schneider
33a640e348 Use const char * and an unsigned int in ssh_crc32().
git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@723 7dcaeef0-15fb-0310-b436-a5af3365683c
2009-05-05 07:34:16 +00:00
Andreas Schneider
43d881ba28 Improve channel_poll() and add a SSH_EOF return value.
git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@702 7dcaeef0-15fb-0310-b436-a5af3365683c
2009-05-04 10:17:10 +00:00
Andreas Schneider
152da07023 Implement channel_read() as a POSIX like function.
Create channel_read_buffer() to have the old version still available.


git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@700 7dcaeef0-15fb-0310-b436-a5af3365683c
2009-05-04 10:06:49 +00:00
Andreas Schneider
0534fee674 Improve ssh_channel_from_local().
git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@674 7dcaeef0-15fb-0310-b436-a5af3365683c
2009-05-02 20:46:10 +00:00
Andreas Schneider
d680160500 Add a BURN_STRING macro and use it in auth.c.
git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@660 7dcaeef0-15fb-0310-b436-a5af3365683c
2009-04-30 14:07:33 +00:00
Andreas Schneider
567cc5984a Improve the autopubkey authentication.
git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@658 7dcaeef0-15fb-0310-b436-a5af3365683c
2009-04-30 13:58:20 +00:00
Andreas Schneider
2c75ad7e19 Improve auto public key authentication.
git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@636 7dcaeef0-15fb-0310-b436-a5af3365683c
2009-04-28 19:33:28 +00:00
Andreas Schneider
bf312c50a9 Improve sftp_reply_data and fix sftp_reply_status.
git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@627 7dcaeef0-15fb-0310-b436-a5af3365683c
2009-04-27 11:54:47 +00:00
Andreas Schneider
f11630ab68 Improve sftp_reply_names_add.
git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@625 7dcaeef0-15fb-0310-b436-a5af3365683c
2009-04-27 11:46:41 +00:00
Andreas Schneider
db79fff00d Improve sftp_reply_name.
git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@622 7dcaeef0-15fb-0310-b436-a5af3365683c
2009-04-27 11:39:25 +00:00
Andreas Schneider
c1c4f299ff Add option to build with or without sftp support.
git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@618 7dcaeef0-15fb-0310-b436-a5af3365683c
2009-04-27 10:58:29 +00:00
Andreas Schneider
cefe239958 Improve the sftp seek functions.
git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@605 7dcaeef0-15fb-0310-b436-a5af3365683c
2009-04-24 10:16:16 +00:00
Andreas Schneider
b0778ca169 Use a negative value for SSH_AGAIN.
This is needed for function which return the length read for example. If
we read only one byte then 1 would be returned and some function may
think that it has to read again.


git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@603 7dcaeef0-15fb-0310-b436-a5af3365683c
2009-04-24 09:52:06 +00:00
Andreas Schneider
ac724eb3fb Improve the sftp async read functions.
git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@602 7dcaeef0-15fb-0310-b436-a5af3365683c
2009-04-24 09:33:47 +00:00
Andreas Schneider
62ac83a8ea Improve buffer_add_attributes() and add a return value.
git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@593 7dcaeef0-15fb-0310-b436-a5af3365683c
2009-04-23 11:36:57 +00:00
Andreas Schneider
9766b2f8d2 Rename buffer_add_data_begin() to buffer_prepend_data().
git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@571 7dcaeef0-15fb-0310-b436-a5af3365683c
2009-04-22 14:31:43 +00:00
Andreas Schneider
e067061263 Improve publickey_from_file().
git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@567 7dcaeef0-15fb-0310-b436-a5af3365683c
2009-04-20 09:14:35 +00:00
Andreas Schneider
9704df65e3 Rename privatekey_free() to be consistent with publickey_free().
git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@563 7dcaeef0-15fb-0310-b436-a5af3365683c
2009-04-20 07:26:50 +00:00
Andreas Schneider
ff73826b45 Replace some strcmp with switch to make it a bit faster.
git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@545 7dcaeef0-15fb-0310-b436-a5af3365683c
2009-04-18 11:18:35 +00:00
Andreas Schneider
cf8e444764 Fix build with openssl.
git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@523 7dcaeef0-15fb-0310-b436-a5af3365683c
2009-04-17 14:13:38 +00:00
Andreas Schneider
845615cdd8 Add return values to set_encrypt_key and set_decrypt_key.
git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@519 7dcaeef0-15fb-0310-b436-a5af3365683c
2009-04-17 12:52:27 +00:00
Andreas Schneider
5b2586312a Add return values to generate_session_keys() and generate_one_key().
git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@508 7dcaeef0-15fb-0310-b436-a5af3365683c
2009-04-16 15:14:15 +00:00
Andreas Schneider
a092a84139 Add return value to dh_build_k().
git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@506 7dcaeef0-15fb-0310-b436-a5af3365683c
2009-04-16 14:55:38 +00:00
Andreas Schneider
c6eb54c39e Improve dh_import() functions.
git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@505 7dcaeef0-15fb-0310-b436-a5af3365683c
2009-04-16 14:50:53 +00:00
Andreas Schneider
1a22d18afa Add return value to dh_generate_f().
git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@501 7dcaeef0-15fb-0310-b436-a5af3365683c
2009-04-16 14:34:28 +00:00
Andreas Schneider
baf2eaf165 Add return value to dh_generate_e().
git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@500 7dcaeef0-15fb-0310-b436-a5af3365683c
2009-04-16 14:31:06 +00:00
Andreas Schneider
ece047171a Add return value to dh_generate_y().
git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@499 7dcaeef0-15fb-0310-b436-a5af3365683c
2009-04-16 14:27:50 +00:00
Andreas Schneider
5dc03728ed Add return value to dh_generate_x().
git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@498 7dcaeef0-15fb-0310-b436-a5af3365683c
2009-04-16 14:24:13 +00:00
Andreas Schneider
74a06555f6 Add a return value to ssh_socket_init().
git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@494 7dcaeef0-15fb-0310-b436-a5af3365683c
2009-04-16 14:15:41 +00:00
Andreas Schneider
94021dcdb5 Add error checks to ssh_crypto_init().
git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@493 7dcaeef0-15fb-0310-b436-a5af3365683c
2009-04-16 14:10:41 +00:00
Andreas Schneider
1ed7c90890 Revert commit 491.
git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@492 7dcaeef0-15fb-0310-b436-a5af3365683c
2009-04-16 14:04:19 +00:00
Andreas Schneider
24fc1b2028 Make dh crypto functions thread safe.
git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@491 7dcaeef0-15fb-0310-b436-a5af3365683c
2009-04-16 12:08:11 +00:00
Andreas Schneider
f2788c9866 Reformat ssh_socket_completewrite() and use const for buffer.
git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@465 7dcaeef0-15fb-0310-b436-a5af3365683c
2009-04-14 14:02:37 +00:00
Andreas Schneider
3fab89b22f Improve ssh_message_auth* functions.
git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@442 7dcaeef0-15fb-0310-b436-a5af3365683c
2009-04-09 11:07:31 +00:00
Andreas Schneider
abf9ccdc5c Fix build error in SSHv1 channel code.
Thanks to Norbert Kiesel <nkiesel@tbdnetworks.com> for the patch.


git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@435 7dcaeef0-15fb-0310-b436-a5af3365683c
2009-04-08 20:28:59 +00:00
Andreas Schneider
da1eee8c89 Fix header functions and add return value checks.
git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@430 7dcaeef0-15fb-0310-b436-a5af3365683c
2009-04-08 12:56:12 +00:00
Andreas Schneider
586ed9103f Add return value and error checks to ssh_send_kex().
git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@422 7dcaeef0-15fb-0310-b436-a5af3365683c
2009-04-07 19:37:45 +00:00
Andreas Schneider
8c05aab03d Add return value and error checking for hash buffer cookie functions.
git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@419 7dcaeef0-15fb-0310-b436-a5af3365683c
2009-04-07 18:46:29 +00:00
Andreas Schneider
323ee63a1d Add return value and error checks to make_sessionid().
git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@418 7dcaeef0-15fb-0310-b436-a5af3365683c
2009-04-07 18:38:09 +00:00
Andreas Schneider
aea8587586 Add return values and error checking to channel_default_bufferize().
git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@414 7dcaeef0-15fb-0310-b436-a5af3365683c
2009-04-07 14:10:45 +00:00
Andreas Schneider
6c6094538f Use const where it should be used.
git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@407 7dcaeef0-15fb-0310-b436-a5af3365683c
2009-04-05 11:26:34 +00:00
Andreas Schneider
db4ff30f38 Make use of const.
git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@406 7dcaeef0-15fb-0310-b436-a5af3365683c
2009-04-05 10:59:16 +00:00
Andreas Schneider
2aeeb5a518 Add printf checking for ssh_set_error().
git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@404 7dcaeef0-15fb-0310-b436-a5af3365683c
2009-04-05 10:39:08 +00:00
Andreas Schneider
c8265940ea Make return of ssh_get_error() const.
git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@403 7dcaeef0-15fb-0310-b436-a5af3365683c
2009-04-05 10:38:30 +00:00