comparison cli-authpubkey.c @ 511:582cb38e4eb5 insecure-nocrypto

propagate from branch 'au.asn.ucc.matt.dropbear' (head cdcc3c729e29544e8b98a408e2dc60e4483dfd2a) to branch 'au.asn.ucc.matt.dropbear.insecure-nocrypto' (head 0ca38a1cf349f7426ac9de34ebe4c3e3735effab)
author Matt Johnston <matt@ucc.asn.au>
date Thu, 06 Nov 2008 13:16:55 +0000
parents 7f010e3b1802
children c1e9c81d1d27 9e51707cd6f2
comparison
equal deleted inserted replaced
361:461c4b1fb35f 511:582cb38e4eb5
58 TRACE(("leave cli_pubkeyfail")) 58 TRACE(("leave cli_pubkeyfail"))
59 } 59 }
60 60
61 void recv_msg_userauth_pk_ok() { 61 void recv_msg_userauth_pk_ok() {
62 62
63 struct SignKeyList *keyitem; 63 struct SignKeyList *keyitem = NULL;
64 buffer* keybuf; 64 buffer* keybuf = NULL;
65 char* algotype = NULL; 65 char* algotype = NULL;
66 unsigned int algolen; 66 unsigned int algolen;
67 int keytype; 67 int keytype;
68 unsigned int remotelen; 68 unsigned int remotelen;
69 69
110 } 110 }
111 111
112 /* Success */ 112 /* Success */
113 break; 113 break;
114 } 114 }
115 buf_free(keybuf);
115 116
116 if (keyitem != NULL) { 117 if (keyitem != NULL) {
117 TRACE(("matching key")) 118 TRACE(("matching key"))
118 /* XXX TODO: if it's an encrypted key, here we ask for their 119 /* XXX TODO: if it's an encrypted key, here we ask for their
119 * password */ 120 * password */
120 send_msg_userauth_pubkey(keyitem->key, keytype, 1); 121 send_msg_userauth_pubkey(keyitem->key, keytype, 1);
121 } else { 122 } else {
122 TRACE(("That was whacky. We got told that a key was valid, but it didn't match our list. Sounds like dodgy code on Dropbear's part")) 123 TRACE(("That was whacky. We got told that a key was valid, but it didn't match our list. Sounds like dodgy code on Dropbear's part"))
123 } 124 }
124 125
125 TRACE(("leave recv_msg_userauth_pk_ok")) 126 TRACE(("leave recv_msg_userauth_pk_ok"))
126 } 127 }
127 128
128 /* TODO: make it take an agent reference to use as well */ 129 /* TODO: make it take an agent reference to use as well */
129 static void send_msg_userauth_pubkey(sign_key *key, int type, int realsign) { 130 static void send_msg_userauth_pubkey(sign_key *key, int type, int realsign) {