diff options
author | Julius Bünger <buenger@mytum.de> | 2018-09-20 01:15:53 +0200 |
---|---|---|
committer | Julius Bünger <buenger@mytum.de> | 2018-09-20 01:15:53 +0200 |
commit | 67f690896f5bbbcd40efaec79a7c36d2e339990b (patch) | |
tree | 3043d6ad4d5a422b17944b199faaf118cc1fdaf1 /src/rps/rps-test_util.c | |
parent | 69f439525cabfd0b65d5875e49d306588587cb23 (diff) | |
download | gnunet-67f690896f5bbbcd40efaec79a7c36d2e339990b.tar.gz gnunet-67f690896f5bbbcd40efaec79a7c36d2e339990b.zip |
Start changing architecture of rps service/client
Diffstat (limited to 'src/rps/rps-test_util.c')
-rw-r--r-- | src/rps/rps-test_util.c | 36 |
1 files changed, 19 insertions, 17 deletions
diff --git a/src/rps/rps-test_util.c b/src/rps/rps-test_util.c index ef39638bf..271c96648 100644 --- a/src/rps/rps-test_util.c +++ b/src/rps/rps-test_util.c | |||
@@ -379,23 +379,6 @@ auth_key_to_string (struct GNUNET_CRYPTO_AuthKey auth_key) | |||
379 | } | 379 | } |
380 | 380 | ||
381 | 381 | ||
382 | struct GNUNET_CRYPTO_AuthKey | ||
383 | string_to_auth_key (const char *str) | ||
384 | { | ||
385 | struct GNUNET_CRYPTO_AuthKey auth_key; | ||
386 | |||
387 | if (GNUNET_OK != | ||
388 | GNUNET_STRINGS_string_to_data (str, | ||
389 | strlen (str), | ||
390 | &auth_key.key, | ||
391 | sizeof (struct GNUNET_CRYPTO_AuthKey))) | ||
392 | { | ||
393 | LOG (GNUNET_ERROR_TYPE_WARNING, "Failed to convert string to data\n"); | ||
394 | } | ||
395 | |||
396 | return auth_key; | ||
397 | } | ||
398 | |||
399 | 382 | ||
400 | char * | 383 | char * |
401 | create_file (const char *name) | 384 | create_file (const char *name) |
@@ -435,6 +418,25 @@ create_file (const char *name) | |||
435 | 418 | ||
436 | #endif /* TO_FILE */ | 419 | #endif /* TO_FILE */ |
437 | 420 | ||
421 | |||
422 | struct GNUNET_CRYPTO_AuthKey | ||
423 | string_to_auth_key (const char *str) | ||
424 | { | ||
425 | struct GNUNET_CRYPTO_AuthKey auth_key; | ||
426 | |||
427 | if (GNUNET_OK != | ||
428 | GNUNET_STRINGS_string_to_data (str, | ||
429 | strlen (str), | ||
430 | &auth_key.key, | ||
431 | sizeof (struct GNUNET_CRYPTO_AuthKey))) | ||
432 | { | ||
433 | LOG (GNUNET_ERROR_TYPE_WARNING, "Failed to convert string to data\n"); | ||
434 | } | ||
435 | |||
436 | return auth_key; | ||
437 | } | ||
438 | |||
439 | |||
438 | /** | 440 | /** |
439 | * @brief Try to ensure that `/tmp/rps` exists. | 441 | * @brief Try to ensure that `/tmp/rps` exists. |
440 | * | 442 | * |