Lines Matching refs:pubkey
123 store_key(struct shared_state *st, struct sshkey *pubkey, in store_key() argument
126 if (st == NULL || pubkey->type < 0 || pubkey->type > INT_MAX || in store_key()
127 privkey->type != pubkey->type || in store_key()
128 ((size_t)pubkey->type < st->nkeys && in store_key()
129 st->pubkeys[pubkey->type] != NULL)) in store_key()
131 if ((size_t)pubkey->type >= st->nkeys) { in store_key()
133 st->nkeys, pubkey->type + 1, sizeof(*st->pubkeys)); in store_key()
138 debug_f("store %s at %d", sshkey_ssh_name(pubkey), pubkey->type); in store_key()
139 st->pubkeys[pubkey->type] = pubkey; in store_key()
178 struct sshkey *privkey = NULL, *pubkey = NULL; in do_kex_with_key() local
193 pubkey = get_pubkey(st, keytype); in do_kex_with_key()
230 (r = ssh_add_hostkey(client, pubkey)) != 0) { in do_kex_with_key()
257 struct sshkey *privkey = NULL, *pubkey = NULL; in prepare_key() local
285 if ((pubkey = sshkey_new(KEY_UNSPEC)) == NULL) in prepare_key()
287 if ((r = sshkey_read(pubkey, &cp)) != 0) { in prepare_key()
293 store_key(st, pubkey, privkey); in prepare_key()
303 struct sshkey *privkey = NULL, *pubkey = NULL;
310 if ((r = sshkey_from_private(privkey, &pubkey)) != 0) {
314 store_key(st, pubkey, privkey);