diff options
author | George Kadianakis <desnacked@riseup.net> | 2017-06-20 17:29:20 +0300 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2017-07-05 10:14:26 -0400 |
commit | 17bd118b4c3785873e61c2d0b03845e5bd6fefb3 (patch) | |
tree | 0608c9656b00af600ee56848423ae8322029a17e /src/or | |
parent | 0f3084c4f2b6018d4f8b5f6d6868c7c3801eb45d (diff) | |
download | tor-17bd118b4c3785873e61c2d0b03845e5bd6fefb3.tar.gz tor-17bd118b4c3785873e61c2d0b03845e5bd6fefb3.zip |
Add test that parses a hardcoded v2 descriptor.
Diffstat (limited to 'src/or')
-rw-r--r-- | src/or/rendcommon.c | 4 | ||||
-rw-r--r-- | src/or/rendcommon.h | 7 |
2 files changed, 10 insertions, 1 deletions
diff --git a/src/or/rendcommon.c b/src/or/rendcommon.c index e1236bdd0f..986bfde75f 100644 --- a/src/or/rendcommon.c +++ b/src/or/rendcommon.c @@ -8,6 +8,8 @@ * introducers, services, clients, and rendezvous points. **/ +#define RENDCOMMON_PRIVATE + #include "or.h" #include "circuitbuild.h" #include "config.h" @@ -395,7 +397,7 @@ rend_encrypt_v2_intro_points_stealth(char **encrypted_out, /** Attempt to parse the given <b>desc_str</b> and return true if this * succeeds, false otherwise. */ -static int +STATIC int rend_desc_v2_is_parsable(rend_encoded_v2_service_descriptor_t *desc) { rend_service_descriptor_t *test_parsed = NULL; diff --git a/src/or/rendcommon.h b/src/or/rendcommon.h index 94c2480d86..292f9277e8 100644 --- a/src/or/rendcommon.h +++ b/src/or/rendcommon.h @@ -63,5 +63,12 @@ int rend_non_anonymous_mode_enabled(const or_options_t *options); void assert_circ_anonymity_ok(origin_circuit_t *circ, const or_options_t *options); +#ifdef RENDCOMMON_PRIVATE + +STATIC int +rend_desc_v2_is_parsable(rend_encoded_v2_service_descriptor_t *desc); + +#endif + #endif |