diff options
author | Christian Grothoff <christian@grothoff.org> | 2015-07-08 20:48:24 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2015-07-08 20:48:24 +0000 |
commit | 57eb2ec3125dbbf60a9d1a2635ddc19345e2e5c1 (patch) | |
tree | bf33b5f8313e309634e2d61070ae99ab226f16d8 /src/util | |
parent | 728a40d587086cb9302f78347dd4d061083a424c (diff) | |
download | gnunet-57eb2ec3125dbbf60a9d1a2635ddc19345e2e5c1.tar.gz gnunet-57eb2ec3125dbbf60a9d1a2635ddc19345e2e5c1.zip |
DEFAULTSERVICES is dead, remove remains
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/crypto_rsa.c | 28 | ||||
-rw-r--r-- | src/util/os_network.c | 3 |
2 files changed, 28 insertions, 3 deletions
diff --git a/src/util/crypto_rsa.c b/src/util/crypto_rsa.c index d1ca760cf..58503b734 100644 --- a/src/util/crypto_rsa.c +++ b/src/util/crypto_rsa.c | |||
@@ -527,6 +527,32 @@ GNUNET_CRYPTO_rsa_private_key_cmp (struct GNUNET_CRYPTO_rsa_PrivateKey *p1, | |||
527 | 527 | ||
528 | 528 | ||
529 | /** | 529 | /** |
530 | * Obtain the length of the RSA key in bits. | ||
531 | * | ||
532 | * @param key the public key to introspect | ||
533 | * @return length of the key in bits | ||
534 | */ | ||
535 | unsigned int | ||
536 | GNUNET_CRYPTO_rsa_public_key_len (const struct GNUNET_CRYPTO_rsa_PublicKey *key) | ||
537 | { | ||
538 | gcry_mpi_t n; | ||
539 | int ret; | ||
540 | unsigned int rval; | ||
541 | |||
542 | ret = key_from_sexp (&n, key->sexp, "rsa", "n"); | ||
543 | if (0 != ret) | ||
544 | { | ||
545 | /* this is no public RSA key */ | ||
546 | GNUNET_break (0); | ||
547 | return 0; | ||
548 | } | ||
549 | rval = gcry_mpi_get_nbits (n); | ||
550 | gcry_mpi_release (n); | ||
551 | return rval; | ||
552 | } | ||
553 | |||
554 | |||
555 | /** | ||
530 | * Destroy a blinding key | 556 | * Destroy a blinding key |
531 | * | 557 | * |
532 | * @param bkey the blinding key to destroy | 558 | * @param bkey the blinding key to destroy |
@@ -549,7 +575,7 @@ GNUNET_CRYPTO_rsa_blinding_key_free (struct GNUNET_CRYPTO_rsa_BlindingKey *bkey) | |||
549 | */ | 575 | */ |
550 | size_t | 576 | size_t |
551 | GNUNET_CRYPTO_rsa_blinding_key_encode (const struct GNUNET_CRYPTO_rsa_BlindingKey *bkey, | 577 | GNUNET_CRYPTO_rsa_blinding_key_encode (const struct GNUNET_CRYPTO_rsa_BlindingKey *bkey, |
552 | char **buffer) | 578 | char **buffer) |
553 | { | 579 | { |
554 | size_t n; | 580 | size_t n; |
555 | char *b; | 581 | char *b; |
diff --git a/src/util/os_network.c b/src/util/os_network.c index 715fe5bd6..19b60b6b4 100644 --- a/src/util/os_network.c +++ b/src/util/os_network.c | |||
@@ -18,7 +18,6 @@ | |||
18 | Boston, MA 02110-1301, USA. | 18 | Boston, MA 02110-1301, USA. |
19 | 19 | ||
20 | */ | 20 | */ |
21 | |||
22 | /** | 21 | /** |
23 | * @file util/os_network.c | 22 | * @file util/os_network.c |
24 | * @brief function to determine available network interfaces | 23 | * @brief function to determine available network interfaces |
@@ -38,7 +37,7 @@ | |||
38 | * @brief Enumerate all network interfaces | 37 | * @brief Enumerate all network interfaces |
39 | * | 38 | * |
40 | * @param proc the callback function | 39 | * @param proc the callback function |
41 | * @param proc_cls closure for proc | 40 | * @param proc_cls closure for @a proc |
42 | */ | 41 | */ |
43 | void | 42 | void |
44 | GNUNET_OS_network_interfaces_list (GNUNET_OS_NetworkInterfaceProcessor proc, | 43 | GNUNET_OS_network_interfaces_list (GNUNET_OS_NetworkInterfaceProcessor proc, |