summaryrefslogtreecommitdiff
Commit message (Expand)AuthorAgeFilesLines
* configure.ac, NEWS: Bump version to 0.3.1v0.3.1Artyom Poptsov2013-07-143-2/+20
* src/threads.{c,h}, src/Makefile.am: Fix several bugs.•••* src/threads.c, src/threads.h: Fix a bug with variable initialization: use constant value to initialize SSH threads state. * src/Makefile.am (libguile_ssh_la_SOURCES): Add missed files. (libguile_ssh_la_LDFLAGS): Add missed flags. Artyom Poptsov2013-07-144-12/+19
* src/channel-type.c (guile_ssh_make_channel): Cleanup the code.Artyom Poptsov2013-07-142-3/+2
* README, TODO: Update.•••* README: Add info about dependencies. * TODO: Update. Artyom Poptsov2013-07-143-8/+15
* Make the library thread-safe.•••* src/channel-main.c (init_channel): Initialize threads. * src/key-main.c (init_key): Likewise. * src/session-main.c (init_session): Likewise. * src/threads.c, src/threads.c: New files. Artyom Poptsov2013-07-147-1/+80
* src/channel*: Use a simpler method to GC'ing of SSH channels.•••The idea is that we don't have to free resources allocated by a channel during its GC'ing, because these resources will be freed anyway when the related SSH session is GC'ed. However, to be able to control allocating of resources more precisely, introduce new procedure ssh:free-channel! that can be used for freeing resources allocated by a channel. * src/channel-func.c (guile_ssh_channel_free): New procedure. (init_channel_func): Add ssh:free-channel! * src/channel-type.c (free_channel): Don't free channel resourses. (guile_ssh_make_channel): Remove extra code. * src/channel-type.h: Remove the extra field from channel_data. * src/channel.scm: Add ssh:free-channel! * src/session-type.c (free_session): Remove extra code. Artyom Poptsov2013-07-136-37/+27
* configure.ac, NEWS: Bump version to 0.3v0.3Artyom Poptsov2013-07-133-2/+49
* Implement equalp callbacks for smobs.•••* src/channel-type.c (equalp_channel): New procedure. (init_channel_type): Register the equalp callback. * src/key-type.c (equalp_key): New procedure. (init_key_type): Register the equalp callback. * src/session-type.c (equalp_session): New procedure. (init_session_type): Register the equalp callback. Artyom Poptsov2013-07-134-0/+55
* Improve way of working with smobs.•••* src/session-type.c (_scm_to_ssh_session): New procedure. (free_session): Use _scm_to_ssh_session. * src/session-type.h: (_scm_to_ssh_session): New procedure. * src/key-type.c (free_key_smob, guile_ssh_key_get_type): Use _scm_to_ssh_key to get smob data. (guile_ssh_is_public_key_p): Likewise. Use _public_key_p to check the key type. (guile_ssh_is_private_key_p): Use _scm_to_ssh_key. Use _private_key_p to check the key type. (_scm_to_ssh_key, _private_key_p, _public_key_p): New procedures. * src/key-type.h (_scm_to_ssh_key, _private_key_p, _public_key_p): New procedures. * src/channel-type.c (_scm_to_ssh_channel): New procedure. (guile_ssh_make_channel): Use _scm_to_ssh_session. * src/channel-type.h (_scm_to_ssh_channel): New procedure. * src/auth.c (guile_ssh_userauth_pubkey) (guile_ssh_userauth_password, guile_ssh_userauth_none) (guile_ssh_userauth_get_list): Use _scm_to_* to get smob data and predicates related so corresponding types to check their types. Clean up the code. * src/session-func.c (guile_ssh_blocking_flush) (guile_ssh_session_set, guile_ssh_connect, guile_ssh_disconnect) (guile_ssh_get_protocol_version, guile_ssh_get_error) (guile_ssh_authenticate_server, guile_ssh_get_public_key_hash) (guile_ssh_write_known_host, guile_ssh_is_connected_p): Use _scm_to_ssh_session. * src/key-func.c (guile_ssh_public_key_to_string) (guile_ssh_private_key_from_file) (guile_ssh_public_key_from_private_key) (guile_ssh_public_key_from_file): Use _scm_to_ssh_key to get smob data. Use _private_key_p and _public_key_p predicates to check smob type. * src/channel-func.c (guile_ssh_channel_open_session) (guile_ssh_channel_request_exec, guile_ssh_channel_request_env) (guile_ssh_channel_pool, guile_ssh_channel_read) (guile_ssh_channel_close, guile_ssh_channel_is_open_p) (guile_ssh_channel_is_eof_p): Use _scm_to_ssh_channel. Artyom Poptsov2013-07-1311-226/+176
* src/channel-func.c (guile_ssh_channel_close): Fix return value.•••* src/channel-func.c (guile_ssh_channel_close): Fix return value: return SCM_BOOL_T if channel is closed successfully, SCM_BOOL_F otherwise. Artyom Poptsov2013-07-132-1/+5
* Fix GC'ing of SSH objects.•••The program doesn't crashes anymore during GC'ing of channels and keys. * src/session-type.c (free_session): Mark all related channels as freed. (guile_ssh_make_session): Initialize the channels array. * src/key-type.c (mark_key_smob): Fix smob marking. * src/channel-type.c (free_channel): Check if the channel has been already freed along with the related SSH session. (guile_ssh_make_channel): Store the reference to the channel in the array of channels related to the SSH session. * src/channel-type.h: Add is_channel_alive field to channel_data. * TODO: Add to the repository. Artyom Poptsov2013-07-137-5/+78
* Improve working with public keys represented as a SSH string.•••* src/key-type.h: Improve storing of public keys represented as a SSH string -- store the key type along with the key itself. * src/key-func.c (guile_ssh_public_key_from_file): Likewise. (public_key_to_ssh_string): Update. * src/key-type.c (guile_ssh_key_get_type): New function. (scm_from_ssh_key_type): New static function. (free_key_smob): Update. (init_key_type): Define ssh:get-key-type. * src/key.scm: Export ssh:get-key-type. Artyom Poptsov2013-06-235-4/+92
* src/auth.c (guile_ssh_userauth_get_list): Fix a bug.•••* src/auth.c (guile_ssh_userauth_get_list): Fix a bug with wrong scm_append call during making the list. Artyom Poptsov2013-06-162-4/+8
* src/auth.{c,h,scm}: Implement ssh:userauth-get-list.•••Implement ssh:userauth-get-list that returns a list of available authentication methods for a given SSH session. * src/auth.c (guile_ssh_userauth_get_list): New function. (init_auth_func): Define ssh:userauth-get-list. * src/auth.h: Likewise. * src/auth.scm: Add ssh:userauth-get-list. Artyom Poptsov2013-06-164-1/+61
* src/key-func.c: Fix a comment.Artyom Poptsov2013-06-152-1/+4
* Improve working with public keys.•••Because some libssh functions working with public keys represented as a ssh_string instead of a ssh_public_key, we try to hide this peculiarity so all kinds of keys are look like a key_smob from the Scheme perspective. * src/key-type.h: Add ssh_public_key_str to key_data struct. * src/key-type.c (free_key_smob): Handle public keys that represented by a ssh_string. (guile_ssh_is_public_key_p): Likewise. * src/key-func.c (public_key_to_ssh_string): New function. (guile_ssh_public_key_to_string): Fix converting a public key. (guile_ssh_public_key_from_file): Make it work. * src/key-func.h: Add public_key_to_ssh_string. * src/Makefile.am: Add base64.c * src/base64.c, src/base64.h: New files. Artyom Poptsov2013-06-159-35/+260
* channel-func.c, auth.c: Fix compiler warnings.•••* src/channel-func.c: Include error.h (guile_ssh_channel_read): Initialize obtained_data with SCM_BOOL_F * src/auth.c: Include error.h (guile_ssh_userauth_pubkey): Initialize strings with null. Artyom Poptsov2013-06-083-3/+11
* session-func.c: Add default case for switches.•••* src/session-func.c (guile_ssh_connect) (guile_ssh_blocking_flush): Return 'error by default. Artyom Poptsov2013-06-082-6/+11
* src/session-func.c (set_uint32_opt): Fix a bug.•••* src/session-func.c (set_uint32_opt): Fix wrong variable assignment. Artyom Poptsov2013-06-082-1/+4
* src/Makefile.am (AM_LDFLAGS, AM_CFLAGS): Fix flags.•••* src/Makefile.am (AM_LDFLAGS): Fix flags. (AM_CFLAGS): Likewise. Add "-Wall" and "-g" flags. Artyom Poptsov2013-06-082-2/+5
* src/key-func.c: Fix SCM_ASSERT call.•••* src/key-func.c (guile_ssh_public_key_to_string): Fix SCM_ASSERT call. Artyom Poptsov2013-06-082-1/+6
* src/{channel,key}-func.c: Fix a bug.•••* src/channel-func.c (guile_ssh_channel_read): Fix call of undefined function. * src/key-func.c (guile_ssh_private_key_from_file): Likewise. Improve error handling. Artyom Poptsov2013-05-263-8/+11
* configure.ac, NEWS: Bump version to 0.2v0.2Artyom Poptsov2013-05-253-2/+14
* src/channel-func.c: Add checks for smob type.•••* src/channel-func.c (guile_ssh_channel_is_eof_p) (guile_ssh_channel_is_open_p, guile_ssh_channel_close) (guile_ssh_channel_read, guile_ssh_channel_pool) (guile_ssh_channel_request_env, guile_ssh_channel_request_exec) (guile_ssh_channel_open_session): Add check for smob type. Artyom Poptsov2013-05-252-32/+45
* src/auth.c: Fix comment.Artyom Poptsov2013-05-252-1/+2
* src/key-func.c: Add comments.Artyom Poptsov2013-05-252-0/+6
* src/*.h: Improve.•••* src/auth.h, src/channel-func.h, src/channel-type.h, src/error.h, src/key-func.h, src/key-type.h, src/session-func.h, src/session-type.h: Mark prototypes as external functions. Simplify SCM functions arg list. Artyom Poptsov2013-05-259-31/+40
* src/auth.c: Implement ssh:userauth-none!•••* src/auth.c (guile_ssh_userauth_none): New function. (ssh_auth_result_to_symbol): New static function. (guile_ssh_userauth_pubkey): Use ssh_auth_result_to_symbol to convert auth result to a Scheme symbol. (guile_ssh_userauth_password): Likewise. * src/auth.scm: Export ssh:userauth-none! Artyom Poptsov2013-05-243-42/+62
* src/session-func.c: Add comments.Artyom Poptsov2013-05-242-8/+33
* src/session-func.c (set_option): Implement missed options.•••* src/session-func.c (set_option): Implement missed options. (set_port_opt): New static function. Artyom Poptsov2013-05-242-20/+49
* src/session.scm: Export ssh:get-errorArtyom Poptsov2013-05-191-1/+2
* src/session-func.c (set_uint64_opt): Remove extra semicolon.Artyom Poptsov2013-05-191-1/+1
* .gitignore: Update.Artyom Poptsov2013-05-191-0/+2
* src/session-type.c: Fix error handling.•••* src/session-type.c (guile_ssh_make_session): Return SCM_BOOL_F on error. Artyom Poptsov2013-05-191-4/+1
* Clean up the code. Fix coding style.Artyom Poptsov2013-05-1920-132/+135
* src/auth.scm: Fix comments.Artyom Poptsov2013-05-191-2/+2
* Improve the library.•••Quite stable version, but some functions are not implemented yet. Artyom Poptsov2013-05-1933-511/+2208
* src/ssh-error.c: Include libguile.hArtyom Poptsov2013-05-122-0/+4
* Fix a few function and variable names.•••* src/session.c (guile_ssh_blocking_flush): Fix a misspelled function name: scm_blockign_flush -> ssh_blocking_flush * src/channel.c (guile_ssh_channel_poll): Fix a misspelled function name: scm_is_boolean -> scm_is_bool (guile_ssh_channel_read): Likewise. Fix variable names. Artyom Poptsov2013-05-123-8/+14
* COPYING, INSTALL, NEWS: Add to the repository.Artyom Poptsov2013-05-124-0/+677
* AUTHORS: Add to the repository.Artyom Poptsov2013-05-122-0/+11
* README: Add to the repository.Artyom Poptsov2013-05-122-0/+7
* src/Makefile.am: Include Scheme files in the distribution.Artyom Poptsov2013-05-122-0/+11
* Initial commit.Artyom Poptsov2013-05-1212-0/+836