return ret;
}
+#define GNUNET_FS_URI_KSK_PREFIX GNUNET_FS_URI_PREFIX GNUNET_FS_URI_KSK_INFIX
/**
* Parse a KSK URI.
GNUNET_assert (s != NULL);
slen = strlen (s);
- pos = strlen (GNUNET_FS_URI_PREFIX GNUNET_FS_URI_KSK_INFIX);
+ pos = strlen (GNUNET_FS_URI_KSK_PREFIX);
if ( (slen <= pos) ||
- (0 != strncmp (s, GNUNET_FS_URI_PREFIX GNUNET_FS_URI_KSK_INFIX,
+ (0 != strncmp (s, GNUNET_FS_URI_KSK_PREFIX,
pos) ) )
return NULL; /* not KSK URI */
if ( (s[slen - 1] == '+') ||
}
+#define GNUNET_FS_URI_SKS_PREFIX GNUNET_FS_URI_PREFIX GNUNET_FS_URI_SKS_INFIX
+
/**
* Parse an SKS URI.
*
GNUNET_assert (s != NULL);
slen = strlen (s);
- pos = strlen (GNUNET_FS_URI_PREFIX GNUNET_FS_URI_SKS_INFIX);
+ pos = strlen ( GNUNET_FS_URI_SKS_PREFIX);
if ( (slen <= pos) ||
- (0 != strncmp (s, GNUNET_FS_URI_PREFIX GNUNET_FS_URI_SKS_INFIX,
+ (0 != strncmp (s, GNUNET_FS_URI_SKS_PREFIX,
pos) ) )
return NULL; /* not an SKS URI */
if ( (slen < pos + sizeof (struct GNUNET_CRYPTO_HashAsciiEncoded)) ||
return ret;
}
+#define GNUNET_FS_URI_CHK_PREFIX GNUNET_FS_URI_PREFIX GNUNET_FS_URI_CHK_INFIX
+
/**
* Parse a CHK URI.
GNUNET_assert (s != NULL);
slen = strlen (s);
- pos = strlen (GNUNET_FS_URI_PREFIX GNUNET_FS_URI_CHK_INFIX);
+ pos = strlen (GNUNET_FS_URI_CHK_PREFIX);
if ( (slen < pos + 2 * sizeof (struct GNUNET_CRYPTO_HashAsciiEncoded) + 1) ||
- (0 != strncmp (s, GNUNET_FS_URI_PREFIX GNUNET_FS_URI_CHK_INFIX,
+ (0 != strncmp (s, GNUNET_FS_URI_CHK_PREFIX,
pos) ) )
return NULL; /* not a CHK URI */
if ( (s[pos + sizeof (struct GNUNET_CRYPTO_HashAsciiEncoded) - 1] != '.') ||
};
+#define GNUNET_FS_URI_LOC_PREFIX GNUNET_FS_URI_PREFIX GNUNET_FS_URI_LOC_INFIX
+
/**
* Parse a LOC URI.
* Also verifies validity of the location URI.
GNUNET_assert (s != NULL);
slen = strlen (s);
- pos = strlen (GNUNET_FS_URI_PREFIX GNUNET_FS_URI_LOC_INFIX);
+ pos = strlen ( GNUNET_FS_URI_LOC_PREFIX);
if ( (slen < pos + 2 * sizeof (struct GNUNET_CRYPTO_HashAsciiEncoded) + 1) ||
- (0 != strncmp (s, GNUNET_FS_URI_PREFIX GNUNET_FS_URI_LOC_INFIX,
+ (0 != strncmp (s, GNUNET_FS_URI_LOC_PREFIX,
pos) ) )
return NULL; /* not an SKS URI */
if ( (s[pos + sizeof (struct GNUNET_CRYPTO_HashAsciiEncoded) - 1] != '.') ||
}
ass.purpose.size = htonl(sizeof(struct LocUriAssembly));
ass.purpose.purpose = htonl(GNUNET_SIGNATURE_PURPOSE_PEER_PLACEMENT);
- et.value = exptime;
+ et.abs_value = exptime;
ass.exptime = GNUNET_TIME_absolute_hton (et);
if (GNUNET_OK !=
GNUNET_CRYPTO_rsa_verify (GNUNET_SIGNATURE_PURPOSE_PEER_PLACEMENT,
break;
}
if (0 == found)
- kl[kc++] = GNUNET_strdup (kp - 1);
+ kl[kc++] = GNUNET_strdup (kp);
}
ret = GNUNET_malloc (sizeof(struct GNUNET_FS_Uri));
ret->type = ksk;
(unsigned long long) GNUNET_ntohll (uri->data.loc.fi.file_length),
peerId,
peerSig,
- (unsigned long long) uri->data.loc.expirationTime.value);
+ (unsigned long long) uri->data.loc.expirationTime.abs_value);
GNUNET_free (peerSig);
GNUNET_free (peerId);
return ret;