libgnunetchat

library for GNUnet Messenger
Log | Files | Refs | README | LICENSE

commit 5122725420c5cbf90f4f22e55b56362d59c66aaa
parent 3ed9d9a4dba82db276aa6a7f9bd553ad19c296d3
Author: TheJackiMonster <thejackimonster@gmail.com>
Date:   Wed, 15 Nov 2023 01:59:14 +0100

Fix build issues with upstream gnunet

Signed-off-by: TheJackiMonster <thejackimonster@gmail.com>

Diffstat:
Msrc/gnunet_chat_account.c | 6+++---
Msrc/gnunet_chat_contact.c | 6+++---
Msrc/gnunet_chat_context.c | 4++--
Msrc/gnunet_chat_handle.c | 12++++++------
Msrc/gnunet_chat_handle.h | 2+-
Msrc/gnunet_chat_handle_intern.c | 15++++++++-------
Msrc/gnunet_chat_lib.c | 6+++---
Msrc/gnunet_chat_lib_intern.c | 6+++---
Msrc/gnunet_chat_lobby.c | 4++--
Msrc/gnunet_chat_lobby_intern.c | 8++++----
Msrc/gnunet_chat_uri.c | 4++--
Msrc/gnunet_chat_uri.h | 7+++----
12 files changed, 40 insertions(+), 40 deletions(-)

