uris = GNUNET_FS_uri_to_string (uri);
slen = strlen (uris) + 1;
if (NULL == ulabel)
- ulen = 0;
+ ulen = 1;
else
ulen = strlen (ulabel) + 1;
size = mdsize + sizeof (struct UBlock) + slen + ulen;
}
ub_plain = GNUNET_malloc (size);
kbe = (char *) &ub_plain[1];
- memcpy (kbe, ulabel, ulen);
+ if (NULL != ulabel)
+ memcpy (kbe, ulabel, ulen);
kbe += ulen;
memcpy (kbe, uris, slen);
kbe += slen;
ub_enc->purpose.purpose = htonl (GNUNET_SIGNATURE_PURPOSE_FS_UBLOCK);
/* derive signing-key from 'label' and public key of the namespace */
- nsd = GNUNET_CRYPTO_ecc_key_derive (ns, label);
+ nsd = GNUNET_CRYPTO_ecc_key_derive (ns, label, "fs-ublock");
GNUNET_CRYPTO_ecc_key_get_public (nsd,
&ub_enc->verification_key);
GNUNET_assert (GNUNET_OK ==