aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2022-11-04 11:18:46 +0100
committerChristian Grothoff <christian@grothoff.org>2022-11-04 11:18:46 +0100
commit145a04e3ac6763644a94b01e16b87964a0716ac7 (patch)
tree8e18d2ef2f8160f3ccf4632a31d0e5b00e8c61ff
parent33f28f86c77753783267cb2efe0c08d544bcb81e (diff)
downloadgnunet-145a04e3ac6763644a94b01e16b87964a0716ac7.tar.gz
gnunet-145a04e3ac6763644a94b01e16b87964a0716ac7.zip
update GANAv0.18.1-deb
m---------contrib/gana0
-rw-r--r--src/identity/identity_api.c14
2 files changed, 8 insertions, 6 deletions
diff --git a/contrib/gana b/contrib/gana
Subproject 9cdf68e03b5f947add17fe2c77768830b8c24f6 Subproject 6b9824cb4d4561f1167c7f518998a226a82222d
diff --git a/src/identity/identity_api.c b/src/identity/identity_api.c
index 3fd052277..ef2aacb78 100644
--- a/src/identity/identity_api.c
+++ b/src/identity/identity_api.c
@@ -26,6 +26,7 @@
26#include "platform.h" 26#include "platform.h"
27#include "gnunet_util_lib.h" 27#include "gnunet_util_lib.h"
28#include "gnunet_constants.h" 28#include "gnunet_constants.h"
29#include "gnunet_error_codes.h"
29#include "gnunet_protocols.h" 30#include "gnunet_protocols.h"
30#include "gnunet_identity_service.h" 31#include "gnunet_identity_service.h"
31#include "identity.h" 32#include "identity.h"
@@ -197,6 +198,7 @@ GNUNET_IDENTITY_key_get_public (const struct
197 return GNUNET_OK; 198 return GNUNET_OK;
198} 199}
199 200
201
200static enum GNUNET_GenericReturnValue 202static enum GNUNET_GenericReturnValue
201private_key_create (enum GNUNET_IDENTITY_KeyType ktype, 203private_key_create (enum GNUNET_IDENTITY_KeyType ktype,
202 struct GNUNET_IDENTITY_PrivateKey *key) 204 struct GNUNET_IDENTITY_PrivateKey *key)
@@ -616,7 +618,8 @@ GNUNET_IDENTITY_create (struct GNUNET_IDENTITY_Handle *h,
616 else 618 else
617 private_key = *privkey; 619 private_key = *privkey;
618 key_len = GNUNET_IDENTITY_private_key_get_length (&private_key); 620 key_len = GNUNET_IDENTITY_private_key_get_length (&private_key);
619 env = GNUNET_MQ_msg_extra (crm, slen + key_len, GNUNET_MESSAGE_TYPE_IDENTITY_CREATE); 621 env = GNUNET_MQ_msg_extra (crm, slen + key_len,
622 GNUNET_MESSAGE_TYPE_IDENTITY_CREATE);
620 crm->name_len = htons (slen); 623 crm->name_len = htons (slen);
621 crm->reserved = htons (0); 624 crm->reserved = htons (0);
622 GNUNET_IDENTITY_write_private_key_to_buffer (&private_key, 625 GNUNET_IDENTITY_write_private_key_to_buffer (&private_key,
@@ -840,6 +843,7 @@ GNUNET_IDENTITY_public_key_get_length (const struct
840 return -1; 843 return -1;
841} 844}
842 845
846
843ssize_t 847ssize_t
844GNUNET_IDENTITY_private_key_length_by_type (enum GNUNET_IDENTITY_KeyType kt) 848GNUNET_IDENTITY_private_key_length_by_type (enum GNUNET_IDENTITY_KeyType kt)
845{ 849{
@@ -858,7 +862,6 @@ GNUNET_IDENTITY_private_key_length_by_type (enum GNUNET_IDENTITY_KeyType kt)
858} 862}
859 863
860 864
861
862enum GNUNET_GenericReturnValue 865enum GNUNET_GenericReturnValue
863GNUNET_IDENTITY_read_public_key_from_buffer (const void *buffer, 866GNUNET_IDENTITY_read_public_key_from_buffer (const void *buffer,
864 size_t len, 867 size_t len,
@@ -901,6 +904,7 @@ GNUNET_IDENTITY_write_public_key_to_buffer (const struct
901 return length; 904 return length;
902} 905}
903 906
907
904enum GNUNET_GenericReturnValue 908enum GNUNET_GenericReturnValue
905GNUNET_IDENTITY_read_private_key_from_buffer (const void *buffer, 909GNUNET_IDENTITY_read_private_key_from_buffer (const void *buffer,
906 size_t len, 910 size_t len,
@@ -981,7 +985,6 @@ GNUNET_IDENTITY_signature_get_raw_length_by_type (uint32_t type)
981} 985}
982 986
983 987
984
985ssize_t 988ssize_t
986GNUNET_IDENTITY_read_signature_from_buffer (struct 989GNUNET_IDENTITY_read_signature_from_buffer (struct
987 GNUNET_IDENTITY_Signature *sig, 990 GNUNET_IDENTITY_Signature *sig,
@@ -1019,6 +1022,7 @@ GNUNET_IDENTITY_write_signature_to_buffer (const struct
1019 return length; 1022 return length;
1020} 1023}
1021 1024
1025
1022enum GNUNET_GenericReturnValue 1026enum GNUNET_GenericReturnValue
1023GNUNET_IDENTITY_sign_raw_ (const struct 1027GNUNET_IDENTITY_sign_raw_ (const struct
1024 GNUNET_IDENTITY_PrivateKey *priv, 1028 GNUNET_IDENTITY_PrivateKey *priv,
@@ -1046,7 +1050,6 @@ GNUNET_IDENTITY_sign_raw_ (const struct
1046} 1050}
1047 1051
1048 1052
1049
1050enum GNUNET_GenericReturnValue 1053enum GNUNET_GenericReturnValue
1051GNUNET_IDENTITY_sign_ (const struct 1054GNUNET_IDENTITY_sign_ (const struct
1052 GNUNET_IDENTITY_PrivateKey *priv, 1055 GNUNET_IDENTITY_PrivateKey *priv,
@@ -1133,8 +1136,6 @@ GNUNET_IDENTITY_signature_verify_raw_ (uint32_t purpose,
1133} 1136}
1134 1137
1135 1138
1136
1137
1138ssize_t 1139ssize_t
1139GNUNET_IDENTITY_encrypt (const void *block, 1140GNUNET_IDENTITY_encrypt (const void *block,
1140 size_t size, 1141 size_t size,
@@ -1228,6 +1229,7 @@ GNUNET_IDENTITY_private_key_to_string (const struct
1228 size); 1229 size);
1229} 1230}
1230 1231
1232
1231enum GNUNET_GenericReturnValue 1233enum GNUNET_GenericReturnValue
1232GNUNET_IDENTITY_public_key_from_string (const char *str, 1234GNUNET_IDENTITY_public_key_from_string (const char *str,
1233 struct GNUNET_IDENTITY_PublicKey *key) 1235 struct GNUNET_IDENTITY_PublicKey *key)