diff --git a/src/gnunet_chat_account.c b/src/gnunet_chat_account.c @@ -1,6 +1,6 @@ /* This file is part of GNUnet. - Copyright (C) 2022 GNUnet e.V. + Copyright (C) 2022--2023 GNUnet e.V. GNUnet is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published @@ -53,10 +53,10 @@ account_update_directory (struct GNUNET_CHAT_Account *account, if (account->directory) GNUNET_free(account->directory); - struct GNUNET_IDENTITY_PublicKey key; + struct GNUNET_CRYPTO_PublicKey key; GNUNET_IDENTITY_ego_get_public_key(account->ego, &key); - char *key_string = GNUNET_IDENTITY_public_key_to_string(&key); + char *key_string = GNUNET_CRYPTO_public_key_to_string(&key); if (!key_string) { diff --git a/src/gnunet_chat_contact.c b/src/gnunet_chat_contact.c @@ -1,6 +1,6 @@ /* This file is part of GNUnet. - Copyright (C) 2021--2022 GNUnet e.V. + Copyright (C) 2021--2023 GNUnet e.V. GNUnet is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published @@ -63,11 +63,11 @@ contact_update_key (struct GNUNET_CHAT_Contact *contact) if (!(contact->member)) return; - const struct GNUNET_IDENTITY_PublicKey *pubkey; + const struct GNUNET_CRYPTO_PublicKey *pubkey; pubkey = GNUNET_MESSENGER_contact_get_key(contact->member); if (pubkey) - contact->public_key = GNUNET_IDENTITY_public_key_to_string(pubkey); + contact->public_key = GNUNET_CRYPTO_public_key_to_string(pubkey); } struct GNUNET_CHAT_Context* diff --git a/src/gnunet_chat_context.c b/src/gnunet_chat_context.c @@ -1,6 +1,6 @@ /* This file is part of GNUnet. - Copyright (C) 2021--2022 GNUnet e.V. + Copyright (C) 2021--2023 GNUnet e.V. GNUnet is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published @@ -273,7 +273,7 @@ context_write_records (struct GNUNET_CHAT_Context *context) (context->handle) && (context->room)); - const struct GNUNET_IDENTITY_PrivateKey *zone = handle_get_key( + const struct GNUNET_CRYPTO_PrivateKey *zone = handle_get_key( context->handle ); diff --git a/src/gnunet_chat_handle.c b/src/gnunet_chat_handle.c @@ -140,11 +140,11 @@ handle_update_key (struct GNUNET_CHAT_Handle *handle) if (!(handle->messenger)) return; - const struct GNUNET_IDENTITY_PublicKey *pubkey; + const struct GNUNET_CRYPTO_PublicKey *pubkey; pubkey = GNUNET_MESSENGER_get_key(handle->messenger); if (pubkey) - handle->public_key = GNUNET_IDENTITY_public_key_to_string(pubkey); + handle->public_key = GNUNET_CRYPTO_public_key_to_string(pubkey); } void @@ -244,7 +244,7 @@ handle_update_identity(struct GNUNET_CHAT_Handle *handle) NULL ); - const struct GNUNET_IDENTITY_PrivateKey *zone = handle_get_key(handle); + const struct GNUNET_CRYPTO_PrivateKey *zone = handle_get_key(handle); if ((!zone) || (handle->monitor)) return; @@ -286,7 +286,7 @@ handle_connect (struct GNUNET_CHAT_Handle *handle, const char *name = account->name; - const struct GNUNET_IDENTITY_PrivateKey *key = NULL; + const struct GNUNET_CRYPTO_PrivateKey *key = NULL; if (account->ego) key = GNUNET_IDENTITY_ego_get_private_key(account->ego); @@ -515,7 +515,7 @@ handle_create_account (struct GNUNET_CHAT_Handle *handle, handle->identity, name, NULL, - GNUNET_IDENTITY_TYPE_ECDSA, + GNUNET_PUBLIC_KEY_TYPE_ECDSA, cb_account_creation, accounts ); @@ -627,7 +627,7 @@ handle_update (struct GNUNET_CHAT_Handle *handle) return result; } -const struct GNUNET_IDENTITY_PrivateKey* +const struct GNUNET_CRYPTO_PrivateKey* handle_get_key (const struct GNUNET_CHAT_Handle *handle) { GNUNET_assert(handle); diff --git a/src/gnunet_chat_handle.h b/src/gnunet_chat_handle.h @@ -241,7 +241,7 @@ handle_update (struct GNUNET_CHAT_Handle *handle); * @param[in] handle Chat handle * @return EGOs private key or NULL */ -const struct GNUNET_IDENTITY_PrivateKey* +const struct GNUNET_CRYPTO_PrivateKey* handle_get_key (const struct GNUNET_CHAT_Handle *handle); /** diff --git a/src/gnunet_chat_handle_intern.c b/src/gnunet_chat_handle_intern.c @@ -30,7 +30,8 @@ #include "gnunet_chat_invitation.h" #include "gnunet_chat_message.h" #include "gnunet_chat_util.h" -#include <gnunet/gnunet_common.h> + +#include <gnunet/gnunet_util_lib.h> #include <stdio.h> #define GNUNET_UNUSED __attribute__ ((unused)) @@ -333,7 +334,7 @@ send_refresh: void cb_account_creation (void *cls, - const struct GNUNET_IDENTITY_PrivateKey *key, + const struct GNUNET_CRYPTO_PrivateKey *key, enum GNUNET_ErrorCode ec) { GNUNET_assert(cls); @@ -444,7 +445,7 @@ cb_account_rename (void *cls, static void cb_account_update_completion (void *cls, - const struct GNUNET_IDENTITY_PrivateKey *key, + const struct GNUNET_CRYPTO_PrivateKey *key, enum GNUNET_ErrorCode ec) { GNUNET_assert(cls); @@ -483,7 +484,7 @@ cb_account_update (void *cls, handle->identity, accounts->identifier, NULL, - GNUNET_IDENTITY_TYPE_ECDSA, + GNUNET_PUBLIC_KEY_TYPE_ECDSA, cb_account_update_completion, accounts ); @@ -541,7 +542,7 @@ intern_provide_contact_for_member(struct GNUNET_CHAT_Handle *handle, struct GNUNET_CHAT_CheckHandleRoomMembers { - const struct GNUNET_IDENTITY_PublicKey *ignore_key; + const struct GNUNET_CRYPTO_PublicKey *ignore_key; const struct GNUNET_MESSENGER_Contact *contact; }; @@ -554,7 +555,7 @@ check_handle_room_members (void* cls, GNUNET_assert((check) && (member)); - const struct GNUNET_IDENTITY_PublicKey *member_key = ( + const struct GNUNET_CRYPTO_PublicKey *member_key = ( GNUNET_MESSENGER_contact_get_key(member) ); @@ -588,7 +589,7 @@ scan_handle_room_members (void* cls, void on_monitor_namestore_record(void *cls, GNUNET_UNUSED const - struct GNUNET_IDENTITY_PrivateKey *zone, + struct GNUNET_CRYPTO_PrivateKey *zone, const char *label, unsigned int count, const struct GNUNET_GNSRECORD_Data *data) diff --git a/src/gnunet_chat_lib.c b/src/gnunet_chat_lib.c @@ -270,7 +270,7 @@ GNUNET_CHAT_uri_parse (const char *uri, return NULL; } - struct GNUNET_IDENTITY_PublicKey zone; + struct GNUNET_CRYPTO_PublicKey zone; const char *data = uri + prefix_len; char *end = strchr(data, '.'); @@ -285,7 +285,7 @@ GNUNET_CHAT_uri_parse (const char *uri, char *zone_data = GNUNET_strndup(data, (size_t) (end - data)); - if (GNUNET_OK != GNUNET_IDENTITY_public_key_from_string(zone_data, &zone)) + if (GNUNET_OK != GNUNET_CRYPTO_public_key_from_string(zone_data, &zone)) { GNUNET_free(zone_data); @@ -309,7 +309,7 @@ GNUNET_CHAT_uri_to_string (const struct GNUNET_CHAT_Uri *uri) if (!uri) return NULL; - char *key_string = GNUNET_IDENTITY_public_key_to_string(&(uri->zone)); + char *key_string = GNUNET_CRYPTO_public_key_to_string(&(uri->zone)); char *string; GNUNET_asprintf ( diff --git a/src/gnunet_chat_lib_intern.c b/src/gnunet_chat_lib_intern.c @@ -1,6 +1,6 @@ /* This file is part of GNUnet. - Copyright (C) 2021--2022 GNUnet e.V. + Copyright (C) 2021--2023 GNUnet e.V. GNUnet is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published @@ -147,7 +147,7 @@ it_handle_iterate_groups (void *cls, struct GNUNET_CHAT_RoomFindContact { - const struct GNUNET_IDENTITY_PublicKey *ignore_key; + const struct GNUNET_CRYPTO_PublicKey *ignore_key; const struct GNUNET_MESSENGER_Contact *contact; }; @@ -158,7 +158,7 @@ it_room_find_contact (void *cls, { GNUNET_assert((cls) && (member)); - const struct GNUNET_IDENTITY_PublicKey *key = GNUNET_MESSENGER_contact_get_key( + const struct GNUNET_CRYPTO_PublicKey *key = GNUNET_MESSENGER_contact_get_key( member ); diff --git a/src/gnunet_chat_lobby.c b/src/gnunet_chat_lobby.c @@ -1,6 +1,6 @@ /* This file is part of GNUnet. - Copyright (C) 2022 GNUnet e.V. + Copyright (C) 2022--2023 GNUnet e.V. GNUnet is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published @@ -138,7 +138,7 @@ open_zone: lobby->handle->identity, name, NULL, - GNUNET_IDENTITY_TYPE_EDDSA, + GNUNET_PUBLIC_KEY_TYPE_EDDSA, cont_lobby_identity_create, lobby ); diff --git a/src/gnunet_chat_lobby_intern.c b/src/gnunet_chat_lobby_intern.c @@ -1,6 +1,6 @@ /* This file is part of GNUnet. - Copyright (C) 2022 GNUnet e.V. + Copyright (C) 2022--2023 GNUnet e.V. GNUnet is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published @@ -70,7 +70,7 @@ call_cb: void cont_lobby_identity_create (void *cls, - const struct GNUNET_IDENTITY_PrivateKey *zone, + const struct GNUNET_CRYPTO_PrivateKey *zone, enum GNUNET_ErrorCode ec) { struct GNUNET_CHAT_Lobby *lobby = cls; @@ -109,8 +109,8 @@ cont_lobby_identity_create (void *cls, if (lobby->uri) uri_destroy(lobby->uri); - struct GNUNET_IDENTITY_PublicKey public_zone; - GNUNET_IDENTITY_key_get_public(zone, &public_zone); + struct GNUNET_CRYPTO_PublicKey public_zone; + GNUNET_CRYPTO_key_get_public(zone, &public_zone); char *label; util_get_context_label(lobby->context->type, key, &label); diff --git a/src/gnunet_chat_uri.c b/src/gnunet_chat_uri.c @@ -1,6 +1,6 @@ /* This file is part of GNUnet. - Copyright (C) 2022 GNUnet e.V. + Copyright (C) 2022--2023 GNUnet e.V. GNUnet is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published @@ -25,7 +25,7 @@ #include "gnunet_chat_uri.h" struct GNUNET_CHAT_Uri* -uri_create (const struct GNUNET_IDENTITY_PublicKey *zone, +uri_create (const struct GNUNET_CRYPTO_PublicKey *zone, const char *label) { GNUNET_assert((zone) && (label)); diff --git a/src/gnunet_chat_uri.h b/src/gnunet_chat_uri.h @@ -1,6 +1,6 @@ /* This file is part of GNUnet. - Copyright (C) 2022 GNUnet e.V. + Copyright (C) 2022--2023 GNUnet e.V. GNUnet is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published @@ -25,14 +25,13 @@ #ifndef GNUNET_CHAT_URI_H_ #define GNUNET_CHAT_URI_H_ -#include <gnunet/gnunet_identity_service.h> #include <gnunet/gnunet_util_lib.h> #include "gnunet_chat_util.h" struct GNUNET_CHAT_Uri { - struct GNUNET_IDENTITY_PublicKey zone; + struct GNUNET_CRYPTO_PublicKey zone; char *label; }; @@ -45,7 +44,7 @@ struct GNUNET_CHAT_Uri * @return New chat uri */ struct GNUNET_CHAT_Uri* -uri_create (const struct GNUNET_IDENTITY_PublicKey *zone, +uri_create (const struct GNUNET_CRYPTO_PublicKey *zone, const char *label); /**