- fixed two bugs in the API, where the API would only append number-of-elements bytes instead of the size of those elements
- SP-service now retains the configuration handle received during initialization
GNUNET_APPLICATION_TYPE_SCALARPRODUCT,
0
};
GNUNET_APPLICATION_TYPE_SCALARPRODUCT,
0
};
//generate private/public key set
GNUNET_CRYPTO_paillier_create (&my_pubkey, &my_privkey);
//generate private/public key set
GNUNET_CRYPTO_paillier_create (&my_pubkey, &my_privkey);
&cb_client_disconnect,
NULL);
GNUNET_break (GNUNET_OK ==
&cb_client_disconnect,
NULL);
GNUNET_break (GNUNET_OK ==
- GNUNET_CRYPTO_get_peer_identity (c,
+ GNUNET_CRYPTO_get_peer_identity (cfg,
- my_cadet = GNUNET_CADET_connect (c, NULL,
+ my_cadet = GNUNET_CADET_connect (cfg, NULL,
&cb_channel_incoming,
&cb_channel_destruction,
cadet_handlers, ports);
&cb_channel_incoming,
&cb_channel_destruction,
cadet_handlers, ports);
msg->header.type = htons (GNUNET_MESSAGE_TYPE_SCALARPRODUCT_CLIENT_MUTLIPART);
msg->element_count_contained = htonl (todo);
msg->header.type = htons (GNUNET_MESSAGE_TYPE_SCALARPRODUCT_CLIENT_MUTLIPART);
msg->element_count_contained = htonl (todo);
- memcpy (&msg[1], &h->elements[h->element_count_transfered], todo);
+ memcpy (&msg[1], &h->elements[h->element_count_transfered], todo * sizeof (struct GNUNET_SCALARPRODUCT_Element));
h->element_count_transfered += todo;
h->th = GNUNET_CLIENT_notify_transmit_ready (h->client, size,
h->element_count_transfered += todo;
h->th = GNUNET_CLIENT_notify_transmit_ready (h->client, size,
size = sizeof (struct GNUNET_SCALARPRODUCT_computation_message) + possible*sizeof (struct GNUNET_SCALARPRODUCT_Element);
h->elements = (struct GNUNET_SCALARPRODUCT_Element*)
GNUNET_malloc (sizeof(struct GNUNET_SCALARPRODUCT_Element) * element_count);
size = sizeof (struct GNUNET_SCALARPRODUCT_computation_message) + possible*sizeof (struct GNUNET_SCALARPRODUCT_Element);
h->elements = (struct GNUNET_SCALARPRODUCT_Element*)
GNUNET_malloc (sizeof(struct GNUNET_SCALARPRODUCT_Element) * element_count);
- memcpy (h->elements, elements, sizeof (struct GNUNET_SCALARPRODUCT_Element)*element_count);
+ memcpy (h->elements, elements, sizeof (struct GNUNET_SCALARPRODUCT_Element) * element_count);
memcpy (&msg->peer, peer, sizeof (struct GNUNET_PeerIdentity));
memcpy (&msg->session_key, session_key, sizeof (struct GNUNET_HashCode));
memcpy (&msg->peer, peer, sizeof (struct GNUNET_PeerIdentity));
memcpy (&msg->session_key, session_key, sizeof (struct GNUNET_HashCode));
- memcpy (&msg[1], elements, possible);
+ memcpy (&msg[1], elements, sizeof (struct GNUNET_SCALARPRODUCT_Element) * possible);
h->th = GNUNET_CLIENT_notify_transmit_ready (h->client, size,
GNUNET_TIME_UNIT_FOREVER_REL,
h->th = GNUNET_CLIENT_notify_transmit_ready (h->client, size,
GNUNET_TIME_UNIT_FOREVER_REL,
-DEFAULTSERVICES = core cadet statistics scalarproduct
+DEFAULTSERVICES = core cadet statistics scalarproduct set
-[ats]
-WAN_QUOTA_OUT = 3932160
-WAN_QUOTA_IN = 3932160
-
-[block]
-plugins = dht test
-
-[consensus]
-AUTOSTART = NO
-
-[core]
-PORT = 12092
-AUTOSTART = YES
-
-[dht]
-AUTOSTART = YES
-DISABLE_TRY_CONNECT = NO
-
-[dhtcache]
-QUOTA = 1 MB
-DATABASE = heap
-
-[dns]
-AUTOSTART = NO
-
-[fs]
-AUTOSTART = NO
-
-[gnunetd]
-HOSTKEY = $SERVICEHOME/.hostkey
-
-[cadet]
-#AUTOSTART = YES
-ACCEPT_FROM = 127.0.0.1;
-PORT = 10700
-
-[nat]
-RETURN_LOCAL_ADDRESSES = YES
-
-[namestore]
-AUTOSTART = NO
-
-[nse]
-AUTOSTART = NO
-
[PATHS]
GNUNET_TEST_HOME = /tmp/test-scalarproduct/
[PATHS]
GNUNET_TEST_HOME = /tmp/test-scalarproduct/
-[psycstore]
-AUTOSTART = NO
-
-[regex]
-AUTOSTART = NO
-
-[resolver]
-AUTOSTART = NO
-HOSTNAME = localhost
-
-[statistics]
-AUTOSTART = NO
-
[scalarproduct]
AUTOSTART = YES
BINARY = gnunet-service-scalarproduct
[scalarproduct]
AUTOSTART = YES
BINARY = gnunet-service-scalarproduct
-UNIXPATH = $SERVICEHOME/scalarproduct.sock
-#HOME = $SERVICEHOME
+#UNIXPATH = $SERVICEHOME/scalarproduct.sock
+UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-service-scalarproduct.sock
HOSTNAME = localhost
PORT = 13087
HOSTNAME = localhost
PORT = 13087
-[transport]
-PLUGINS = tcp
-ACCEPT_FROM6 = ::1;
-ACCEPT_FROM = 127.0.0.1;
-NEIGHBOUR_LIMIT = 50
-PORT = 12365
-
-[transport-tcp]
-TIMEOUT = 300 s
-PORT = 12368
+[set]
+AUTOSTART = YES
+PORT = 12106
+HOSTNAME = localhost
+BINARY = gnunet-service-set
+#ACCEPT_FROM = 127.0.0.1;
+#ACCEPT_FROM6 = ::1;
+#UNIXPATH = $SERVICEHOME/set.sock
+UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-service-set.sock
+#UNIX_MATCH_UID = YES
+#UNIX_MATCH_GID = YES
+#OPTIONS = -L DEBUG
-OVERLAY_TOPOLOGY = LINE
-
-[TESTING]
-WEAKRANDOM = YES
-
-[vpn]
-AUTOSTART = NO
-
-
+OVERLAY_TOPOLOGY = CLIQUE
\ No newline at end of file