[riot-notifications] [RIOT-OS/RIOT] sys/credman: add key load functions (#16263)

benpicco notifications at github.com
Thu Sep 16 13:32:42 CEST 2021


@benpicco commented on this pull request.



> + *
+ * @note To use this functionality include the module `credman_load`. Credman only supports ECDSA
+ *       for now, so [RFC5480](https://tools.ietf.org/html/rfc5480) applies.
+ *
+ * @experimental This API is considered experimental and will probably change without notice!
+ *
+ * @see https://tools.ietf.org/html/rfc5280#section-4.1
+ *
+ * @param[in]  buf          Buffer holding the encoded public key
+ * @param[in]  buf_len      Length of @p buf
+ * @param[out] out          ECDSA public key to populate
+ *
+ * @retval CREDMAN_OK on success
+ * @retval CREDMAN_INVALID if the key is not valid
+ */
+int credman_load_public_key(const uint8_t *buf, size_t buf_len, ecdsa_public_key_t *out);

Would it make sense to use
```suggestion
int credman_load_public_key(const void *buf, size_t buf_len, ecdsa_public_key_t *out);
```
here?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/16263#pullrequestreview-756181920
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20210916/7f4d8d92/attachment.htm>


More information about the notifications mailing list