diff options
author | Andreas Schneider <mail@cynapses.org> | 2010-02-28 22:51:21 +0100 |
---|---|---|
committer | Andreas Schneider <mail@cynapses.org> | 2010-03-04 20:41:17 +0100 |
commit | f34cd24f8073e87d09159b8a6c8e2fa48cd17227 (patch) | |
tree | 58215ba6907f70b7ed7155c643b423de608a0cfd /include | |
parent | 9cd5e97596aa10f349e960fb3ff5ca95634a1200 (diff) | |
download | libssh-f34cd24f8073e87d09159b8a6c8e2fa48cd17227.tar.gz libssh-f34cd24f8073e87d09159b8a6c8e2fa48cd17227.tar.xz libssh-f34cd24f8073e87d09159b8a6c8e2fa48cd17227.zip |
Fixed and added support for several identity files.
Diffstat (limited to 'include')
-rw-r--r-- | include/libssh/libssh.h | 5 | ||||
-rw-r--r-- | include/libssh/misc.h | 1 | ||||
-rw-r--r-- | include/libssh/session.h | 2 |
3 files changed, 7 insertions, 1 deletions
diff --git a/include/libssh/libssh.h b/include/libssh/libssh.h index 46b6eb8e..c9047a68 100644 --- a/include/libssh/libssh.h +++ b/include/libssh/libssh.h @@ -259,6 +259,7 @@ enum ssh_options_e { SSH_OPTIONS_USER, SSH_OPTIONS_SSH_DIR, SSH_OPTIONS_IDENTITY, + SSH_OPTIONS_ADD_IDENTITY, SSH_OPTIONS_KNOWNHOSTS, SSH_OPTIONS_TIMEOUT, SSH_OPTIONS_TIMEOUT_USEC, @@ -342,10 +343,14 @@ LIBSSH_API void privatekey_free(ssh_private_key prv); LIBSSH_API ssh_private_key privatekey_from_file(ssh_session session, const char *filename, int type, const char *passphrase); LIBSSH_API void publickey_free(ssh_public_key key); +LIBSSH_API int ssh_publickey_to_file(ssh_session session, const char *file, + ssh_string pubkey, int type); LIBSSH_API ssh_string publickey_from_file(ssh_session session, const char *filename, int *type); LIBSSH_API ssh_public_key publickey_from_privatekey(ssh_private_key prv); LIBSSH_API ssh_string publickey_to_string(ssh_public_key key); +LIBSSH_API int ssh_try_publickey_from_file(ssh_session session, const char *keyfile, + ssh_string *publickey, int *type); LIBSSH_API int ssh_auth_list(ssh_session session); LIBSSH_API char *ssh_basename (const char *path); diff --git a/include/libssh/misc.h b/include/libssh/misc.h index 647faedc..ddd72fe7 100644 --- a/include/libssh/misc.h +++ b/include/libssh/misc.h @@ -25,6 +25,7 @@ /* in misc.c */ /* gets the user home dir. */ char *ssh_get_user_home_dir(void); +char *ssh_get_local_username(ssh_session session); int ssh_file_readaccess_ok(const char *file); /* macro for byte ordering */ diff --git a/include/libssh/session.h b/include/libssh/session.h index 582049aa..56352c10 100644 --- a/include/libssh/session.h +++ b/include/libssh/session.h @@ -131,7 +131,7 @@ struct ssh_session_struct { char *host; char *bindaddr; /* TODO: check if needed */ char *xbanner; /* TODO: looks like it is not needed */ - char *identity; + struct ssh_list *identity; char *sshdir; char *knownhosts; char *wanted_methods[10]; |