Home
last modified time | relevance | path

Searched refs:osc_pdu (Results 1 – 3 of 3) sorted by relevance

/third_party/libcoap/tests/
Dtest_oscore.c444 coap_pdu_t *osc_pdu = NULL; in t_oscore_c_4() local
466 osc_pdu = coap_oscore_new_pdu_encrypted(session, pdu, NULL, 0); in t_oscore_c_4()
467 FailIf_CU_ASSERT_PTR_NOT_NULL(osc_pdu); in t_oscore_c_4()
469 result = coap_pdu_encode_header(osc_pdu, session->proto); in t_oscore_c_4()
471 CU_ASSERT(osc_pdu->hdr_size + osc_pdu->used_size == in t_oscore_c_4()
473 result = memcmp(&osc_pdu->token[-osc_pdu->hdr_size], protected_coap_request, in t_oscore_c_4()
474 osc_pdu->hdr_size + osc_pdu->used_size); in t_oscore_c_4()
480 coap_delete_pdu(osc_pdu); in t_oscore_c_4()
511 coap_pdu_t *osc_pdu = NULL; in t_oscore_c_5() local
533 osc_pdu = coap_oscore_new_pdu_encrypted(session, pdu, NULL, 0); in t_oscore_c_5()
[all …]
/third_party/libcoap/src/
Dcoap_oscore.c277 coap_pdu_t *osc_pdu; in coap_oscore_new_pdu_encrypted() local
314 osc_pdu = coap_pdu_init(pdu->type == COAP_MESSAGE_NON && in coap_oscore_new_pdu_encrypted()
320 if (osc_pdu == NULL) in coap_oscore_new_pdu_encrypted()
501 coap_add_token(osc_pdu, pdu_token.length, pdu_token.s); in coap_oscore_new_pdu_encrypted()
515 if (!coap_insert_option(osc_pdu, in coap_oscore_new_pdu_encrypted()
523 if (!coap_insert_option(osc_pdu, in coap_oscore_new_pdu_encrypted()
535 osc_pdu->code = COAP_REQUEST_CODE_FETCH; in coap_oscore_new_pdu_encrypted()
540 osc_pdu->code = COAP_RESPONSE_CODE(205); in coap_oscore_new_pdu_encrypted()
604 if (!coap_insert_option(osc_pdu, in coap_oscore_new_pdu_encrypted()
611 if (!coap_add_data(osc_pdu, ciphertext_len, ciphertext_buffer)) in coap_oscore_new_pdu_encrypted()
[all …]
Dcoap_net.c1557 coap_pdu_t *osc_pdu = coap_oscore_new_pdu_encrypted(session, pdu, NULL, in coap_send_internal() local
1560 if (osc_pdu == NULL) { in coap_send_internal()
1564 bytes_written = coap_send_pdu(session, osc_pdu, NULL); in coap_send_internal()
1566 pdu = osc_pdu; in coap_send_internal()