aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2014-12-14 22:15:55 +0000
committerChristian Grothoff <christian@grothoff.org>2014-12-14 22:15:55 +0000
commit6c8fa85819a2b02b3c4a175a08c1779283eda209 (patch)
tree3d635a2aa58f321fbb8779b6e086113558dc1c52 /src/include
parent6d7c1dd00a193fc054d1f1588ae7c98dc95b6257 (diff)
downloadgnunet-6c8fa85819a2b02b3c4a175a08c1779283eda209.tar.gz
gnunet-6c8fa85819a2b02b3c4a175a08c1779283eda209.zip
fix key management issue with LOC signing identified in #3559
Diffstat (limited to 'src/include')
-rw-r--r--src/include/gnunet_fs_service.h28
-rw-r--r--src/include/gnunet_protocols.h12
2 files changed, 29 insertions, 11 deletions
diff --git a/src/include/gnunet_fs_service.h b/src/include/gnunet_fs_service.h
index 9f3ff0d12..9ea278d87 100644
--- a/src/include/gnunet_fs_service.h
+++ b/src/include/gnunet_fs_service.h
@@ -162,7 +162,8 @@ GNUNET_FS_uri_ksk_remove_keyword (struct GNUNET_FS_Uri *uri,
162 * @return NULL on error 162 * @return NULL on error
163 */ 163 */
164struct GNUNET_FS_Uri * 164struct GNUNET_FS_Uri *
165GNUNET_FS_uri_parse (const char *uri, char **emsg); 165GNUNET_FS_uri_parse (const char *uri,
166 char **emsg);
166 167
167 168
168/** 169/**
@@ -233,15 +234,19 @@ GNUNET_FS_uri_loc_get_expiration (const struct GNUNET_FS_Uri *uri);
233 234
234/** 235/**
235 * Construct a location URI (this peer will be used for the location). 236 * Construct a location URI (this peer will be used for the location).
237 * This function should only be called from within gnunet-service-fs,
238 * as it requires the peer's private key which is generally unavailable
239 * to processes directly under the user's control. However, for
240 * testing and as it logically fits under URIs, it is in this API.
236 * 241 *
237 * @param baseUri content offered by the sender 242 * @param base_uri content offered by the sender
238 * @param cfg configuration information (used to find our hostkey) 243 * @param sign_key private key of the peer
239 * @param expiration_time how long will the content be offered? 244 * @param expiration_time how long will the content be offered?
240 * @return the location URI, NULL on error 245 * @return the location URI, NULL on error
241 */ 246 */
242struct GNUNET_FS_Uri * 247struct GNUNET_FS_Uri *
243GNUNET_FS_uri_loc_create (const struct GNUNET_FS_Uri *baseUri, 248GNUNET_FS_uri_loc_create (const struct GNUNET_FS_Uri *base_uri,
244 const struct GNUNET_CONFIGURATION_Handle *cfg, 249 const struct GNUNET_CRYPTO_EddsaPrivateKey *sign_key,
245 struct GNUNET_TIME_Absolute expiration_time); 250 struct GNUNET_TIME_Absolute expiration_time);
246 251
247 252
@@ -285,7 +290,8 @@ GNUNET_FS_uri_dup (const struct GNUNET_FS_Uri *uri);
285 * if keywords is not legal (i.e. empty). 290 * if keywords is not legal (i.e. empty).
286 */ 291 */
287struct GNUNET_FS_Uri * 292struct GNUNET_FS_Uri *
288GNUNET_FS_uri_ksk_create (const char *keywords, char **emsg); 293GNUNET_FS_uri_ksk_create (const char *keywords,
294 char **emsg);
289 295
290 296
291/** 297/**
@@ -436,8 +442,9 @@ GNUNET_FS_uri_ksk_create_from_meta_data (const struct GNUNET_CONTAINER_MetaData
436 * @return #GNUNET_OK on success 442 * @return #GNUNET_OK on success
437 */ 443 */
438int 444int
439GNUNET_FS_getopt_set_keywords (struct GNUNET_GETOPT_CommandLineProcessorContext 445GNUNET_FS_getopt_set_keywords (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx,
440 *ctx, void *scls, const char *option, 446 void *scls,
447 const char *option,
441 const char *value); 448 const char *value);
442 449
443 450
@@ -454,8 +461,9 @@ GNUNET_FS_getopt_set_keywords (struct GNUNET_GETOPT_CommandLineProcessorContext
454 * @return #GNUNET_OK on success 461 * @return #GNUNET_OK on success
455 */ 462 */
456int 463int
457GNUNET_FS_getopt_set_metadata (struct GNUNET_GETOPT_CommandLineProcessorContext 464GNUNET_FS_getopt_set_metadata (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx,
458 *ctx, void *scls, const char *option, 465 void *scls,
466 const char *option,
459 const char *value); 467 const char *value);
460 468
461 469
diff --git a/src/include/gnunet_protocols.h b/src/include/gnunet_protocols.h
index f9e8df77f..1279dd703 100644
--- a/src/include/gnunet_protocols.h
+++ b/src/include/gnunet_protocols.h
@@ -1,6 +1,6 @@
1/* 1/*
2 This file is part of GNUnet. 2 This file is part of GNUnet.
3 (C) 2001-2013 Christian Grothoff (and other contributing authors) 3 (C) 2001-2014 Christian Grothoff (and other contributing authors)
4 4
5 GNUnet is free software; you can redistribute it and/or modify 5 GNUnet is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published 6 it under the terms of the GNU General Public License as published
@@ -459,6 +459,16 @@ extern "C"
459 ******************************************************************************/ 459 ******************************************************************************/
460 460
461/** 461/**
462 * Message sent by fs client to request LOC signature.
463 */
464#define GNUNET_MESSAGE_TYPE_FS_REQUEST_LOC_SIGN 126
465
466/**
467 * Reply sent by fs service with LOC signature.
468 */
469#define GNUNET_MESSAGE_TYPE_FS_REQUEST_LOC_SIGNATURE 127
470
471/**
462 * Message sent by fs client to start indexing. 472 * Message sent by fs client to start indexing.
463 */ 473 */
464#define GNUNET_MESSAGE_TYPE_FS_INDEX_START 128 474#define GNUNET_MESSAGE_TYPE_FS_INDEX_START 128