diff options
Diffstat (limited to 'src/fs/fs_publish_ublock.c')
-rw-r--r-- | src/fs/fs_publish_ublock.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/fs/fs_publish_ublock.c b/src/fs/fs_publish_ublock.c index c84b21ba8..18f4804d1 100644 --- a/src/fs/fs_publish_ublock.c +++ b/src/fs/fs_publish_ublock.c | |||
@@ -21,7 +21,7 @@ | |||
21 | /** | 21 | /** |
22 | * @file fs/fs_publish_ublock.c | 22 | * @file fs/fs_publish_ublock.c |
23 | * @brief publish a UBLOCK in GNUnet | 23 | * @brief publish a UBLOCK in GNUnet |
24 | * @see https://gnunet.org/encoding and #2564 | 24 | * @see https://gnunet.org/encoding and #2564 |
25 | * @author Krista Bennett | 25 | * @author Krista Bennett |
26 | * @author Christian Grothoff | 26 | * @author Christian Grothoff |
27 | */ | 27 | */ |
@@ -41,7 +41,7 @@ | |||
41 | * @param iv where to store the IV | 41 | * @param iv where to store the IV |
42 | * @param label label to use for key derivation | 42 | * @param label label to use for key derivation |
43 | * @param pub public key to use for key derivation | 43 | * @param pub public key to use for key derivation |
44 | */ | 44 | */ |
45 | static void | 45 | static void |
46 | derive_ublock_encryption_key (struct GNUNET_CRYPTO_SymmetricSessionKey *skey, | 46 | derive_ublock_encryption_key (struct GNUNET_CRYPTO_SymmetricSessionKey *skey, |
47 | struct GNUNET_CRYPTO_SymmetricInitializationVector *iv, | 47 | struct GNUNET_CRYPTO_SymmetricInitializationVector *iv, |
@@ -69,7 +69,7 @@ derive_ublock_encryption_key (struct GNUNET_CRYPTO_SymmetricSessionKey *skey, | |||
69 | * @param ns public key under which the UBlock was stored | 69 | * @param ns public key under which the UBlock was stored |
70 | * @param label label under which the UBlock was stored | 70 | * @param label label under which the UBlock was stored |
71 | * @param output where to write the result, has input_len bytes | 71 | * @param output where to write the result, has input_len bytes |
72 | */ | 72 | */ |
73 | void | 73 | void |
74 | GNUNET_FS_ublock_decrypt_ (const void *input, | 74 | GNUNET_FS_ublock_decrypt_ (const void *input, |
75 | size_t input_len, | 75 | size_t input_len, |
@@ -124,7 +124,7 @@ struct GNUNET_FS_PublishUblockContext | |||
124 | * @param msg NULL on success, otherwise an error message | 124 | * @param msg NULL on success, otherwise an error message |
125 | */ | 125 | */ |
126 | static void | 126 | static void |
127 | ublock_put_cont (void *cls, | 127 | ublock_put_cont (void *cls, |
128 | int32_t success, | 128 | int32_t success, |
129 | struct GNUNET_TIME_Absolute min_expiration, | 129 | struct GNUNET_TIME_Absolute min_expiration, |
130 | const char *msg) | 130 | const char *msg) |
@@ -221,7 +221,7 @@ GNUNET_FS_publish_ublock_ (struct GNUNET_FS_Handle *h, | |||
221 | } | 221 | } |
222 | size = sizeof (struct UBlock) + slen + mdsize + ulen; | 222 | size = sizeof (struct UBlock) + slen + mdsize + ulen; |
223 | 223 | ||
224 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 224 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
225 | "Publishing under identifier `%s'\n", | 225 | "Publishing under identifier `%s'\n", |
226 | label); | 226 | label); |
227 | /* get public key of the namespace */ | 227 | /* get public key of the namespace */ |
@@ -232,11 +232,11 @@ GNUNET_FS_publish_ublock_ (struct GNUNET_FS_Handle *h, | |||
232 | 232 | ||
233 | /* encrypt ublock */ | 233 | /* encrypt ublock */ |
234 | ub_enc = GNUNET_malloc (size); | 234 | ub_enc = GNUNET_malloc (size); |
235 | GNUNET_CRYPTO_symmetric_encrypt (&ub_plain[1], | 235 | GNUNET_CRYPTO_symmetric_encrypt (&ub_plain[1], |
236 | ulen + slen + mdsize, | 236 | ulen + slen + mdsize, |
237 | &skey, &iv, | 237 | &skey, &iv, |
238 | &ub_enc[1]); | 238 | &ub_enc[1]); |
239 | ub_enc->purpose.size = htonl (ulen + slen + mdsize + | 239 | ub_enc->purpose.size = htonl (ulen + slen + mdsize + |
240 | sizeof (struct UBlock) | 240 | sizeof (struct UBlock) |
241 | - sizeof (struct GNUNET_CRYPTO_EccSignature)); | 241 | - sizeof (struct GNUNET_CRYPTO_EccSignature)); |
242 | ub_enc->purpose.purpose = htonl (GNUNET_SIGNATURE_PURPOSE_FS_UBLOCK); | 242 | ub_enc->purpose.purpose = htonl (GNUNET_SIGNATURE_PURPOSE_FS_UBLOCK); |