fixed problem with rhizome direct push / manifest import where

signatures were not being recorded.  Also fixed separate issue
where rhizomeprotocols tests expected selfsigned to be 1 on
receiver end, when it will never be, because the BK doesn't match.
rhizome direct push test in rhizomeprotocols now passes. #9
This commit is contained in:
gardners 2012-10-02 21:00:56 +09:30
parent 92a5423b17
commit 1c72778c50
4 changed files with 16 additions and 6 deletions

View File

@ -364,7 +364,7 @@ int rhizome_add_manifest(rhizome_manifest *m_in,int ttl)
service ? service : "NULL",
alloca_tohex_sid(m_in->cryptoSignPublic),
m_in->version
);
);
monitor_announce_bundle(m_in);
return 0;
}

View File

@ -1449,6 +1449,11 @@ int rhizome_import_from_files(const char *manifestpath,const char *filepath)
} else if (rhizome_manifest_verify(m) == -1) {
status = WHY("Could not verify manifest file.");
} else {
/* Make sure we store signatures */
m->manifest_bytes=m->manifest_all_bytes;
DEBUGF("selfsignedP=%d",
rhizome_is_self_signed(m));
/* Add the manifest and its associated file to the Rhizome database. */
m->dataFileName = strdup(filepath);
if (rhizome_manifest_check_file(m))

View File

@ -46,17 +46,18 @@ assert_manifest_complete() {
}
assert_rhizome_list() {
# PGS 20121002 - Removed sensitivity to self-signed flag, because it will be
# different between originator and a receiver of a bundle.
assertStdoutLineCount --stderr '==' $(($# + 2))
assertStdoutIs --stderr --line=1 -e '11\n'
assertStdoutIs --stderr --line=2 -e 'service:id:version:date:.inserttime:.selfsigned:filesize:filehash:sender:recipient:name\n'
local filename
for filename; do
re__selfsigned=1
case "$filename" in
*!) filename="${filename%!}"; re__selfsigned=0;;
esac
unpack_manifest_for_grep "$filename"
assertStdoutGrep --stderr --matches=1 "^$re_service:$re_manifestid:.*:$re__selfsigned:$re_filesize:$re_filehash:$re_sender:$re_recipient:$re_name\$"
assertStdoutGrep --stderr --matches=1 "^$re_service:$re_manifestid:.*:.*:$re_filesize:$re_filehash:$re_sender:$re_recipient:$re_name\$"
done
}

View File

@ -286,10 +286,14 @@ setup_Push() {
}
test_Push() {
executeOk_servald rhizome direct push
assert bundle_received_by $BID1 $VERSION1 +B
assert ! bundle_received_by $BID2 $VERSION2 +A
assert bundle_received_by $BID2 $VERSION2 +A
assert ! bundle_received_by $BID1 $VERSION1 +B
set_instance +A
executeOk_servald rhizome list ''
assert_rhizome_list file1 file2
set_instance +B
assert_received file1
executeOk_servald rhizome list ''
assert_rhizome_list file2
}
doc_Pull="One way pull bundle from unconnected node"