sync to GNUnet API changes
This commit is contained in:
		
							parent
							
								
									a831d35535
								
							
						
					
					
						commit
						43b7cab5ba
					
				@ -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;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -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);
 | 
			
		||||
 | 
			
		||||
@ -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.
 | 
			
		||||
   */
 | 
			
		||||
 | 
			
		||||
@ -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);
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
@ -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;
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user