*/
#include "platform.h"
-#include "plugin_block.h"
+#include "gnunet_block_plugin.h"
#include "block_fs.h"
#include "gnunet_signatures.h"
if (block_size < sizeof (struct KBlock))
{
GNUNET_break_op (0);
- return GNUNET_SYSERR;
+ return GNUNET_NO;
}
kb = block;
if (block_size - sizeof (struct KBlock) !=
- sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded) )
{
GNUNET_break_op (0);
- return GNUNET_SYSERR;
+ return GNUNET_NO;
}
if (GNUNET_OK !=
GNUNET_CRYPTO_rsa_verify (GNUNET_SIGNATURE_PURPOSE_FS_KBLOCK,
&kb->keyspace))
{
GNUNET_break_op (0);
- return GNUNET_SYSERR;
+ return GNUNET_NO;
}
if (key != NULL)
GNUNET_CRYPTO_hash (&kb->keyspace,
if (block_size < sizeof (struct SBlock))
{
GNUNET_break_op (0);
- return GNUNET_SYSERR;
+ return GNUNET_NO;
}
sb = block;
if (block_size !=
ntohl (sb->purpose.size) + sizeof (struct GNUNET_CRYPTO_RsaSignature))
{
GNUNET_break_op (0);
- return GNUNET_SYSERR;
+ return GNUNET_NO;
}
if (GNUNET_OK !=
GNUNET_CRYPTO_rsa_verify (GNUNET_SIGNATURE_PURPOSE_FS_SBLOCK,
&sb->subspace))
{
GNUNET_break_op (0);
- return GNUNET_SYSERR;
+ return GNUNET_NO;
}
if (key != NULL)
*key = sb->identifier;
if (block_size < sizeof (struct NBlock))
{
GNUNET_break_op (0);
- return GNUNET_SYSERR;
+ return GNUNET_NO;
}
nb = block;
if (block_size - sizeof (struct NBlock) !=
- sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded) )
{
GNUNET_break_op (0);
- return GNUNET_SYSERR;
+ return GNUNET_NO;
}
if (block_size !=
ntohl (nb->ksk_purpose.size) + sizeof (struct GNUNET_CRYPTO_RsaSignature))
{
GNUNET_break_op (0);
- return GNUNET_SYSERR;
+ return GNUNET_NO;
}
if (GNUNET_OK !=
GNUNET_CRYPTO_rsa_verify (GNUNET_SIGNATURE_PURPOSE_FS_NBLOCK_KSIG,
&nb->keyspace))
{
GNUNET_break_op (0);
- return GNUNET_SYSERR;
+ return GNUNET_NO;
}
if (GNUNET_OK !=
GNUNET_CRYPTO_rsa_verify (GNUNET_SIGNATURE_PURPOSE_FS_NBLOCK,
&nb->subspace))
{
GNUNET_break_op (0);
- return GNUNET_SYSERR;
+ return GNUNET_NO;
}
/* FIXME: we used to xor ID with NSID,
why not here? */