1
0
mirror of https://github.com/tmate-io/tmate-ssh-server.git synced 2020-11-18 19:53:51 -08:00

read the pubkey man page

This commit is contained in:
Nicolas Viennot 2014-12-12 12:29:06 -05:00
parent baafe40cbb
commit 34e8b04695

View File

@ -102,14 +102,18 @@ static int auth_pubkey_cb(ssh_session session, const char *user,
{
struct tmate_ssh_client *client = userdata;
if (signature_state == SSH_PUBLICKEY_STATE_VALID) {
switch (signature_state) {
case SSH_PUBLICKEY_STATE_VALID:
client->username = xstrdup(user);
if (ssh_pki_export_pubkey_base64(pubkey, &client->pubkey) != SSH_OK)
tmate_fatal("error getting public key");
return SSH_AUTH_SUCCESS;
case SSH_PUBLICKEY_STATE_NONE:
return SSH_AUTH_SUCCESS;
default:
return SSH_AUTH_DENIED;
}
return SSH_AUTH_SUCCESS;
}
static struct ssh_server_callbacks_struct ssh_server_cb = {