mirror of
https://github.com/servalproject/serval-dna.git
synced 2025-04-27 14:29:51 +00:00
improved debug message when rejecting an unsigned or incorrectly
signed manifest.
This commit is contained in:
parent
0b5a9665b2
commit
ae44826d7e
@ -129,9 +129,17 @@ rhizome_manifest *rhizome_read_manifest_file(const char *filename, int bufferP,
|
|||||||
memcmp(&m->signatories[0][0],manifest_bytes,
|
memcmp(&m->signatories[0][0],manifest_bytes,
|
||||||
crypto_sign_edwards25519sha512batch_PUBLICKEYBYTES))
|
crypto_sign_edwards25519sha512batch_PUBLICKEYBYTES))
|
||||||
{
|
{
|
||||||
if (debug&DEBUG_RHIZOME)
|
if (debug&DEBUG_RHIZOME) {
|
||||||
|
if (m->sig_count>0) {
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
"Manifest id variable does not match first signature block.\n");
|
"Manifest id variable does not match first signature block.\n");
|
||||||
|
fprintf(stderr," (signature key is %s)\n",
|
||||||
|
/* XXX bit of a hack that relies on SIDs and signing public keys being the same length */
|
||||||
|
overlay_render_sid(&m->signatories[0][0]));
|
||||||
|
} else {
|
||||||
|
fprintf(stderr,"Manifest has no signature blocks, but should have self-signature block");
|
||||||
|
}
|
||||||
|
}
|
||||||
m->errors++;
|
m->errors++;
|
||||||
m->selfSigned=0;
|
m->selfSigned=0;
|
||||||
} else m->selfSigned=1;
|
} else m->selfSigned=1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user