Lines Matching full:slot
27 * of credentials, can be 0 if slot is free.
95 static int credentials_toc_update(unsigned int slot, psa_storage_uid_t uid) in credentials_toc_update() argument
99 if (slot >= CRED_MAX_SLOTS) { in credentials_toc_update()
103 credentials_toc[slot] = uid; in credentials_toc_update()
115 unsigned int slot; in tls_credential_toc_find_slot() local
117 for (slot = 0; slot < CRED_MAX_SLOTS; ++slot) { in tls_credential_toc_find_slot()
118 if (credentials_toc[slot] == uid) { in tls_credential_toc_find_slot()
119 return slot; in tls_credential_toc_find_slot()
131 unsigned int slot; in credentials_init() local
144 for (slot = 0; slot < CRED_MAX_SLOTS; ++slot) { in credentials_init()
145 if (credentials_toc[slot] == 0) { in credentials_init()
149 status = psa_ps_get_info(credentials_toc[slot], &info); in credentials_init()
151 LOG_WRN("Credential %d doesn't exist in storage", slot); in credentials_init()
152 credentials_toc[slot] = 0; in credentials_init()
236 unsigned int slot; in credential_next_get() local
239 slot = 0; in credential_next_get()
243 slot = tls_credential_toc_find_slot(uid); in credential_next_get()
244 if (slot == CRED_MAX_SLOTS) { in credential_next_get()
248 slot++; in credential_next_get()
251 for (; slot < CRED_MAX_SLOTS; slot++) { in credential_next_get()
252 uid = credentials_toc[slot]; in credential_next_get()
268 unsigned int slot; in credential_next_tag_get() local
274 for (slot = 0; slot < CRED_MAX_SLOTS; slot++) { in credential_next_tag_get()
275 uid = credentials_toc[slot]; in credential_next_tag_get()
332 unsigned int slot; in tls_credential_add() local
348 slot = tls_credential_toc_find_slot(0); in tls_credential_add()
349 if (slot == CRED_MAX_SLOTS) { in tls_credential_add()
362 ret = credentials_toc_update(slot, uid); in tls_credential_add()
376 unsigned int slot; in tls_credential_get() local
387 slot = tls_credential_toc_find_slot(uid); in tls_credential_get()
388 if (slot == CRED_MAX_SLOTS) { in tls_credential_get()
423 unsigned int slot; in tls_credential_delete() local
434 slot = tls_credential_toc_find_slot(uid); in tls_credential_delete()
435 if (slot == CRED_MAX_SLOTS) { in tls_credential_delete()
440 ret = credentials_toc_update(slot, 0); in tls_credential_delete()