diff options
author | Matt Johnston <matt@ucc.asn.au> | 2005-07-08 13:28:03 +0000 |
---|---|---|
committer | Matt Johnston <matt@ucc.asn.au> | 2005-07-08 13:28:03 +0000 |
commit | aaa0b1ec3c8e0fe9d827565f17a06e87abe8bfa3 (patch) | |
tree | 4e71aec4c8f68f799c9dbdf1107923af9efc7a94 /cli-authpubkey.c | |
parent | 03731c723bda295a6f6ee8346d622ea45d796563 (diff) | |
parent | 215a369c2b0e49107f3a7e9d55175bd590145836 (diff) |
merge of 9522146cb07d4576f161fc4567c2c2fbd6f61fbb
and b11630c15bc4d0649dba51c3572cac6f44e0ab0e
--HG--
extra : convert_revision : e0686662cdbee8c0b06e72e6105a390ea4f4c007
Diffstat (limited to 'cli-authpubkey.c')
-rw-r--r-- | cli-authpubkey.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/cli-authpubkey.c b/cli-authpubkey.c index 61b17d9..9d36bc3 100644 --- a/cli-authpubkey.c +++ b/cli-authpubkey.c @@ -38,29 +38,29 @@ static void send_msg_userauth_pubkey(sign_key *key, int type, int realsign); * We use it to remove the key we tried from the list */ void cli_pubkeyfail() { - struct PubkeyList *keyitem; - struct PubkeyList **previtem; + struct SignKeyList *keyitem; + struct SignKeyList **previtem; TRACE(("enter cli_pubkeyfail")) - previtem = &cli_opts.pubkeys; + previtem = &cli_opts.privkeys; /* Find the key we failed with, and remove it */ - for (keyitem = cli_opts.pubkeys; keyitem != NULL; keyitem = keyitem->next) { - if (keyitem == cli_ses.lastpubkey) { + for (keyitem = cli_opts.privkeys; keyitem != NULL; keyitem = keyitem->next) { + if (keyitem == cli_ses.lastprivkey) { *previtem = keyitem->next; } previtem = &keyitem; } - sign_key_free(cli_ses.lastpubkey->key); /* It won't be used again */ - m_free(cli_ses.lastpubkey); + sign_key_free(cli_ses.lastprivkey->key); /* It won't be used again */ + m_free(cli_ses.lastprivkey); TRACE(("leave cli_pubkeyfail")) } void recv_msg_userauth_pk_ok() { - struct PubkeyList *keyitem; + struct SignKeyList *keyitem; buffer* keybuf; char* algotype = NULL; unsigned int algolen; @@ -80,7 +80,7 @@ void recv_msg_userauth_pk_ok() { /* Iterate through our keys, find which one it was that matched, and * send a real request with that key */ - for (keyitem = cli_opts.pubkeys; keyitem != NULL; keyitem = keyitem->next) { + for (keyitem = cli_opts.privkeys; keyitem != NULL; keyitem = keyitem->next) { if (keyitem->type != keytype) { /* Types differed */ @@ -172,11 +172,11 @@ int cli_auth_pubkey() { TRACE(("enter cli_auth_pubkey")) - if (cli_opts.pubkeys != NULL) { + if (cli_opts.privkeys != NULL) { /* Send a trial request */ - send_msg_userauth_pubkey(cli_opts.pubkeys->key, - cli_opts.pubkeys->type, 0); - cli_ses.lastpubkey = cli_opts.pubkeys; + send_msg_userauth_pubkey(cli_opts.privkeys->key, + cli_opts.privkeys->type, 0); + cli_ses.lastprivkey = cli_opts.privkeys; TRACE(("leave cli_auth_pubkey-success")) return 1; } else { |