diff options
author | Christian Grothoff <christian@grothoff.org> | 2021-03-06 12:25:58 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2021-03-06 12:25:58 +0100 |
commit | c94699a87444a84734b5b13c2231bc9775a6399a (patch) | |
tree | 8bc999c5e7ee410f58be15503af0f8d53bdb7cf4 | |
parent | b55bf14f025059239456b8f2676a33e317cb5fc9 (diff) | |
download | gnunet-secushare-c94699a87444a84734b5b13c2231bc9775a6399a.tar.gz gnunet-secushare-c94699a87444a84734b5b13c2231bc9775a6399a.zip |
Tobias Platen wrote:
I took the gnunet-secushare repository which currently does not build.
So I wrote a patch.
-rw-r--r-- | src/multicast/gnunet-multicast.c | 2 | ||||
-rw-r--r-- | src/multicast/gnunet-service-multicast.c | 12 | ||||
-rw-r--r-- | src/social/gnunet-service-social.c | 7 | ||||
-rw-r--r-- | src/social/gnunet-social.c | 2 |
4 files changed, 14 insertions, 9 deletions
diff --git a/src/multicast/gnunet-multicast.c b/src/multicast/gnunet-multicast.c index ffac36d..6859402 100644 --- a/src/multicast/gnunet-multicast.c +++ b/src/multicast/gnunet-multicast.c | |||
@@ -72,7 +72,7 @@ main (int argc, char *const *argv) | |||
72 | gettext_noop ("This command doesn't do anything yet."), | 72 | gettext_noop ("This command doesn't do anything yet."), |
73 | options, &run, | 73 | options, &run, |
74 | NULL)) ? ret : 1; | 74 | NULL)) ? ret : 1; |
75 | GNUNET_free ((void*) argv); | 75 | //XXX GNUNET_free ((void*) argv); |
76 | return ret; | 76 | return ret; |
77 | } | 77 | } |
78 | 78 | ||
diff --git a/src/multicast/gnunet-service-multicast.c b/src/multicast/gnunet-service-multicast.c index a787307..6296974 100644 --- a/src/multicast/gnunet-service-multicast.c +++ b/src/multicast/gnunet-service-multicast.c | |||
@@ -969,7 +969,7 @@ check_cadet_join_request (void *cls, | |||
969 | return GNUNET_SYSERR; | 969 | return GNUNET_SYSERR; |
970 | } | 970 | } |
971 | if (GNUNET_OK != | 971 | if (GNUNET_OK != |
972 | GNUNET_CRYPTO_ecdsa_verify (GNUNET_SIGNATURE_PURPOSE_MULTICAST_REQUEST, | 972 | GNUNET_CRYPTO_ecdsa_verify_ (GNUNET_SIGNATURE_PURPOSE_MULTICAST_REQUEST, |
973 | &req->purpose, &req->signature, | 973 | &req->purpose, &req->signature, |
974 | &req->member_pub_key)) | 974 | &req->member_pub_key)) |
975 | { | 975 | { |
@@ -1098,7 +1098,7 @@ check_cadet_message (void *cls, | |||
1098 | return GNUNET_SYSERR; | 1098 | return GNUNET_SYSERR; |
1099 | } | 1099 | } |
1100 | if (GNUNET_OK != | 1100 | if (GNUNET_OK != |
1101 | GNUNET_CRYPTO_eddsa_verify (GNUNET_SIGNATURE_PURPOSE_MULTICAST_MESSAGE, | 1101 | GNUNET_CRYPTO_eddsa_verify_ (GNUNET_SIGNATURE_PURPOSE_MULTICAST_MESSAGE, |
1102 | &msg->purpose, &msg->signature, | 1102 | &msg->purpose, &msg->signature, |
1103 | &chn->group_pub_key)) | 1103 | &chn->group_pub_key)) |
1104 | { | 1104 | { |
@@ -1150,7 +1150,7 @@ check_cadet_request (void *cls, | |||
1150 | return GNUNET_SYSERR; | 1150 | return GNUNET_SYSERR; |
1151 | } | 1151 | } |
1152 | if (GNUNET_OK != | 1152 | if (GNUNET_OK != |
1153 | GNUNET_CRYPTO_ecdsa_verify (GNUNET_SIGNATURE_PURPOSE_MULTICAST_REQUEST, | 1153 | GNUNET_CRYPTO_ecdsa_verify_ (GNUNET_SIGNATURE_PURPOSE_MULTICAST_REQUEST, |
1154 | &req->purpose, &req->signature, | 1154 | &req->purpose, &req->signature, |
1155 | &req->member_pub_key)) | 1155 | &req->member_pub_key)) |
1156 | { | 1156 | { |
@@ -1605,7 +1605,7 @@ handle_client_member_join (void *cls, | |||
1605 | - sizeof (req->signature)); | 1605 | - sizeof (req->signature)); |
1606 | req->purpose.purpose = htonl (GNUNET_SIGNATURE_PURPOSE_MULTICAST_REQUEST); | 1606 | req->purpose.purpose = htonl (GNUNET_SIGNATURE_PURPOSE_MULTICAST_REQUEST); |
1607 | 1607 | ||
1608 | if (GNUNET_OK != GNUNET_CRYPTO_ecdsa_sign (&mem->priv_key, &req->purpose, | 1608 | if (GNUNET_OK != GNUNET_CRYPTO_ecdsa_sign_ (&mem->priv_key, &req->purpose, |
1609 | &req->signature)) | 1609 | &req->signature)) |
1610 | { | 1610 | { |
1611 | /* FIXME: handle error */ | 1611 | /* FIXME: handle error */ |
@@ -1770,7 +1770,7 @@ handle_client_multicast_message (void *cls, | |||
1770 | - sizeof (out->signature)); | 1770 | - sizeof (out->signature)); |
1771 | out->purpose.purpose = htonl (GNUNET_SIGNATURE_PURPOSE_MULTICAST_MESSAGE); | 1771 | out->purpose.purpose = htonl (GNUNET_SIGNATURE_PURPOSE_MULTICAST_MESSAGE); |
1772 | 1772 | ||
1773 | if (GNUNET_OK != GNUNET_CRYPTO_eddsa_sign (&orig->priv_key, &out->purpose, | 1773 | if (GNUNET_OK != GNUNET_CRYPTO_eddsa_sign_ (&orig->priv_key, &out->purpose, |
1774 | &out->signature)) | 1774 | &out->signature)) |
1775 | { | 1775 | { |
1776 | GNUNET_assert (0); | 1776 | GNUNET_assert (0); |
@@ -1825,7 +1825,7 @@ handle_client_multicast_request (void *cls, | |||
1825 | - sizeof (out->signature)); | 1825 | - sizeof (out->signature)); |
1826 | out->purpose.purpose = htonl (GNUNET_SIGNATURE_PURPOSE_MULTICAST_REQUEST); | 1826 | out->purpose.purpose = htonl (GNUNET_SIGNATURE_PURPOSE_MULTICAST_REQUEST); |
1827 | 1827 | ||
1828 | if (GNUNET_OK != GNUNET_CRYPTO_ecdsa_sign (&mem->priv_key, &out->purpose, | 1828 | if (GNUNET_OK != GNUNET_CRYPTO_ecdsa_sign_ (&mem->priv_key, &out->purpose, |
1829 | &out->signature)) | 1829 | &out->signature)) |
1830 | { | 1830 | { |
1831 | GNUNET_assert (0); | 1831 | GNUNET_assert (0); |
diff --git a/src/social/gnunet-service-social.c b/src/social/gnunet-service-social.c index 6fd2383..c7a40e6 100644 --- a/src/social/gnunet-service-social.c +++ b/src/social/gnunet-service-social.c | |||
@@ -1252,6 +1252,7 @@ static int | |||
1252 | app_place_save (const char *app_id, | 1252 | app_place_save (const char *app_id, |
1253 | const struct PlaceEnterRequest *ereq) | 1253 | const struct PlaceEnterRequest *ereq) |
1254 | { | 1254 | { |
1255 | int ret=0; | ||
1255 | if (GNUNET_SYSERR == app_place_add (app_id, ereq)) | 1256 | if (GNUNET_SYSERR == app_place_add (app_id, ereq)) |
1256 | { | 1257 | { |
1257 | GNUNET_assert (0); | 1258 | GNUNET_assert (0); |
@@ -1696,6 +1697,7 @@ handle_client_host_enter (void *cls, | |||
1696 | if (0 == memcmp (&hreq->place_pub_key, &empty_pub_key, | 1697 | if (0 == memcmp (&hreq->place_pub_key, &empty_pub_key, |
1697 | sizeof (empty_pub_key))) | 1698 | sizeof (empty_pub_key))) |
1698 | { // no public key set: create new private key & save the place | 1699 | { // no public key set: create new private key & save the place |
1700 | #if 0 | ||
1699 | struct GNUNET_CRYPTO_EddsaPrivateKey * | 1701 | struct GNUNET_CRYPTO_EddsaPrivateKey * |
1700 | place_key = GNUNET_CRYPTO_eddsa_key_create (); | 1702 | place_key = GNUNET_CRYPTO_eddsa_key_create (); |
1701 | hreq->place_key = *place_key; | 1703 | hreq->place_key = *place_key; |
@@ -1704,6 +1706,8 @@ handle_client_host_enter (void *cls, | |||
1704 | GNUNET_free (place_key); | 1706 | GNUNET_free (place_key); |
1705 | 1707 | ||
1706 | app_place_save (app_id, (const struct PlaceEnterRequest *) hreq); | 1708 | app_place_save (app_id, (const struct PlaceEnterRequest *) hreq); |
1709 | #endif | ||
1710 | abort(); //FIXME | ||
1707 | } | 1711 | } |
1708 | 1712 | ||
1709 | switch (host_enter (hreq, &hst)) | 1713 | switch (host_enter (hreq, &hst)) |
@@ -3670,7 +3674,8 @@ identity_recv_ego (void *cls, struct GNUNET_IDENTITY_Ego *id_ego, | |||
3670 | { | 3674 | { |
3671 | ego = GNUNET_malloc (sizeof (*ego)); | 3675 | ego = GNUNET_malloc (sizeof (*ego)); |
3672 | } | 3676 | } |
3673 | ego->key = *(GNUNET_IDENTITY_ego_get_private_key (id_ego)); | 3677 | //XXX ego->key = *(GNUNET_IDENTITY_ego_get_private_key (id_ego)); |
3678 | abort(); | ||
3674 | size_t name_size = strlen (name) + 1; | 3679 | size_t name_size = strlen (name) + 1; |
3675 | ego->name = GNUNET_malloc (name_size); | 3680 | ego->name = GNUNET_malloc (name_size); |
3676 | GNUNET_memcpy (ego->name, name, name_size); | 3681 | GNUNET_memcpy (ego->name, name, name_size); |
diff --git a/src/social/gnunet-social.c b/src/social/gnunet-social.c index f934894..8feb8c9 100644 --- a/src/social/gnunet-social.c +++ b/src/social/gnunet-social.c | |||
@@ -1402,7 +1402,7 @@ main (int argc, char *const *argv) | |||
1402 | 1402 | ||
1403 | res = GNUNET_PROGRAM_run (argc, argv, help, usage, options, &run, NULL); | 1403 | res = GNUNET_PROGRAM_run (argc, argv, help, usage, options, &run, NULL); |
1404 | 1404 | ||
1405 | GNUNET_free ((void *) argv); | 1405 | //GNUNET_free ((void *) argv); |
1406 | 1406 | ||
1407 | if (GNUNET_OK == res) | 1407 | if (GNUNET_OK == res) |
1408 | return ret; | 1408 | return ret; |