diff options
author | Christian Grothoff <christian@grothoff.org> | 2022-11-04 11:18:46 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2022-11-04 11:18:46 +0100 |
commit | 145a04e3ac6763644a94b01e16b87964a0716ac7 (patch) | |
tree | 8e18d2ef2f8160f3ccf4632a31d0e5b00e8c61ff | |
parent | 33f28f86c77753783267cb2efe0c08d544bcb81e (diff) | |
download | gnunet-145a04e3ac6763644a94b01e16b87964a0716ac7.tar.gz gnunet-145a04e3ac6763644a94b01e16b87964a0716ac7.zip |
update GANAv0.18.1-deb
m--------- | contrib/gana | 0 | ||||
-rw-r--r-- | src/identity/identity_api.c | 14 |
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 | |||
200 | static enum GNUNET_GenericReturnValue | 202 | static enum GNUNET_GenericReturnValue |
201 | private_key_create (enum GNUNET_IDENTITY_KeyType ktype, | 203 | private_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 | |||
843 | ssize_t | 847 | ssize_t |
844 | GNUNET_IDENTITY_private_key_length_by_type (enum GNUNET_IDENTITY_KeyType kt) | 848 | GNUNET_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 | |||
862 | enum GNUNET_GenericReturnValue | 865 | enum GNUNET_GenericReturnValue |
863 | GNUNET_IDENTITY_read_public_key_from_buffer (const void *buffer, | 866 | GNUNET_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 | |||
904 | enum GNUNET_GenericReturnValue | 908 | enum GNUNET_GenericReturnValue |
905 | GNUNET_IDENTITY_read_private_key_from_buffer (const void *buffer, | 909 | GNUNET_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 | |||
985 | ssize_t | 988 | ssize_t |
986 | GNUNET_IDENTITY_read_signature_from_buffer (struct | 989 | GNUNET_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 | |||
1022 | enum GNUNET_GenericReturnValue | 1026 | enum GNUNET_GenericReturnValue |
1023 | GNUNET_IDENTITY_sign_raw_ (const struct | 1027 | GNUNET_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 | |||
1050 | enum GNUNET_GenericReturnValue | 1053 | enum GNUNET_GenericReturnValue |
1051 | GNUNET_IDENTITY_sign_ (const struct | 1054 | GNUNET_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 | |||
1138 | ssize_t | 1139 | ssize_t |
1139 | GNUNET_IDENTITY_encrypt (const void *block, | 1140 | GNUNET_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 | |||
1231 | enum GNUNET_GenericReturnValue | 1233 | enum GNUNET_GenericReturnValue |
1232 | GNUNET_IDENTITY_public_key_from_string (const char *str, | 1234 | GNUNET_IDENTITY_public_key_from_string (const char *str, |
1233 | struct GNUNET_IDENTITY_PublicKey *key) | 1235 | struct GNUNET_IDENTITY_PublicKey *key) |