diff options
author | Aris Adamantiadis <aris@0xbadc0de.be> | 2009-12-20 18:05:02 +0100 |
---|---|---|
committer | Aris Adamantiadis <aris@0xbadc0de.be> | 2009-12-20 18:05:02 +0100 |
commit | 2e22d6ef9931156d837f6747aa9e46943bc51edb (patch) | |
tree | db9269139bbaa5d736923e3a65801be5cdab4d01 /include | |
parent | 6509b6e7421f480e481d087d613f334779cfb38b (diff) | |
download | libssh-2e22d6ef9931156d837f6747aa9e46943bc51edb.tar.gz libssh-2e22d6ef9931156d837f6747aa9e46943bc51edb.tar.xz libssh-2e22d6ef9931156d837f6747aa9e46943bc51edb.zip |
Add key validation in server side authentication
Diffstat (limited to 'include')
-rw-r--r-- | include/libssh/libssh.h | 7 | ||||
-rw-r--r-- | include/libssh/server.h | 1 |
2 files changed, 8 insertions, 0 deletions
diff --git a/include/libssh/libssh.h b/include/libssh/libssh.h index 4ea7430b..114b9931 100644 --- a/include/libssh/libssh.h +++ b/include/libssh/libssh.h @@ -186,6 +186,13 @@ enum ssh_channel_requests_e { SSH_CHANNEL_REQUEST_WINDOW_CHANGE, }; +enum ssh_publickey_state_e { + SSH_PUBLICKEY_STATE_ERROR=-1, + SSH_PUBLICKEY_STATE_NONE=0, + SSH_PUBLICKEY_STATE_VALID=1, + SSH_PUBLICKEY_STATE_WRONG=2 +}; + /* status flags */ #define SSH_CLOSED 0x01 #define SSH_READ_PENDING 0x02 diff --git a/include/libssh/server.h b/include/libssh/server.h index 9bfade62..993a1402 100644 --- a/include/libssh/server.h +++ b/include/libssh/server.h @@ -148,6 +148,7 @@ LIBSSH_API int ssh_message_reply_default(ssh_message msg); LIBSSH_API char *ssh_message_auth_user(ssh_message msg); LIBSSH_API char *ssh_message_auth_password(ssh_message msg); LIBSSH_API ssh_public_key ssh_message_auth_publickey(ssh_message msg); +LIBSSH_API enum ssh_publickey_state_e ssh_message_auth_publickey_state(ssh_message msg); LIBSSH_API int ssh_message_auth_reply_success(ssh_message msg,int partial); LIBSSH_API int ssh_message_auth_reply_pk_ok(ssh_message msg, ssh_string algo, ssh_string pubkey); LIBSSH_API int ssh_message_auth_set_methods(ssh_message msg, int methods); |