/Zephyr-latest/tests/net/lib/tls_credentials/src/ |
D | main.c | 66 char cred[64]; in test_credential_get() local 71 (void)memset(cred, 0, sizeof(cred)); in test_credential_get() 72 credlen = sizeof(cred); in test_credential_get() 74 cred, &credlen); in test_credential_get() 77 ret = strcmp(cred, test_server_key); in test_credential_get() 83 credlen = sizeof(cred); in test_credential_get() 85 cred, &credlen); in test_credential_get() 91 cred, &credlen); in test_credential_get() 152 char cred[64]; in test_credential_delete() local 153 size_t credlen = sizeof(cred); in test_credential_delete() [all …]
|
/Zephyr-latest/samples/net/cloud/aws_iot_mqtt/src/creds/ |
D | convert_keys.py | 35 for cred in creds: 36 if cred.endswith('-certificate.pem.crt'): 37 bin2array("public_cert", cred, os.path.join(creds_dir, "cert.c")) 39 elif cred.endswith('-private.pem.key'): 40 bin2array("private_key", cred, os.path.join(creds_dir, "key.c"))
|
/Zephyr-latest/subsys/net/lib/tls_credentials/ |
D | tls_credentials_shell.c | 97 static int find_ref_slot(const void *const cred) in find_ref_slot() argument 102 if (cred_refs[i] == cred) { in find_ref_slot() 539 struct tls_credential *cred = NULL; in tls_cred_cmd_del() local 556 cred = credential_get(sectag, type); in tls_cred_cmd_del() 557 if (!cred) { in tls_cred_cmd_del() 564 ref_slot = find_ref_slot(cred->buf); in tls_cred_cmd_del() 567 memset((void *)cred_buf, 0, cred->len); in tls_cred_cmd_del() 569 cred->buf = NULL; in tls_cred_cmd_del() 728 struct tls_credential *cred; in tls_cred_cmd_list() local 760 cred = NULL; in tls_cred_cmd_list() [all …]
|
D | tls_credentials.c | 125 const void *cred, size_t credlen) in tls_credential_add() argument 146 credential->buf = cred; in tls_credential_add() 156 void *cred, size_t *credlen) in tls_credential_get() argument 182 memcpy(cred, credential->buf, credential->len); in tls_credential_get()
|
D | tls_credentials_trusted.c | 327 const void *cred, size_t credlen) in tls_credential_add() argument 356 status = psa_ps_set(uid, credlen, cred, create_flags); in tls_credential_add() 371 void *cred, size_t *credlen) in tls_credential_get() argument 407 status = psa_ps_get(uid, 0, info.size, cred, credlen); in tls_credential_get()
|
/Zephyr-latest/include/zephyr/net/ |
D | tls_credentials.h | 93 const void *cred, size_t credlen); 113 void *cred, size_t *credlen);
|
/Zephyr-latest/subsys/bluetooth/mesh/ |
D | subnet.h | 173 int bt_mesh_friend_cred_create(struct bt_mesh_net_cred *cred, 182 void bt_mesh_friend_cred_destroy(struct bt_mesh_net_cred *cred); 200 const struct bt_mesh_net_cred *cred));
|
D | net.c | 439 return &bt_mesh.lpn.cred[SUBNET_KEY_TX_IDX(tx->sub)]; in net_tx_cred_get() 479 const struct bt_mesh_net_cred *cred, uint32_t iv_index, in net_encrypt() argument 484 err = bt_mesh_net_encrypt(&cred->enc, buf, iv_index, proxy); in net_encrypt() 489 return bt_mesh_net_obfuscate(buf->data, iv_index, &cred->privacy); in net_encrypt() 495 const struct bt_mesh_net_cred *cred; in bt_mesh_net_encode() local 498 cred = net_tx_cred_get(tx); in bt_mesh_net_encode() 499 err = net_header_encode(tx, cred->nid, buf); in bt_mesh_net_encode() 504 return net_encrypt(buf, cred, BT_MESH_NET_IVI_TX, type); in bt_mesh_net_encode() 534 const struct bt_mesh_net_cred *cred; in bt_mesh_net_send() local 542 cred = net_tx_cred_get(tx); in bt_mesh_net_send() [all …]
|
D | subnet.c | 301 static int msg_cred_create(struct bt_mesh_net_cred *cred, const uint8_t *p, in msg_cred_create() argument 304 return bt_mesh_k2(key, p, p_len, &cred->nid, &cred->enc, &cred->privacy); in msg_cred_create() 483 int bt_mesh_friend_cred_create(struct bt_mesh_net_cred *cred, uint16_t lpn_addr, in bt_mesh_friend_cred_create() argument 502 return msg_cred_create(cred, p, sizeof(p), raw_key); in bt_mesh_friend_cred_create() 505 void bt_mesh_friend_cred_destroy(struct bt_mesh_net_cred *cred) in bt_mesh_friend_cred_destroy() argument 507 bt_mesh_key_destroy(&cred->enc); in bt_mesh_friend_cred_destroy() 508 bt_mesh_key_destroy(&cred->privacy); in bt_mesh_friend_cred_destroy() 887 const struct bt_mesh_net_cred *cred)) in bt_mesh_net_cred_find() argument 897 for (j = 0; j < ARRAY_SIZE(bt_mesh.lpn.cred); j++) { in bt_mesh_net_cred_find() 902 if (cb(rx, in, out, &bt_mesh.lpn.cred[j])) { in bt_mesh_net_cred_find() [all …]
|
D | friend.c | 135 return bt_mesh_friend_cred_create(&frnd->cred[idx], frnd->lpn, in friend_cred_create() 173 for (i = 0; i < ARRAY_SIZE(frnd->cred); i++) { in friend_clear() 175 bt_mesh_friend_cred_destroy(&frnd->cred[i]); in friend_clear() 178 memset(frnd->cred, 0, sizeof(frnd->cred)); in friend_clear() 492 const struct bt_mesh_net_cred *cred; in encrypt_friend_pdu() local 498 cred = &frnd->subnet->keys[SUBNET_KEY_TX_IDX(frnd->subnet)] in encrypt_friend_pdu() 501 cred = &frnd->cred[SUBNET_KEY_TX_IDX(frnd->subnet)]; in encrypt_friend_pdu() 526 buf->data[0] = (cred->nid | (iv_index & 1) << 7); in encrypt_friend_pdu() 528 if (bt_mesh_net_encrypt(&cred->enc, &buf->b, iv_index, BT_MESH_NONCE_NETWORK)) { in encrypt_friend_pdu() 533 if (bt_mesh_net_obfuscate(buf->data, iv_index, &cred->privacy)) { in encrypt_friend_pdu() [all …]
|
D | lpn.c | 267 for (int i = 0; i < ARRAY_SIZE(lpn->cred); i++) { in clear_friendship() 269 bt_mesh_friend_cred_destroy(&lpn->cred[i]); in clear_friendship() 616 static int friend_cred_create(struct bt_mesh_net_cred *cred, const struct bt_mesh_key *key) in friend_cred_create() argument 620 return bt_mesh_friend_cred_create(cred, bt_mesh_primary_addr(), in friend_cred_create() 659 for (int i = 0; i < ARRAY_SIZE(lpn->cred); i++) { in bt_mesh_lpn_friend_offer() 664 err = friend_cred_create(&lpn->cred[i], &lpn->sub->keys[i].net); in bt_mesh_lpn_friend_offer() 679 for (int i = 0; i < ARRAY_SIZE(lpn->cred); i++) { in bt_mesh_lpn_friend_offer() 681 bt_mesh_friend_cred_destroy(&lpn->cred[i]); in bt_mesh_lpn_friend_offer() 1156 friend_cred_create(&bt_mesh.lpn.cred[1], &sub->keys[1].net); in subnet_evt()
|
D | net.h | 73 struct bt_mesh_net_cred cred[2]; member 173 struct bt_mesh_net_cred cred[2]; member
|
D | app_keys.c | 588 const struct bt_mesh_app_cred *cred; in bt_mesh_app_key_find() local 599 cred = &app->keys[1]; in bt_mesh_app_key_find() 601 cred = &app->keys[0]; in bt_mesh_app_key_find() 604 if (cred->id != aid) { in bt_mesh_app_key_find() 608 err = cb(rx, &cred->val, cb_data); in bt_mesh_app_key_find()
|
D | access.c | 50 cred:1; member 843 .friend_cred = pub->cred, in publish_transmit() 1964 mod->pub->cred = 0U; in mod_set_pub() 1991 mod->pub->cred = pub.base.cred; in mod_set_pub() 2228 pub.base.cred = mod->pub->cred; in store_pending_mod_pub()
|
D | cfg_srv.c | 138 model->pub->cred = 0U; in _mod_pub_set() 171 model->pub->cred = cred_flag; in _mod_pub_set() 673 idx_cred = mod->pub->key | (uint16_t)mod->pub->cred << 12; in send_mod_pub_status()
|
/Zephyr-latest/doc/connectivity/networking/api/ |
D | tls_credentials_shell.rst | 27 cred buf <DATA> 35 cred buf clear 53 Credential contents can be provided in-line with the call to ``cred add``, or will otherwise be sou… 62 cred add <SECTAG> <TYPE> <BACKEND> <FORMAT> 68 cred add <SECTAG> <TYPE> <BACKEND> <FORMAT> <DATA> 98 cred del <SECTAG> <TYPE> 124 cred get <SECTAG> <TYPE> <FORMAT> 151 cred list 157 cred list <SECTAG> 163 cred list any <TYPE> [all …]
|
/Zephyr-latest/subsys/net/lib/sockets/ |
D | sockets_tls.c | 1075 struct tls_credential *cred) in tls_set_credential() argument 1077 switch (cred->type) { in tls_set_credential() 1079 return tls_add_ca_certificate(tls, cred); in tls_set_credential() 1082 return tls_add_own_cert(tls, cred); in tls_set_credential() 1085 return tls_set_private_key(tls, cred); in tls_set_credential() 1091 credential_get(cred->tag, TLS_CREDENTIAL_PSK_ID); in tls_set_credential() 1096 return tls_set_psk(tls, cred, psk_id); in tls_set_credential() 1114 struct tls_credential *cred; in tls_mbedtls_set_credentials() local 1123 cred = NULL; in tls_mbedtls_set_credentials() 1126 while ((cred = credential_next_get(tag, cred)) != NULL) { in tls_mbedtls_set_credentials() [all …]
|
/Zephyr-latest/subsys/net/lib/lwm2m/ |
D | lwm2m_engine.c | 947 void *cred = NULL; in load_tls_type() local 951 ret = lwm2m_get_res_buf(&LWM2M_OBJ(0, client_ctx->sec_obj_inst, res_id), &cred, &max_len, in load_tls_type() 967 if (is_pem(cred, cred_len)) { in load_tls_type() 972 ((uint8_t *) cred)[cred_len] = 0; in load_tls_type() 976 ret = tls_credential_add(client_ctx->tls_tag, type, cred, cred_len); in load_tls_type()
|
/Zephyr-latest/subsys/net/lib/wifi_credentials/ |
D | wifi_credentials_shell.c | 333 SHELL_SUBCMD_ADD((wifi), cred, &sub_wifi_cred,
|
/Zephyr-latest/include/zephyr/bluetooth/mesh/ |
D | access.h | 715 cred:1, /**< Friendship Credentials Flag. */ member
|
/Zephyr-latest/tests/bsim/bluetooth/mesh/src/ |
D | test_friendship.c | 565 test_model->pub->cred = true; /* Use friend credentials */ in test_lpn_msg_mesh()
|