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

Leandro Lanzieri notifications at github.com
Tue Apr 6 14:07:06 CEST 2021


@leandrolanzieri commented on this pull request.



> +
+    /* point to version, it SHALL be 1 */
+    asn1_tree *node = priv_key.child;
+    if (!node || node->type != ASN1_TYPE_INTEGER || node->data[0] != 0x01) {
+        DEBUG("credman: invalid private key version\n");
+        return CREDMAN_INVALID;
+    }
+
+    /* point to privateKey */
+    node = node->next;
+    if (!node || node->type != ASN1_TYPE_OCTET_STRING || !node->data || !node->length) {
+        DEBUG("credman: invalid private key\n");
+        return CREDMAN_INVALID;
+    }
+
+    cred->type = CREDMAN_TYPE_ECDSA;

I'm thinking if we should add a member to the EC keys specifying the used curve

-- 
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#discussion_r607789326
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20210406/cafe5169/attachment.htm>


More information about the notifications mailing list