-bool meshlink_verify(meshlink_handle_t *mesh, meshlink_node_t *source, const char *data, size_t len, const char *signature) {
- return false;
+bool meshlink_verify(meshlink_handle_t *mesh, meshlink_node_t *source, const void *data, size_t len, const void *signature, size_t siglen) {
+ if(siglen != MESHLINK_SIGLEN)
+ return false;
+ struct node_t *n = (struct node_t *)source;
+ node_read_ecdsa_public_key(mesh, n);
+ if(!n->ecdsa)
+ return false;
+ return ecdsa_verify(((struct node_t *)source)->ecdsa, data, len, signature);