diff options
author | Uros Majstorovic <majstor@majstor.org> | 2024-04-27 01:23:43 +0200 |
---|---|---|
committer | Uros Majstorovic <majstor@majstor.org> | 2024-04-27 01:23:43 +0200 |
commit | 38fdc24c2cc0c942337481e825c69004c93fc358 (patch) | |
tree | 46835e29b2ae3db88035c26359415c22587b777c /ecp/test/vc_server.c | |
parent | 45e53e043ea0512215316a5ba21bd4cfd0a300e1 (diff) |
updated tests
Diffstat (limited to 'ecp/test/vc_server.c')
-rw-r--r-- | ecp/test/vc_server.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/ecp/test/vc_server.c b/ecp/test/vc_server.c index 548b52d..daf35f8 100644 --- a/ecp/test/vc_server.c +++ b/ecp/test/vc_server.c @@ -56,21 +56,24 @@ int main(int argc, char *argv[]) { ecp_conn_handler_init(&handler, handle_msg, handle_open, NULL, NULL); ecp_ctx_set_handler(&ctx, CTYPE_TEST, &handler); - rv = ecp_util_load_key(&key_perma.public, &key_perma.private, argv[1]); + rv = ecp_util_load_key(argv[1], &key_perma.public, &key_perma.private); printf("ecp_util_load_key RV:%d\n", rv); key_perma.valid = 1; rv = ecp_sock_create(&sock, &ctx, &key_perma); printf("ecp_sock_create RV:%d\n", rv); + rv = ecp_vconn_sock_create(&sock); + printf("ecp_vconn_htable_init RV:%d\n", rv); + rv = ecp_sock_open(&sock, NULL); printf("ecp_sock_open RV:%d\n", rv); rv = ecp_start_receiver(&sock); printf("ecp_start_receiver RV:%d\n", rv); - rv = ecp_util_load_pub(&node_pub, argv[argc-1]); - printf("ecp_util_load_pub RV:%d\n", rv); + rv = ecp_util_load_key(argv[argc-1], &node_pub, NULL); + printf("ecp_util_load_key RV:%d\n", rv); ecp_node_init(&node, &node_pub, NULL); rv = ecp_node_set_addr(&node, argv[2]); @@ -81,8 +84,8 @@ int main(int argc, char *argv[]) { ecp_ecdh_public_t vconn_pub[3]; for (i=3; i<argc-1; i++) { - rv = ecp_util_load_pub(&vconn_pub[i-3], argv[i]); - printf("ecp_util_load_pub RV:%d\n", rv); + rv = ecp_util_load_key(argv[i], &vconn_pub[i-3], NULL); + printf("ecp_util_load_key RV:%d\n", rv); } ecp_vconn_init(vconn, vconn_pub, argc-4, &sock); |