|
SDK สำหรับ TESAIoT Dev Kit
คู่มืออ้างอิง API และ Tutorial (ModusToolbox)
|
Functions | |
| int | publish_csr (uint8_t *csr, size_t csr_length, uint16_t target_oid, uint16_t trust_anchor_oid, uint32_t payload_version) |
| publish CSR ที่สร้างไว้เสร็จแล้วเพื่อให้แพลตฟอร์มเซ็นให้; เป็น weak — ให้ตรวจ NULL ก่อน และเป็นตัวตั้ง ingest ให้พร้อมรับ | |
| int | tesaiot_publish_protected_update (const char *target_oid, const char *trust_anchor_oid, uint32_t payload_version, bool with_csr) |
| ขอ Protected Update จากแพลตฟอร์ม (OID เป็น hex string); เป็น weak — ให้ตรวจ NULL ก่อน | |
2 ฟังก์ชัน: ตัว publish ที่ตั้งรอบการทำงานให้พร้อมรับ — เป็นตัวสร้าง correlation id (กฎ 3 ข้อที่ย้อนกลับมาในทุกหัวข้อ กฎข้อ 3) ทั้ง 2 ตัวถูกใช้แบบ weak (symbol 6 ตัวที่ถูกใช้แบบ weak — ข้อกำหนดการตรวจ NULL) ให้ตรวจ NULL ของพอยน์เตอร์ก่อน
| int publish_csr | ( | uint8_t * | csr, |
| size_t | csr_length, | ||
| uint16_t | target_oid, | ||
| uint16_t | trust_anchor_oid, | ||
| uint32_t | payload_version ) |
publish CSR ที่สร้างไว้เสร็จแล้วเพื่อให้แพลตฟอร์มเซ็นให้; เป็น weak — ให้ตรวจ NULL ก่อน และเป็นตัวตั้ง ingest ให้พร้อมรับ
Publish a CSR the caller has already built, for the platform to sign. target_oid is the slot the resulting certificate belongs in and trust_anchor_oid the anchor that will authorise writing it.
| int tesaiot_publish_protected_update | ( | const char * | target_oid, |
| const char * | trust_anchor_oid, | ||
| uint32_t | payload_version, | ||
| bool | with_csr ) |
ขอ Protected Update จากแพลตฟอร์ม (OID เป็น hex string); เป็น weak — ให้ตรวจ NULL ก่อน
Ask the platform for a Protected Update of target_oid, optionally enrolling a fresh key with a CSR in the same exchange. The OIDs are hex strings, e.g. "E0E1".