Merge branch 'maint-0.3.0' into release-0.3.0
This commit is contained in:
commit
b2e500f95b
|
@ -0,0 +1,6 @@
|
||||||
|
o Minor bugfix (compilation):
|
||||||
|
- Functions in hs_service.c was only compiled for unit test making the
|
||||||
|
created object (.o) contain no symbols in src/or/libor.a resulting in a
|
||||||
|
compilation warning from clang. We now expose those functions for the
|
||||||
|
unit tests. This will be changed in 0.3.2 release. Fixes bug 21825.;
|
||||||
|
bugfix on tor-0.3.0.1-alpha.
|
|
@ -6,8 +6,6 @@
|
||||||
* \brief Implement next generation hidden service functionality
|
* \brief Implement next generation hidden service functionality
|
||||||
**/
|
**/
|
||||||
|
|
||||||
#define HS_SERVICE_PRIVATE
|
|
||||||
|
|
||||||
#include "or.h"
|
#include "or.h"
|
||||||
#include "relay.h"
|
#include "relay.h"
|
||||||
#include "rendservice.h"
|
#include "rendservice.h"
|
||||||
|
@ -22,14 +20,12 @@
|
||||||
|
|
||||||
/* XXX We don't currently use these functions, apart from generating unittest
|
/* XXX We don't currently use these functions, apart from generating unittest
|
||||||
data. When we start implementing the service-side support for prop224 we
|
data. When we start implementing the service-side support for prop224 we
|
||||||
should revisit these functions and use them. For now we mark them as
|
should revisit these functions and use them. */
|
||||||
unittest-only code: */
|
|
||||||
#ifdef TOR_UNIT_TESTS
|
|
||||||
|
|
||||||
/** Given an ESTABLISH_INTRO <b>cell</b>, encode it and place its payload in
|
/** Given an ESTABLISH_INTRO <b>cell</b>, encode it and place its payload in
|
||||||
* <b>buf_out</b> which has size <b>buf_out_len</b>. Return the number of
|
* <b>buf_out</b> which has size <b>buf_out_len</b>. Return the number of
|
||||||
* bytes written, or a negative integer if there was an error. */
|
* bytes written, or a negative integer if there was an error. */
|
||||||
STATIC ssize_t
|
ssize_t
|
||||||
get_establish_intro_payload(uint8_t *buf_out, size_t buf_out_len,
|
get_establish_intro_payload(uint8_t *buf_out, size_t buf_out_len,
|
||||||
const hs_cell_establish_intro_t *cell)
|
const hs_cell_establish_intro_t *cell)
|
||||||
{
|
{
|
||||||
|
@ -59,7 +55,7 @@ set_cell_extensions(hs_cell_establish_intro_t *cell)
|
||||||
* return an ESTABLISH_INTRO cell. Return NULL if something went wrong. The
|
* return an ESTABLISH_INTRO cell. Return NULL if something went wrong. The
|
||||||
* returned cell is allocated on the heap and it's the responsibility of the
|
* returned cell is allocated on the heap and it's the responsibility of the
|
||||||
* caller to free it. */
|
* caller to free it. */
|
||||||
STATIC hs_cell_establish_intro_t *
|
hs_cell_establish_intro_t *
|
||||||
generate_establish_intro_cell(const uint8_t *circuit_key_material,
|
generate_establish_intro_cell(const uint8_t *circuit_key_material,
|
||||||
size_t circuit_key_material_len)
|
size_t circuit_key_material_len)
|
||||||
{
|
{
|
||||||
|
@ -174,5 +170,3 @@ generate_establish_intro_cell(const uint8_t *circuit_key_material,
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* TOR_UNIT_TESTS */
|
|
||||||
|
|
||||||
|
|
|
@ -12,21 +12,16 @@
|
||||||
#include "or.h"
|
#include "or.h"
|
||||||
#include "hs/cell_establish_intro.h"
|
#include "hs/cell_establish_intro.h"
|
||||||
|
|
||||||
#ifdef HS_SERVICE_PRIVATE
|
/* These functions are only used by unit tests and we need to expose them else
|
||||||
|
* hs_service.o ends up with no symbols in libor.a which makes clang throw a
|
||||||
|
* warning at compile time. See #21825. */
|
||||||
|
|
||||||
#ifdef TOR_UNIT_TESTS
|
hs_cell_establish_intro_t *
|
||||||
|
|
||||||
STATIC hs_cell_establish_intro_t *
|
|
||||||
generate_establish_intro_cell(const uint8_t *circuit_key_material,
|
generate_establish_intro_cell(const uint8_t *circuit_key_material,
|
||||||
size_t circuit_key_material_len);
|
size_t circuit_key_material_len);
|
||||||
|
ssize_t
|
||||||
STATIC ssize_t
|
|
||||||
get_establish_intro_payload(uint8_t *buf, size_t buf_len,
|
get_establish_intro_payload(uint8_t *buf, size_t buf_len,
|
||||||
const hs_cell_establish_intro_t *cell);
|
const hs_cell_establish_intro_t *cell);
|
||||||
|
|
||||||
#endif /* TOR_UNIT_TESTS */
|
|
||||||
|
|
||||||
#endif /* HS_SERVICE_PRIVATE */
|
|
||||||
|
|
||||||
#endif /* TOR_HS_SERVICE_H */
|
#endif /* TOR_HS_SERVICE_H */
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue