aboutsummaryrefslogtreecommitdiff
path: root/src/fs/fs_uri.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2013-09-30 22:01:13 +0000
committerChristian Grothoff <christian@grothoff.org>2013-09-30 22:01:13 +0000
commit7abf844d0d4de319f2b093d50b0334af9a9d3bda (patch)
tree212272d6aaf9e5530ce44418149b9158f1eb0f7c /src/fs/fs_uri.c
parent8556fe9ebd0c4f8e63577a43155ffede20607f41 (diff)
downloadgnunet-7abf844d0d4de319f2b093d50b0334af9a9d3bda.tar.gz
gnunet-7abf844d0d4de319f2b093d50b0334af9a9d3bda.zip
-fixing build issues in fs/set related to #3047
Diffstat (limited to 'src/fs/fs_uri.c')
-rw-r--r--src/fs/fs_uri.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/fs/fs_uri.c b/src/fs/fs_uri.c
index 67ce6d530..4b25e91ea 100644
--- a/src/fs/fs_uri.c
+++ b/src/fs/fs_uri.c
@@ -532,7 +532,7 @@ struct LocUriAssembly
532 /** 532 /**
533 * Peer offering the file. 533 * Peer offering the file.
534 */ 534 */
535 struct GNUNET_CRYPTO_EccPublicSignKey peer; 535 struct GNUNET_PeerIdentity peer;
536 536
537}; 537};
538GNUNET_NETWORK_STRUCT_END 538GNUNET_NETWORK_STRUCT_END
@@ -642,7 +642,7 @@ uri_loc_parse (const char *s, char **emsg)
642 ass.exptime = GNUNET_TIME_absolute_hton (et); 642 ass.exptime = GNUNET_TIME_absolute_hton (et);
643 if (GNUNET_OK != 643 if (GNUNET_OK !=
644 GNUNET_CRYPTO_ecc_verify (GNUNET_SIGNATURE_PURPOSE_PEER_PLACEMENT, 644 GNUNET_CRYPTO_ecc_verify (GNUNET_SIGNATURE_PURPOSE_PEER_PLACEMENT,
645 &ass.purpose, &sig, &ass.peer)) 645 &ass.purpose, &sig, &ass.peer.public_key))
646 { 646 {
647 *emsg = 647 *emsg =
648 GNUNET_strdup (_("SKS URI malformed (signature failed validation)")); 648 GNUNET_strdup (_("SKS URI malformed (signature failed validation)"));
@@ -832,7 +832,7 @@ GNUNET_FS_uri_ksk_remove_keyword (struct GNUNET_FS_Uri *uri,
832 * 832 *
833 * @param uri the location URI to inspect 833 * @param uri the location URI to inspect
834 * @param peer where to store the identify of the peer (presumably) offering the content 834 * @param peer where to store the identify of the peer (presumably) offering the content
835 * @return GNUNET_SYSERR if this is not a location URI, otherwise GNUNET_OK 835 * @return #GNUNET_SYSERR if this is not a location URI, otherwise #GNUNET_OK
836 */ 836 */
837int 837int
838GNUNET_FS_uri_loc_get_peer_identity (const struct GNUNET_FS_Uri *uri, 838GNUNET_FS_uri_loc_get_peer_identity (const struct GNUNET_FS_Uri *uri,
@@ -840,9 +840,7 @@ GNUNET_FS_uri_loc_get_peer_identity (const struct GNUNET_FS_Uri *uri,
840{ 840{
841 if (uri->type != GNUNET_FS_URI_LOC) 841 if (uri->type != GNUNET_FS_URI_LOC)
842 return GNUNET_SYSERR; 842 return GNUNET_SYSERR;
843 GNUNET_CRYPTO_hash (&uri->data.loc.peer, 843 *peer = uri->data.loc.peer;
844 sizeof (struct GNUNET_CRYPTO_EccPublicSignKey),
845 &peer->hashPubKey);
846 return GNUNET_OK; 844 return GNUNET_OK;
847} 845}
848 846
@@ -927,12 +925,12 @@ GNUNET_FS_uri_loc_create (const struct GNUNET_FS_Uri *baseUri,
927 ass.purpose.purpose = htonl (GNUNET_SIGNATURE_PURPOSE_PEER_PLACEMENT); 925 ass.purpose.purpose = htonl (GNUNET_SIGNATURE_PURPOSE_PEER_PLACEMENT);
928 ass.exptime = GNUNET_TIME_absolute_hton (et); 926 ass.exptime = GNUNET_TIME_absolute_hton (et);
929 ass.fi = baseUri->data.chk; 927 ass.fi = baseUri->data.chk;
930 ass.peer = my_public_key; 928 ass.peer.public_key = my_public_key;
931 uri = GNUNET_new (struct GNUNET_FS_Uri); 929 uri = GNUNET_new (struct GNUNET_FS_Uri);
932 uri->type = GNUNET_FS_URI_LOC; 930 uri->type = GNUNET_FS_URI_LOC;
933 uri->data.loc.fi = baseUri->data.chk; 931 uri->data.loc.fi = baseUri->data.chk;
934 uri->data.loc.expirationTime = et; 932 uri->data.loc.expirationTime = et;
935 uri->data.loc.peer = my_public_key; 933 uri->data.loc.peer.public_key = my_public_key;
936 GNUNET_assert (GNUNET_OK == 934 GNUNET_assert (GNUNET_OK ==
937 GNUNET_CRYPTO_ecc_sign (my_private_key, &ass.purpose, 935 GNUNET_CRYPTO_ecc_sign (my_private_key, &ass.purpose,
938 &uri->data.loc.contentSignature)); 936 &uri->data.loc.contentSignature));