Home
last modified time | relevance | path

Searched refs:nkeys (Results 1 – 25 of 40) sorted by relevance

12

/freebsd/crypto/heimdal/lib/kadm5/
H A Ddefault_keys.c40 print_keys(krb5_context context, Key *keys, size_t nkeys) in print_keys() argument
48 for (i = 0; i < nkeys; i++) { in print_keys()
85 size_t nkeys; in parse_file() local
88 ret = hdb_generate_key_set(context, principal, &keys, &nkeys, no_salt); in parse_file()
92 print_keys(context, keys, nkeys); in parse_file()
94 hdb_free_keys(context, nkeys, keys); in parse_file()
/freebsd/crypto/openssh/regress/
H A Dhostkey-rotate.sh40 nkeys=0
45 nkeys=`expr $nkeys + 1`
93 expect_nkeys $nkeys "learn hostkeys"
106 expect_nkeys $nkeys "learn hostkeys $k"
119 expect_nkeys $nkeys "learn hostkeys"
132 expect_nkeys `expr $nkeys + 1` "learn hostkeys"
144 expect_nkeys $nkeys "learn hostkeys"
/freebsd/crypto/krb5/src/kadmin/cli/
H A Dkeytab.c256 int i, nkeys = 0; in fetch_new_keys() local
264 &keys, &nkeys); in fetch_new_keys()
275 key_data = k5calloc(nkeys, sizeof(*key_data), &code); in fetch_new_keys()
280 for (i = 0; i < nkeys; i++) { in fetch_new_keys()
285 *nkeys_out = nkeys; in fetch_new_keys()
288 nkeys = 0; in fetch_new_keys()
291 for (i = 0; i < nkeys; i++) in fetch_new_keys()
306 int code, nkeys, i; in add_principal() local
310 nkeys = 0; in add_principal()
320 code = kadm5_get_principal_keys(handle, princ, 0, &key_data, &nkeys); in add_principal()
[all …]
/freebsd/crypto/heimdal/lib/hx509/
H A Dcollector.c290 size_t i, nkeys; in _hx509_collector_collect_private_keys() local
294 for (i = 0, nkeys = 0; i < c->val.len; i++) in _hx509_collector_collect_private_keys()
296 nkeys++; in _hx509_collector_collect_private_keys()
298 *keys = calloc(nkeys + 1, sizeof(**keys)); in _hx509_collector_collect_private_keys()
304 for (i = 0, nkeys = 0; i < c->val.len; i++) { in _hx509_collector_collect_private_keys()
306 (*keys)[nkeys++] = c->val.data[i]->private_key; in _hx509_collector_collect_private_keys()
310 (*keys)[nkeys] = NULL; in _hx509_collector_collect_private_keys()
/freebsd/crypto/openssh/
H A Dssh-pkcs11.c841 pkcs11_key_included(struct sshkey ***keysp, int *nkeys, struct sshkey *key) in pkcs11_key_included() argument
845 for (i = 0; i < *nkeys; i++) in pkcs11_key_included()
1427 struct sshkey ***keysp, char ***labelsp, int *nkeys) in pkcs11_fetch_certs() argument
1496 if (pkcs11_key_included(keysp, nkeys, key)) { in pkcs11_fetch_certs()
1501 *keysp = xrecallocarray(*keysp, *nkeys, in pkcs11_fetch_certs()
1502 *nkeys + 1, sizeof(struct sshkey *)); in pkcs11_fetch_certs()
1503 (*keysp)[*nkeys] = key; in pkcs11_fetch_certs()
1505 *labelsp = xrecallocarray(*labelsp, *nkeys, in pkcs11_fetch_certs()
1506 *nkeys + 1, sizeof(char *)); in pkcs11_fetch_certs()
1507 (*labelsp)[*nkeys] = xstrdup((char *)label); in pkcs11_fetch_certs()
[all …]
H A Dssh-pkcs11-client.c389 u_int ret = -1, nkeys, i; in pkcs11_add_provider() local
411 if ((r = sshbuf_get_u32(msg, &nkeys)) != 0) in pkcs11_add_provider()
413 debug3_f("helper return %u keys", nkeys); in pkcs11_add_provider()
414 *keysp = xcalloc(nkeys, sizeof(struct sshkey *)); in pkcs11_add_provider()
416 *labelsp = xcalloc(nkeys, sizeof(char *)); in pkcs11_add_provider()
417 for (i = 0; i < nkeys; i++) { in pkcs11_add_provider()
433 if ((r = sshbuf_get_u32(msg, &nkeys)) != 0) in pkcs11_add_provider()
441 return ret == 0 ? (int)nkeys : -1; in pkcs11_add_provider()
H A Dssh-add.c547 for (i = 0; i < idlist->nkeys; i++) { in list_identities()
676 for (i = 0; i < dch->nkeys; i++) in free_dest_constraint_hop()
746 hke->file, hke->line, dch->nkeys); in parse_dest_constraint_hop()
747 dch->keys = xrecallocarray(dch->keys, dch->nkeys, in parse_dest_constraint_hop()
748 dch->nkeys + 1, sizeof(*dch->keys)); in parse_dest_constraint_hop()
749 dch->key_is_ca = xrecallocarray(dch->key_is_ca, dch->nkeys, in parse_dest_constraint_hop()
750 dch->nkeys + 1, sizeof(*dch->key_is_ca)); in parse_dest_constraint_hop()
752 &(dch->keys[dch->nkeys]))) != 0) in parse_dest_constraint_hop()
754 dch->key_is_ca[dch->nkeys] = want_ca; in parse_dest_constraint_hop()
755 dch->nkeys++; in parse_dest_constraint_hop()
[all …]
H A Dssh-pkcs11-helper.c65 int r, i, nkeys; in process_add() local
77 if ((nkeys = pkcs11_add_provider(providername, pin, in process_add()
81 (r = sshbuf_put_u32(msg, nkeys)) != 0) in process_add()
83 for (i = 0; i < nkeys; i++) { in process_add()
92 (r = sshbuf_put_u32(msg, -nkeys)) != 0) in process_add()
H A Dssh-agent.c253 for (i = 0; i < dch->nkeys; i++) in free_dest_constraint_hop()
282 out->nkeys = dch->nkeys; in dup_dest_constraint_hop()
283 out->keys = out->nkeys == 0 ? NULL : in dup_dest_constraint_hop()
284 xcalloc(out->nkeys, sizeof(*out->keys)); in dup_dest_constraint_hop()
285 out->key_is_ca = out->nkeys == 0 ? NULL : in dup_dest_constraint_hop()
286 xcalloc(out->nkeys, sizeof(*out->key_is_ca)); in dup_dest_constraint_hop()
287 for (i = 0; i < dch->nkeys; i++) { in dup_dest_constraint_hop()
323 dch->is_ca, dch->nkeys); in dump_dest_constraint_hop()
324 for (i = 0; i < dch->nkeys; i++) { in dump_dest_constraint_hop()
330 debug_f("key %u/%u: %s%s%s key_is_ca %d", i, dch->nkeys, in dump_dest_constraint_hop()
[all …]
H A Dauthfd.h24 size_t nkeys; member
34 u_int nkeys; /* number of entries in *both* 'keys' and 'key_is_ca' */ member
H A Dclientloop.c2060 size_t nkeys, nnew, nincomplete; /* total, new keys, incomplete match */ member
2084 for (i = 0; i < ctx->nkeys; i++) in hostkeys_update_ctx_free()
2132 for (i = 0; i < ctx->nkeys; i++) { in hostkeys_find()
2181 for (i = 0; i < ctx->nkeys; i++) { in hostkeys_find()
2277 for (i = 0; i < ctx->nkeys; i++) { in update_known_hosts()
2353 i == 0 ? ctx->keys : NULL, i == 0 ? ctx->nkeys : 0, in update_known_hosts()
2393 for (ndone = i = 0; i < ctx->nkeys; i++) { in client_global_hostkeys_prove_confirm()
2518 for (i = 0; i < ctx->nkeys; i++) { in client_input_hostkeys()
2526 if ((tmp = recallocarray(ctx->keys, ctx->nkeys, ctx->nkeys + 1, in client_input_hostkeys()
2529 ctx->nkeys); in client_input_hostkeys()
[all …]
H A Dhostfile.c574 size_t nkeys; member
592 for (i = 0; i < ctx->nkeys; i++) { in host_delete()
624 struct sshkey **keys, size_t nkeys, int store_hash, int quiet, int hash_alg) in hostfile_replace_entries() argument
642 if ((ctx.match_keys = calloc(nkeys, sizeof(*ctx.match_keys))) == NULL) in hostfile_replace_entries()
645 ctx.nkeys = nkeys; in hostfile_replace_entries()
681 for (i = 0; i < nkeys; i++) { in hostfile_replace_entries()
H A Dsshd-session.c530 u_int i, nkeys; in notify_hostkeys() local
540 for (i = nkeys = 0; i < options.num_host_key_files; i++) { in notify_hostkeys()
549 if (nkeys == 0) { in notify_hostkeys()
565 nkeys++; in notify_hostkeys()
567 debug3_f("sent %u hostkeys", nkeys); in notify_hostkeys()
568 if (nkeys == 0) in notify_hostkeys()
/freebsd/crypto/openssh/regress/misc/fuzz-harness/
H A Dkex_fuzz.cc30 size_t nkeys; member
128 ((size_t)pubkey->type < st->nkeys && 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()
135 st->nkeys, privkey->type + 1, sizeof(*st->privkeys)); in store_key()
136 st->nkeys = privkey->type + 1; in store_key()
158 if (st == NULL || keytype < 0 || (size_t)keytype >= st->nkeys || in get_pubkey()
167 if (st == NULL || keytype < 0 || (size_t)keytype >= st->nkeys || in get_privkey()
/freebsd/crypto/krb5/src/lib/kadm5/srv/
H A Dsvr_principal.c1099 unsigned int i, knext, nkeys; in add_to_history() local
1116 nkeys = adb->old_key_len; in add_to_history()
1119 if (nkeys + 1 < nhist) { in add_to_history()
1122 malloc((nkeys + 1) * sizeof (osa_pw_hist_ent)); in add_to_history()
1126 (nkeys + 1) * sizeof (osa_pw_hist_ent)); in add_to_history()
1131 memset(&adb->old_keys[nkeys], 0, sizeof(osa_pw_hist_ent)); in add_to_history()
1132 nkeys = ++adb->old_key_len; in add_to_history()
1137 for (i = nkeys - 1; i > knext; i--) { in add_to_history()
1141 } else if (nkeys + 1 > nhist) { in add_to_history()
1168 j = (i + nkeys + knext - (nhist - 1)) % nkeys; in add_to_history()
[all …]
/freebsd/lib/libpam/modules/pam_ssh/
H A Dpam_ssh.c162 int nkeys, nullok, pam_err, pass; in pam_sm_authenticate() local
179 nkeys = 0; in pam_sm_authenticate()
199 ++nkeys; in pam_sm_authenticate()
211 if (nkeys == 0 && pass == 1 && in pam_sm_authenticate()
219 if (nkeys == 0) in pam_sm_authenticate()
/freebsd/lib/libc/db/btree/
H A Dbt_debug.c247 u_long ifree, lfree, nkeys; in __bt_stat() local
252 nkeys = ifree = lfree = 0; in __bt_stat()
265 nkeys += NEXTINDEX(h); in __bt_stat()
286 levels, levels == 1 ? "" : "s", nkeys); in __bt_stat()
/freebsd/crypto/krb5/src/plugins/kdb/db2/libdb2/btree/
H A Dbt_debug.c338 u_long ifree, lfree, nkeys; local
345 nkeys = ifree = lfree = 0;
358 nkeys += NEXTINDEX(h);
379 levels, levels == 1 ? "" : "s", nkeys);
/freebsd/crypto/krb5/src/lib/kadm5/
H A Dmisc_free.c60 int i, nkeys = (int) *n_key_data; in kadm5_free_key_data() local
67 for (i = 0; i < nkeys; i++) in kadm5_free_key_data()
/freebsd/sbin/gbde/
H A Dgbde.c
/freebsd/lib/libc/db/hash/
H A Dhash.h78 int32_t nkeys; /* Number of keys in hash table */ member
282 #define NKEYS hdr.nkeys
/freebsd/crypto/krb5/src/plugins/kdb/db2/libdb2/hash/
H A Dhash.c236 "NKEYS ", hashp->hdr.nkeys); in __kdb2_hash_open()
297 hashp->hdr.nkeys = 0; in init_hash()
470 "keys %ld maxp %d\n", hashp->hdr.nkeys, hashp->hdr.max_bucket); in hdestroy()
970 P_32_COPY(srcp->nkeys, destp->nkeys); in swap_header_copy()
998 M_32_SWAP(hdrp->nkeys); in swap_header()
/freebsd/crypto/krb5/src/plugins/kdb/test/
H A Dkdb_test.c233 int32_t *ks_list_sizes, nstrings, nkeys, i, j; in make_keys() local
245 nkeys = 0; in make_keys()
258 nkeys += ks_list_sizes[i]; in make_keys()
262 kd = key_data = ealloc(nkeys * sizeof(*kd)); in make_keys()
284 ent->n_key_data = nkeys; in make_keys()
/freebsd/contrib/unbound/dnscrypt/
H A Ddnscrypt.c986 int nkeys; in dnsc_apply_cfg() local
990 nkeys = dnsc_parse_keys(env, cfg); in dnsc_apply_cfg()
991 if(nkeys <= 0) { in dnsc_apply_cfg()
994 if((size_t)nkeys < env->signed_certs_count) { in dnsc_apply_cfg()
997 (unsigned)(env->signed_certs_count - (size_t)nkeys)); in dnsc_apply_cfg()
/freebsd/crypto/krb5/src/kadmin/server/
H A Dserver_stubs.c1111 krb5_keyblock **keys, int *nkeys) in chrand_check_lockdown() argument
1120 for (i = 0; i < *nkeys; i++) in chrand_check_lockdown()
1124 *nkeys = 0; in chrand_check_lockdown()
1136 int nkeys; in chrand_principal_2_svc() local
1157 &k, &nkeys); in chrand_principal_2_svc()
1162 ret->code = chrand_check_lockdown(handle, &rec, &k, &nkeys); in chrand_principal_2_svc()
1166 ret->n_keys = nkeys; in chrand_principal_2_svc()
1195 int nkeys; in chrand_principal3_2_svc() local
1219 arg->ks_tuple, &k, &nkeys); in chrand_principal3_2_svc()
1224 ret->code = chrand_check_lockdown(handle, &rec, &k, &nkeys); in chrand_principal3_2_svc()
[all …]

12