mirror of
https://github.com/obgm/libcoap.git
synced 2026-11-04 00:45:40 +03:00
Make the retrieval of PSK hint / key / identity items simpler, remove duplicate coding, remove a set of memcpy() and handle all these internally as coap_bin_const_t. This removes the need for libcoap internally to allocate (potentially limited) holding space for these items on the stack. The respective (D)TLS interface modules then convert these items into the format required for the underlying (D)TLS libraries. If the underlying (D)TLS library indicates that there is insufficient space for an item (defined by a max_len type parameter), then the item is truncated to that size and a warning issued about the provided item being too large for the underlying (D)TLS library. The item access functions are now standalone, not indexed through coap_context_t.