Bläddra i källkod

sync to GNUnet API changes

master
Dejvino 3 år sedan
förälder
incheckning
43b7cab5ba
5 ändrade filer med 16 tillägg och 19 borttagningar
  1. +1
    -1
      src/multicast/gnunet-multicast.c
  2. +6
    -6
      src/multicast/gnunet-service-multicast.c
  3. +5
    -5
      src/multicast/multicast.h
  4. +3
    -6
      src/social/gnunet-service-social.c
  5. +1
    -1
      src/social/gnunet-social.c

+ 1
- 1
src/multicast/gnunet-multicast.c Visa fil

@@ -72,7 +72,7 @@ main (int argc, char *const *argv)
gettext_noop ("This command doesn't do anything yet."),
options, &run,
NULL)) ? ret : 1;
GNUNET_free ((void*) argv);
GNUNET_free_nz ((void*) argv);
return ret;
}



+ 6
- 6
src/multicast/gnunet-service-multicast.c Visa fil

@@ -969,7 +969,7 @@ check_cadet_join_request (void *cls,
return GNUNET_SYSERR;
}
if (GNUNET_OK !=
GNUNET_CRYPTO_ecdsa_verify (GNUNET_SIGNATURE_PURPOSE_MULTICAST_REQUEST,
GNUNET_CRYPTO_ecdsa_verify_ (GNUNET_SIGNATURE_PURPOSE_MULTICAST_REQUEST,
&req->purpose, &req->signature,
&req->member_pub_key))
{
@@ -1098,7 +1098,7 @@ check_cadet_message (void *cls,
return GNUNET_SYSERR;
}
if (GNUNET_OK !=
GNUNET_CRYPTO_eddsa_verify (GNUNET_SIGNATURE_PURPOSE_MULTICAST_MESSAGE,
GNUNET_CRYPTO_eddsa_verify_ (GNUNET_SIGNATURE_PURPOSE_MULTICAST_MESSAGE,
&msg->purpose, &msg->signature,
&chn->group_pub_key))
{
@@ -1150,7 +1150,7 @@ check_cadet_request (void *cls,
return GNUNET_SYSERR;
}
if (GNUNET_OK !=
GNUNET_CRYPTO_ecdsa_verify (GNUNET_SIGNATURE_PURPOSE_MULTICAST_REQUEST,
GNUNET_CRYPTO_ecdsa_verify_ (GNUNET_SIGNATURE_PURPOSE_MULTICAST_REQUEST,
&req->purpose, &req->signature,
&req->member_pub_key))
{
@@ -1605,7 +1605,7 @@ handle_client_member_join (void *cls,
- sizeof (req->signature));
req->purpose.purpose = htonl (GNUNET_SIGNATURE_PURPOSE_MULTICAST_REQUEST);

if (GNUNET_OK != GNUNET_CRYPTO_ecdsa_sign (&mem->priv_key, &req->purpose,
if (GNUNET_OK != GNUNET_CRYPTO_ecdsa_sign_ (&mem->priv_key, &req->purpose,
&req->signature))
{
/* FIXME: handle error */
@@ -1770,7 +1770,7 @@ handle_client_multicast_message (void *cls,
- sizeof (out->signature));
out->purpose.purpose = htonl (GNUNET_SIGNATURE_PURPOSE_MULTICAST_MESSAGE);

if (GNUNET_OK != GNUNET_CRYPTO_eddsa_sign (&orig->priv_key, &out->purpose,
if (GNUNET_OK != GNUNET_CRYPTO_eddsa_sign_ (&orig->priv_key, &out->purpose,
&out->signature))
{
GNUNET_assert (0);
@@ -1825,7 +1825,7 @@ handle_client_multicast_request (void *cls,
- sizeof (out->signature));
out->purpose.purpose = htonl (GNUNET_SIGNATURE_PURPOSE_MULTICAST_REQUEST);

if (GNUNET_OK != GNUNET_CRYPTO_ecdsa_sign (&mem->priv_key, &out->purpose,
if (GNUNET_OK != GNUNET_CRYPTO_ecdsa_sign_ (&mem->priv_key, &out->purpose,
&out->signature))
{
GNUNET_assert (0);


+ 5
- 5
src/multicast/multicast.h Visa fil

@@ -38,6 +38,11 @@ GNUNET_NETWORK_STRUCT_BEGIN
*/
struct MulticastJoinRequestMessage
{
/**
* Purpose for the signature and size of the signed data.
*/
struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
/**
* Type: GNUNET_MESSAGE_TYPE_MULTICAST_JOIN_REQUEST
*/
@@ -55,11 +60,6 @@ struct MulticastJoinRequestMessage
*/
struct GNUNET_CRYPTO_EcdsaSignature signature;

/**
* Purpose for the signature and size of the signed data.
*/
struct GNUNET_CRYPTO_EccSignaturePurpose purpose;

/**
* Public key of the target group.
*/


+ 3
- 6
src/social/gnunet-service-social.c Visa fil

@@ -1675,12 +1675,9 @@ handle_client_host_enter (void *cls,

if (0 == memcmp (&hreq->place_pub_key, &empty_pub_key, sizeof (empty_pub_key)))
{ // no public key set: create new private key & save the place
struct GNUNET_CRYPTO_EddsaPrivateKey *
place_key = GNUNET_CRYPTO_eddsa_key_create ();
hreq->place_key = *place_key;
GNUNET_CRYPTO_eddsa_key_get_public (place_key, &hreq->place_pub_key);
GNUNET_CRYPTO_eddsa_key_clear (place_key);
GNUNET_free (place_key);
GNUNET_CRYPTO_eddsa_key_create (&hreq->place_key);
GNUNET_CRYPTO_eddsa_key_get_public (&hreq->place_key, &hreq->place_pub_key);
GNUNET_CRYPTO_eddsa_key_clear (&hreq->place_key);

app_place_save (app_id, (const struct PlaceEnterRequest *) hreq);
}


+ 1
- 1
src/social/gnunet-social.c Visa fil

@@ -1402,7 +1402,7 @@ main (int argc, char *const *argv)

res = GNUNET_PROGRAM_run (argc, argv, help, usage, options, &run, NULL);

GNUNET_free ((void *) argv);
GNUNET_free_nz ((void *) argv);

if (GNUNET_OK == res)
return ret;


Laddar…
Avbryt
Spara