diff options
author | TheJackiMonster <thejackimonster@gmail.com> | 2023-11-10 23:33:19 +0100 |
---|---|---|
committer | TheJackiMonster <thejackimonster@gmail.com> | 2023-11-10 23:33:19 +0100 |
commit | 3965ca9651d523cd59678f60d9da7061039e378b (patch) | |
tree | f058773271d6d1958daa07d81c477e14c00fead0 | |
parent | e60834efb1e50717351e683142d0e57d6b537ee2 (diff) | |
download | gnunet-3965ca9651d523cd59678f60d9da7061039e378b.tar.gz gnunet-3965ca9651d523cd59678f60d9da7061039e378b.zip |
-minor additional cleanup
Signed-off-by: TheJackiMonster <thejackimonster@gmail.com>
-rw-r--r-- | po/POTFILES.in | 3 | ||||
-rw-r--r-- | src/include/gnunet_crypto_lib.h | 12 | ||||
-rw-r--r-- | src/include/gnunet_messenger_service.h | 25 | ||||
-rw-r--r-- | src/util/crypto_ecc_setup.c | 15 |
4 files changed, 36 insertions, 19 deletions
diff --git a/po/POTFILES.in b/po/POTFILES.in index bc8be7a54..be88491cc 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in | |||
@@ -228,6 +228,9 @@ src/messenger/messenger_api_contact_store.c | |||
228 | src/messenger/messenger_api_handle.c | 228 | src/messenger/messenger_api_handle.c |
229 | src/messenger/messenger_api_list_tunnels.c | 229 | src/messenger/messenger_api_list_tunnels.c |
230 | src/messenger/messenger_api_message.c | 230 | src/messenger/messenger_api_message.c |
231 | src/messenger/messenger_api_message_kind.c | ||
232 | src/messenger/messenger_api_peer_store.c | ||
233 | src/messenger/messenger_api_queue_messages.c | ||
231 | src/messenger/messenger_api_room.c | 234 | src/messenger/messenger_api_room.c |
232 | src/messenger/messenger_api_util.c | 235 | src/messenger/messenger_api_util.c |
233 | src/messenger/plugin_gnsrecord_messenger.c | 236 | src/messenger/plugin_gnsrecord_messenger.c |
diff --git a/src/include/gnunet_crypto_lib.h b/src/include/gnunet_crypto_lib.h index 2a975a440..4fb5d8874 100644 --- a/src/include/gnunet_crypto_lib.h +++ b/src/include/gnunet_crypto_lib.h | |||
@@ -1655,8 +1655,10 @@ GNUNET_CRYPTO_get_peer_identity (const struct GNUNET_CONFIGURATION_Handle *cfg, | |||
1655 | * could not be retrieved | 1655 | * could not be retrieved |
1656 | */ | 1656 | */ |
1657 | enum GNUNET_GenericReturnValue | 1657 | enum GNUNET_GenericReturnValue |
1658 | GNUNET_CRYPTO_sign_by_peer_identity (const struct GNUNET_CONFIGURATION_Handle *cfg, | 1658 | GNUNET_CRYPTO_sign_by_peer_identity (const struct |
1659 | const struct GNUNET_CRYPTO_EccSignaturePurpose *purpose, | 1659 | GNUNET_CONFIGURATION_Handle *cfg, |
1660 | const struct | ||
1661 | GNUNET_CRYPTO_EccSignaturePurpose *purpose, | ||
1660 | struct GNUNET_CRYPTO_EddsaSignature *sig); | 1662 | struct GNUNET_CRYPTO_EddsaSignature *sig); |
1661 | 1663 | ||
1662 | 1664 | ||
@@ -1672,8 +1674,10 @@ GNUNET_CRYPTO_sign_by_peer_identity (const struct GNUNET_CONFIGURATION_Handle *c | |||
1672 | */ | 1674 | */ |
1673 | enum GNUNET_GenericReturnValue | 1675 | enum GNUNET_GenericReturnValue |
1674 | GNUNET_CRYPTO_verify_peer_identity (uint32_t purpose, | 1676 | GNUNET_CRYPTO_verify_peer_identity (uint32_t purpose, |
1675 | const struct GNUNET_CRYPTO_EccSignaturePurpose * validate, | 1677 | const struct |
1676 | const struct GNUNET_CRYPTO_EddsaSignature *sig, | 1678 | GNUNET_CRYPTO_EccSignaturePurpose *validate, |
1679 | const struct | ||
1680 | GNUNET_CRYPTO_EddsaSignature *sig, | ||
1677 | const struct GNUNET_PeerIdentity *identity); | 1681 | const struct GNUNET_PeerIdentity *identity); |
1678 | 1682 | ||
1679 | 1683 | ||
diff --git a/src/include/gnunet_messenger_service.h b/src/include/gnunet_messenger_service.h index 475f8e32e..5b03ddecf 100644 --- a/src/include/gnunet_messenger_service.h +++ b/src/include/gnunet_messenger_service.h | |||
@@ -94,7 +94,7 @@ struct GNUNET_MESSENGER_RoomEntryRecord | |||
94 | 94 | ||
95 | GNUNET_NETWORK_STRUCT_END | 95 | GNUNET_NETWORK_STRUCT_END |
96 | 96 | ||
97 | GNUNET_NETWORK_STRUCT_BEGIN | 97 | GNUNET_NETWORK_STRUCT_BEGIN |
98 | 98 | ||
99 | /** | 99 | /** |
100 | * A room details record specifies a custom name for a given room and | 100 | * A room details record specifies a custom name for a given room and |
@@ -105,7 +105,7 @@ struct GNUNET_MESSENGER_RoomDetailsRecord | |||
105 | /** | 105 | /** |
106 | * The custom name for the room. | 106 | * The custom name for the room. |
107 | */ | 107 | */ |
108 | char name [256]; | 108 | char name[256]; |
109 | 109 | ||
110 | /** | 110 | /** |
111 | * The flags of the room. | 111 | * The flags of the room. |
@@ -575,8 +575,10 @@ enum GNUNET_MESSENGER_MessageFlags | |||
575 | typedef void | 575 | typedef void |
576 | (*GNUNET_MESSENGER_MessageCallback) (void *cls, | 576 | (*GNUNET_MESSENGER_MessageCallback) (void *cls, |
577 | struct GNUNET_MESSENGER_Room *room, | 577 | struct GNUNET_MESSENGER_Room *room, |
578 | const struct GNUNET_MESSENGER_Contact *sender, | 578 | const struct |
579 | const struct GNUNET_MESSENGER_Message *message, | 579 | GNUNET_MESSENGER_Contact *sender, |
580 | const struct | ||
581 | GNUNET_MESSENGER_Message *message, | ||
580 | const struct GNUNET_HashCode *hash, | 582 | const struct GNUNET_HashCode *hash, |
581 | enum GNUNET_MESSENGER_MessageFlags flags); | 583 | enum GNUNET_MESSENGER_MessageFlags flags); |
582 | 584 | ||
@@ -589,9 +591,10 @@ typedef void | |||
589 | * @param[in] contact Contact handle | 591 | * @param[in] contact Contact handle |
590 | */ | 592 | */ |
591 | typedef int | 593 | typedef int |
592 | (*GNUNET_MESSENGER_MemberCallback) (void* cls, | 594 | (*GNUNET_MESSENGER_MemberCallback) (void *cls, |
593 | struct GNUNET_MESSENGER_Room *room, | 595 | struct GNUNET_MESSENGER_Room *room, |
594 | const struct GNUNET_MESSENGER_Contact *contact); | 596 | const struct |
597 | GNUNET_MESSENGER_Contact *contact); | ||
595 | 598 | ||
596 | /** | 599 | /** |
597 | * Set up a handle for the messenger related functions and connects to all necessary services. It will use the | 600 | * Set up a handle for the messenger related functions and connects to all necessary services. It will use the |
@@ -763,7 +766,8 @@ GNUNET_MESSENGER_get_sender (const struct GNUNET_MESSENGER_Room *room, | |||
763 | * @return Name of <i>contact</i> or NULL | 766 | * @return Name of <i>contact</i> or NULL |
764 | */ | 767 | */ |
765 | const char* | 768 | const char* |
766 | GNUNET_MESSENGER_contact_get_name (const struct GNUNET_MESSENGER_Contact *contact); | 769 | GNUNET_MESSENGER_contact_get_name (const struct |
770 | GNUNET_MESSENGER_Contact *contact); | ||
767 | 771 | ||
768 | /** | 772 | /** |
769 | * Get the public key used by the <i>contact</i> or NULL if the anonymous key was used. | 773 | * Get the public key used by the <i>contact</i> or NULL if the anonymous key was used. |
@@ -772,7 +776,8 @@ GNUNET_MESSENGER_contact_get_name (const struct GNUNET_MESSENGER_Contact *contac | |||
772 | * @return Public key used by <i>contact</i> or NULL | 776 | * @return Public key used by <i>contact</i> or NULL |
773 | */ | 777 | */ |
774 | const struct GNUNET_IDENTITY_PublicKey* | 778 | const struct GNUNET_IDENTITY_PublicKey* |
775 | GNUNET_MESSENGER_contact_get_key (const struct GNUNET_MESSENGER_Contact *contact); | 779 | GNUNET_MESSENGER_contact_get_key (const struct |
780 | GNUNET_MESSENGER_Contact *contact); | ||
776 | 781 | ||
777 | /** | 782 | /** |
778 | * Send a <i>message</i> into a <i>room</i>. If you opened the <i>room</i> all entered members will receive the | 783 | * Send a <i>message</i> into a <i>room</i>. If you opened the <i>room</i> all entered members will receive the |
@@ -795,7 +800,7 @@ GNUNET_MESSENGER_contact_get_key (const struct GNUNET_MESSENGER_Contact *contact | |||
795 | void | 800 | void |
796 | GNUNET_MESSENGER_send_message (struct GNUNET_MESSENGER_Room *room, | 801 | GNUNET_MESSENGER_send_message (struct GNUNET_MESSENGER_Room *room, |
797 | struct GNUNET_MESSENGER_Message *message, | 802 | struct GNUNET_MESSENGER_Message *message, |
798 | const struct GNUNET_MESSENGER_Contact* contact); | 803 | const struct GNUNET_MESSENGER_Contact *contact); |
799 | 804 | ||
800 | /** | 805 | /** |
801 | * Get the message in a <i>room</i> identified by its <i>hash</i>. | 806 | * Get the message in a <i>room</i> identified by its <i>hash</i>. |
@@ -821,7 +826,7 @@ GNUNET_MESSENGER_get_message (const struct GNUNET_MESSENGER_Room *room, | |||
821 | int | 826 | int |
822 | GNUNET_MESSENGER_iterate_members (struct GNUNET_MESSENGER_Room *room, | 827 | GNUNET_MESSENGER_iterate_members (struct GNUNET_MESSENGER_Room *room, |
823 | GNUNET_MESSENGER_MemberCallback callback, | 828 | GNUNET_MESSENGER_MemberCallback callback, |
824 | void* cls); | 829 | void *cls); |
825 | 830 | ||
826 | #if 0 /* keep Emacsens' auto-indent happy */ | 831 | #if 0 /* keep Emacsens' auto-indent happy */ |
827 | { | 832 | { |
diff --git a/src/util/crypto_ecc_setup.c b/src/util/crypto_ecc_setup.c index dd49049bc..2ee9ed931 100644 --- a/src/util/crypto_ecc_setup.c +++ b/src/util/crypto_ecc_setup.c | |||
@@ -290,8 +290,10 @@ GNUNET_CRYPTO_get_peer_identity (const struct GNUNET_CONFIGURATION_Handle *cfg, | |||
290 | 290 | ||
291 | 291 | ||
292 | enum GNUNET_GenericReturnValue | 292 | enum GNUNET_GenericReturnValue |
293 | GNUNET_CRYPTO_sign_by_peer_identity (const struct GNUNET_CONFIGURATION_Handle *cfg, | 293 | GNUNET_CRYPTO_sign_by_peer_identity (const struct |
294 | const struct GNUNET_CRYPTO_EccSignaturePurpose *purpose, | 294 | GNUNET_CONFIGURATION_Handle *cfg, |
295 | const struct | ||
296 | GNUNET_CRYPTO_EccSignaturePurpose *purpose, | ||
295 | struct GNUNET_CRYPTO_EddsaSignature *sig) | 297 | struct GNUNET_CRYPTO_EddsaSignature *sig) |
296 | { | 298 | { |
297 | struct GNUNET_CRYPTO_EddsaPrivateKey *priv; | 299 | struct GNUNET_CRYPTO_EddsaPrivateKey *priv; |
@@ -309,11 +311,14 @@ GNUNET_CRYPTO_sign_by_peer_identity (const struct GNUNET_CONFIGURATION_Handle *c | |||
309 | 311 | ||
310 | enum GNUNET_GenericReturnValue | 312 | enum GNUNET_GenericReturnValue |
311 | GNUNET_CRYPTO_verify_peer_identity (uint32_t purpose, | 313 | GNUNET_CRYPTO_verify_peer_identity (uint32_t purpose, |
312 | const struct GNUNET_CRYPTO_EccSignaturePurpose * validate, | 314 | const struct |
313 | const struct GNUNET_CRYPTO_EddsaSignature *sig, | 315 | GNUNET_CRYPTO_EccSignaturePurpose *validate, |
316 | const struct | ||
317 | GNUNET_CRYPTO_EddsaSignature *sig, | ||
314 | const struct GNUNET_PeerIdentity *identity) | 318 | const struct GNUNET_PeerIdentity *identity) |
315 | { | 319 | { |
316 | return GNUNET_CRYPTO_eddsa_verify_ (purpose, validate, sig, &identity->public_key); | 320 | return GNUNET_CRYPTO_eddsa_verify_ (purpose, validate, sig, |
321 | &identity->public_key); | ||
317 | } | 322 | } |
318 | 323 | ||
319 | 324 | ||