[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r220 - GNUnet/src/applications/fs/ecrs
From: |
grothoff |
Subject: |
[GNUnet-SVN] r220 - GNUnet/src/applications/fs/ecrs |
Date: |
Wed, 9 Feb 2005 12:37:39 -0800 (PST) |
Author: grothoff
Date: 2005-02-09 12:37:38 -0800 (Wed, 09 Feb 2005)
New Revision: 220
Modified:
GNUnet/src/applications/fs/ecrs/keyspace.c
GNUnet/src/applications/fs/ecrs/search.c
Log:
gnunet-search now works
Modified: GNUnet/src/applications/fs/ecrs/keyspace.c
===================================================================
--- GNUnet/src/applications/fs/ecrs/keyspace.c 2005-02-09 20:31:28 UTC (rev
219)
+++ GNUnet/src/applications/fs/ecrs/keyspace.c 2005-02-09 20:37:38 UTC (rev
220)
@@ -1,6 +1,6 @@
/*
This file is part of GNUnet.
- (C) 2001, 2002, 2003, 2004 Christian Grothoff (and other contributing
authors)
+ (C) 2001, 2002, 2003, 2004, 2005 Christian Grothoff (and other
contributing authors)
GNUnet is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published
@@ -21,7 +21,7 @@
/**
* @file applications/fs/ecrs/upload.c
* @brief publish a URI in the keyword space
- * @see http://www.ovmj.org/GNUnet/encoding.php3
+ * @see http://gnunet.org/encoding.php3
* @author Krista Bennett
* @author Christian Grothoff
*/
@@ -122,6 +122,9 @@
hash(keywords[i],
strlen(keywords[i]),
&hc);
+ LOG(LOG_DEBUG,
+ "Encrypting KBlock with key %u.\n",
+ hc.a);
ECRS_encryptInPlace(&hc,
&kb[1],
mdsize + strlen(dstURI) + 1);
Modified: GNUnet/src/applications/fs/ecrs/search.c
===================================================================
--- GNUnet/src/applications/fs/ecrs/search.c 2005-02-09 20:31:28 UTC (rev
219)
+++ GNUnet/src/applications/fs/ecrs/search.c 2005-02-09 20:37:38 UTC (rev
220)
@@ -105,7 +105,7 @@
* queryCount pending searches.
*/
PendingSearch ** queries;
-
+
ECRS_SearchProgressCallback spcb;
void * spcbClosure;
@@ -329,12 +329,15 @@
if (size < sizeof(KBlock))
return SYSERR;
kb = (KBlock*) &value[1];
- ECRS_decryptInPlace(key,
+ LOG(LOG_DEBUG,
+ "Decrypting KBlock with key %u.\n",
+ ps->decryptKey.a);
+ ECRS_decryptInPlace(&ps->decryptKey,
&kb[1],
size - sizeof(KBlock));
j = sizeof(KBlock);
while ( (j < size) &&
- (((char*) &kb[1])[j] != '\0') )
+ (((char*)kb)[j] != '\0') )
j++;
if (j == size) {
BREAK(); /* kblock malformed */
@@ -343,7 +346,7 @@
dstURI = (char*) &kb[1];
j++;
if (OK != ECRS_deserializeMetaData(&fi.meta,
- &dstURI[j],
+ &((char*)kb)[j],
size - j)) {
BREAK(); /* kblock malformed */
return SYSERR;
@@ -354,7 +357,9 @@
ECRS_freeMetaData(fi.meta);
return SYSERR;
}
- sqc->spcb(&fi, &ps->decryptKey, sqc->spcbClosure);
+ sqc->spcb(&fi,
+ &ps->decryptKey,
+ sqc->spcbClosure);
ECRS_freeUri(fi.uri);
ECRS_freeMetaData(fi.meta);
return OK;
@@ -376,7 +381,7 @@
if (size < sizeof(KNBlock))
return SYSERR;
kb = (KNBlock*) &value[1];
- ECRS_decryptInPlace(key,
+ ECRS_decryptInPlace(&ps->decryptKey,
&kb->nblock,
size - sizeof(KBlock));
return processNBlock(&kb->nblock,
@@ -395,7 +400,7 @@
if (size < sizeof(SBlock))
return SYSERR;
sb = (SBlock*) &value[1];
- ECRS_decryptInPlace(key,
+ ECRS_decryptInPlace(&ps->decryptKey,
&sb->creationTime,
size
- sizeof(Signature)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r220 - GNUnet/src/applications/fs/ecrs,
grothoff <=