diff options
author | Christian Grothoff <christian@grothoff.org> | 2013-06-26 12:16:12 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2013-06-26 12:16:12 +0000 |
commit | 248fc3245a98731cf6fbb1bf460cd4e2e2d56de8 (patch) | |
tree | c0606c24a1c74d5f507d267b03d267a5cfaf4009 /src/regex/regex_internal.c | |
parent | c0101989bb0864a3688f57370e712c91c14ab1cd (diff) | |
download | gnunet-248fc3245a98731cf6fbb1bf460cd4e2e2d56de8.tar.gz gnunet-248fc3245a98731cf6fbb1bf460cd4e2e2d56de8.zip |
-moving REGEX_INTERNAL_check_proof to libgnunetregexblock, integrating proof check into block plugin
Diffstat (limited to 'src/regex/regex_internal.c')
-rw-r--r-- | src/regex/regex_internal.c | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/src/regex/regex_internal.c b/src/regex/regex_internal.c index 059aaaed6..4ad27c441 100644 --- a/src/regex/regex_internal.c +++ b/src/regex/regex_internal.c | |||
@@ -3329,31 +3329,6 @@ REGEX_INTERNAL_get_first_key (const char *input_string, size_t string_len, | |||
3329 | 3329 | ||
3330 | 3330 | ||
3331 | /** | 3331 | /** |
3332 | * Check if the given 'proof' matches the given 'key'. | ||
3333 | * | ||
3334 | * @param proof partial regex of a state. | ||
3335 | * @param key hash of a state. | ||
3336 | * | ||
3337 | * @return GNUNET_OK if the proof is valid for the given key. | ||
3338 | */ | ||
3339 | int | ||
3340 | REGEX_INTERNAL_check_proof (const char *proof, const struct GNUNET_HashCode *key) | ||
3341 | { | ||
3342 | struct GNUNET_HashCode key_check; | ||
3343 | |||
3344 | if (NULL == proof || NULL == key) | ||
3345 | { | ||
3346 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Proof check failed, was NULL.\n"); | ||
3347 | return GNUNET_NO; | ||
3348 | } | ||
3349 | |||
3350 | GNUNET_CRYPTO_hash (proof, strlen (proof), &key_check); | ||
3351 | return (0 == | ||
3352 | GNUNET_CRYPTO_hash_cmp (key, &key_check)) ? GNUNET_OK : GNUNET_NO; | ||
3353 | } | ||
3354 | |||
3355 | |||
3356 | /** | ||
3357 | * Recursive function that calls the iterator for each synthetic start state. | 3332 | * Recursive function that calls the iterator for each synthetic start state. |
3358 | * | 3333 | * |
3359 | * @param min_len minimum length of the path in the graph. | 3334 | * @param min_len minimum length of the path in the graph. |