Update to trunnel 1.5.1

This commit is contained in:
Nick Mathewson 2016-12-08 16:56:24 -05:00
parent e1f00c5f86
commit bc68eedd79
16 changed files with 101 additions and 99 deletions

View File

@ -5,11 +5,13 @@ if test "x$TRUNNEL_PATH" != "x"; then
export PYTHONPATH
fi
OPTIONS="--require-version=1.5.1"
# Get all .trunnel files recursively from that directory so we can support
# multiple sub-directories.
for file in `find ./src/trunnel/ -name '*.trunnel'`; do
python -m trunnel --require-version=1.4 $file
python -m trunnel ${OPTIONS} $file
done
python -m trunnel --require-version=1.4 --write-c-files --target-dir=./src/ext/trunnel/
python -m trunnel ${OPTIONS} --write-c-files --target-dir=./src/ext/trunnel/

View File

@ -1,4 +1,4 @@
/* trunnel-impl.h -- copied from Trunnel v1.5
/* trunnel-impl.h -- copied from Trunnel v1.5.1
* https://gitweb.torproject.org/trunnel.git
* You probably shouldn't edit this file.
*/

View File

@ -1,4 +1,4 @@
/* trunnel.c -- copied from Trunnel v1.5
/* trunnel.c -- copied from Trunnel v1.5.1
* https://gitweb.torproject.org/trunnel.git
* You probably shouldn't edit this file.
*/

View File

@ -1,4 +1,4 @@
/* trunnel.h -- copied from Trunnel v1.5
/* trunnel.h -- copied from Trunnel v1.5.1
* https://gitweb.torproject.org/trunnel.git
* You probably shouldn't edit this file.
*/

View File

@ -1,4 +1,4 @@
/* ed25519_cert.c -- generated by Trunnel v1.5.
/* ed25519_cert.c -- generated by Trunnel v1.5.1.
* https://gitweb.torproject.org/trunnel.git
* You probably shouldn't edit this file.
*/
@ -58,7 +58,7 @@ create2_cell_body_free(create2_cell_body_t *obj)
}
uint16_t
create2_cell_body_get_handshake_type(create2_cell_body_t *inp)
create2_cell_body_get_handshake_type(const create2_cell_body_t *inp)
{
return inp->handshake_type;
}
@ -69,7 +69,7 @@ create2_cell_body_set_handshake_type(create2_cell_body_t *inp, uint16_t val)
return 0;
}
uint16_t
create2_cell_body_get_handshake_len(create2_cell_body_t *inp)
create2_cell_body_get_handshake_len(const create2_cell_body_t *inp)
{
return inp->handshake_len;
}
@ -333,7 +333,7 @@ ed25519_cert_extension_free(ed25519_cert_extension_t *obj)
}
uint16_t
ed25519_cert_extension_get_ext_length(ed25519_cert_extension_t *inp)
ed25519_cert_extension_get_ext_length(const ed25519_cert_extension_t *inp)
{
return inp->ext_length;
}
@ -344,7 +344,7 @@ ed25519_cert_extension_set_ext_length(ed25519_cert_extension_t *inp, uint16_t va
return 0;
}
uint8_t
ed25519_cert_extension_get_ext_type(ed25519_cert_extension_t *inp)
ed25519_cert_extension_get_ext_type(const ed25519_cert_extension_t *inp)
{
return inp->ext_type;
}
@ -355,7 +355,7 @@ ed25519_cert_extension_set_ext_type(ed25519_cert_extension_t *inp, uint8_t val)
return 0;
}
uint8_t
ed25519_cert_extension_get_ext_flags(ed25519_cert_extension_t *inp)
ed25519_cert_extension_get_ext_flags(const ed25519_cert_extension_t *inp)
{
return inp->ext_flags;
}
@ -733,7 +733,7 @@ extend1_cell_body_free(extend1_cell_body_t *obj)
}
uint32_t
extend1_cell_body_get_ipv4addr(extend1_cell_body_t *inp)
extend1_cell_body_get_ipv4addr(const extend1_cell_body_t *inp)
{
return inp->ipv4addr;
}
@ -744,7 +744,7 @@ extend1_cell_body_set_ipv4addr(extend1_cell_body_t *inp, uint32_t val)
return 0;
}
uint16_t
extend1_cell_body_get_port(extend1_cell_body_t *inp)
extend1_cell_body_get_port(const extend1_cell_body_t *inp)
{
return inp->port;
}
@ -1016,7 +1016,7 @@ link_specifier_free(link_specifier_t *obj)
}
uint8_t
link_specifier_get_ls_type(link_specifier_t *inp)
link_specifier_get_ls_type(const link_specifier_t *inp)
{
return inp->ls_type;
}
@ -1027,7 +1027,7 @@ link_specifier_set_ls_type(link_specifier_t *inp, uint8_t val)
return 0;
}
uint8_t
link_specifier_get_ls_len(link_specifier_t *inp)
link_specifier_get_ls_len(const link_specifier_t *inp)
{
return inp->ls_len;
}
@ -1038,7 +1038,7 @@ link_specifier_set_ls_len(link_specifier_t *inp, uint8_t val)
return 0;
}
uint32_t
link_specifier_get_un_ipv4_addr(link_specifier_t *inp)
link_specifier_get_un_ipv4_addr(const link_specifier_t *inp)
{
return inp->un_ipv4_addr;
}
@ -1049,7 +1049,7 @@ link_specifier_set_un_ipv4_addr(link_specifier_t *inp, uint32_t val)
return 0;
}
uint16_t
link_specifier_get_un_ipv4_port(link_specifier_t *inp)
link_specifier_get_un_ipv4_port(const link_specifier_t *inp)
{
return inp->un_ipv4_port;
}
@ -1096,7 +1096,7 @@ link_specifier_getconstarray_un_ipv6_addr(const link_specifier_t *inp)
return (const uint8_t *)link_specifier_getarray_un_ipv6_addr((link_specifier_t*)inp);
}
uint16_t
link_specifier_get_un_ipv6_port(link_specifier_t *inp)
link_specifier_get_un_ipv6_port(const link_specifier_t *inp)
{
return inp->un_ipv6_port;
}
@ -1615,7 +1615,7 @@ ed25519_cert_free(ed25519_cert_t *obj)
}
uint8_t
ed25519_cert_get_version(ed25519_cert_t *inp)
ed25519_cert_get_version(const ed25519_cert_t *inp)
{
return inp->version;
}
@ -1630,7 +1630,7 @@ ed25519_cert_set_version(ed25519_cert_t *inp, uint8_t val)
return 0;
}
uint8_t
ed25519_cert_get_cert_type(ed25519_cert_t *inp)
ed25519_cert_get_cert_type(const ed25519_cert_t *inp)
{
return inp->cert_type;
}
@ -1641,7 +1641,7 @@ ed25519_cert_set_cert_type(ed25519_cert_t *inp, uint8_t val)
return 0;
}
uint32_t
ed25519_cert_get_exp_field(ed25519_cert_t *inp)
ed25519_cert_get_exp_field(const ed25519_cert_t *inp)
{
return inp->exp_field;
}
@ -1652,7 +1652,7 @@ ed25519_cert_set_exp_field(ed25519_cert_t *inp, uint32_t val)
return 0;
}
uint8_t
ed25519_cert_get_cert_key_type(ed25519_cert_t *inp)
ed25519_cert_get_cert_key_type(const ed25519_cert_t *inp)
{
return inp->cert_key_type;
}
@ -1699,7 +1699,7 @@ ed25519_cert_getconstarray_certified_key(const ed25519_cert_t *inp)
return (const uint8_t *)ed25519_cert_getarray_certified_key((ed25519_cert_t*)inp);
}
uint8_t
ed25519_cert_get_n_extensions(ed25519_cert_t *inp)
ed25519_cert_get_n_extensions(const ed25519_cert_t *inp)
{
return inp->n_extensions;
}
@ -2123,7 +2123,7 @@ extend2_cell_body_free(extend2_cell_body_t *obj)
}
uint8_t
extend2_cell_body_get_n_spec(extend2_cell_body_t *inp)
extend2_cell_body_get_n_spec(const extend2_cell_body_t *inp)
{
return inp->n_spec;
}
@ -2458,7 +2458,7 @@ link_specifier_list_free(link_specifier_list_t *obj)
}
uint8_t
link_specifier_list_get_n_spec(link_specifier_list_t *inp)
link_specifier_list_get_n_spec(const link_specifier_list_t *inp)
{
return inp->n_spec;
}

View File

@ -1,4 +1,4 @@
/* ed25519_cert.h -- generated by by Trunnel v1.5.
/* ed25519_cert.h -- generated by by Trunnel v1.5.1.
* https://gitweb.torproject.org/trunnel.git
* You probably shouldn't edit this file.
*/
@ -129,7 +129,7 @@ int create2_cell_body_clear_errors(create2_cell_body_t *obj);
/** Return the value of the handshake_type field of the
* create2_cell_body_t in 'inp'
*/
uint16_t create2_cell_body_get_handshake_type(create2_cell_body_t *inp);
uint16_t create2_cell_body_get_handshake_type(const create2_cell_body_t *inp);
/** Set the value of the handshake_type field of the
* create2_cell_body_t in 'inp' to 'val'. Return 0 on success; return
* -1 and set the error code on 'inp' on failure.
@ -138,7 +138,7 @@ int create2_cell_body_set_handshake_type(create2_cell_body_t *inp, uint16_t val)
/** Return the value of the handshake_len field of the
* create2_cell_body_t in 'inp'
*/
uint16_t create2_cell_body_get_handshake_len(create2_cell_body_t *inp);
uint16_t create2_cell_body_get_handshake_len(const create2_cell_body_t *inp);
/** Set the value of the handshake_len field of the
* create2_cell_body_t in 'inp' to 'val'. Return 0 on success; return
* -1 and set the error code on 'inp' on failure.
@ -218,7 +218,7 @@ int ed25519_cert_extension_clear_errors(ed25519_cert_extension_t *obj);
/** Return the value of the ext_length field of the
* ed25519_cert_extension_t in 'inp'
*/
uint16_t ed25519_cert_extension_get_ext_length(ed25519_cert_extension_t *inp);
uint16_t ed25519_cert_extension_get_ext_length(const ed25519_cert_extension_t *inp);
/** Set the value of the ext_length field of the
* ed25519_cert_extension_t in 'inp' to 'val'. Return 0 on success;
* return -1 and set the error code on 'inp' on failure.
@ -227,7 +227,7 @@ int ed25519_cert_extension_set_ext_length(ed25519_cert_extension_t *inp, uint16_
/** Return the value of the ext_type field of the
* ed25519_cert_extension_t in 'inp'
*/
uint8_t ed25519_cert_extension_get_ext_type(ed25519_cert_extension_t *inp);
uint8_t ed25519_cert_extension_get_ext_type(const ed25519_cert_extension_t *inp);
/** Set the value of the ext_type field of the
* ed25519_cert_extension_t in 'inp' to 'val'. Return 0 on success;
* return -1 and set the error code on 'inp' on failure.
@ -236,7 +236,7 @@ int ed25519_cert_extension_set_ext_type(ed25519_cert_extension_t *inp, uint8_t v
/** Return the value of the ext_flags field of the
* ed25519_cert_extension_t in 'inp'
*/
uint8_t ed25519_cert_extension_get_ext_flags(ed25519_cert_extension_t *inp);
uint8_t ed25519_cert_extension_get_ext_flags(const ed25519_cert_extension_t *inp);
/** Set the value of the ext_flags field of the
* ed25519_cert_extension_t in 'inp' to 'val'. Return 0 on success;
* return -1 and set the error code on 'inp' on failure.
@ -340,7 +340,7 @@ int extend1_cell_body_clear_errors(extend1_cell_body_t *obj);
/** Return the value of the ipv4addr field of the extend1_cell_body_t
* in 'inp'
*/
uint32_t extend1_cell_body_get_ipv4addr(extend1_cell_body_t *inp);
uint32_t extend1_cell_body_get_ipv4addr(const extend1_cell_body_t *inp);
/** Set the value of the ipv4addr field of the extend1_cell_body_t in
* 'inp' to 'val'. Return 0 on success; return -1 and set the error
* code on 'inp' on failure.
@ -349,7 +349,7 @@ int extend1_cell_body_set_ipv4addr(extend1_cell_body_t *inp, uint32_t val);
/** Return the value of the port field of the extend1_cell_body_t in
* 'inp'
*/
uint16_t extend1_cell_body_get_port(extend1_cell_body_t *inp);
uint16_t extend1_cell_body_get_port(const extend1_cell_body_t *inp);
/** Set the value of the port field of the extend1_cell_body_t in
* 'inp' to 'val'. Return 0 on success; return -1 and set the error
* code on 'inp' on failure.
@ -442,7 +442,7 @@ int link_specifier_clear_errors(link_specifier_t *obj);
/** Return the value of the ls_type field of the link_specifier_t in
* 'inp'
*/
uint8_t link_specifier_get_ls_type(link_specifier_t *inp);
uint8_t link_specifier_get_ls_type(const link_specifier_t *inp);
/** Set the value of the ls_type field of the link_specifier_t in
* 'inp' to 'val'. Return 0 on success; return -1 and set the error
* code on 'inp' on failure.
@ -451,7 +451,7 @@ int link_specifier_set_ls_type(link_specifier_t *inp, uint8_t val);
/** Return the value of the ls_len field of the link_specifier_t in
* 'inp'
*/
uint8_t link_specifier_get_ls_len(link_specifier_t *inp);
uint8_t link_specifier_get_ls_len(const link_specifier_t *inp);
/** Set the value of the ls_len field of the link_specifier_t in 'inp'
* to 'val'. Return 0 on success; return -1 and set the error code on
* 'inp' on failure.
@ -460,7 +460,7 @@ int link_specifier_set_ls_len(link_specifier_t *inp, uint8_t val);
/** Return the value of the un_ipv4_addr field of the link_specifier_t
* in 'inp'
*/
uint32_t link_specifier_get_un_ipv4_addr(link_specifier_t *inp);
uint32_t link_specifier_get_un_ipv4_addr(const link_specifier_t *inp);
/** Set the value of the un_ipv4_addr field of the link_specifier_t in
* 'inp' to 'val'. Return 0 on success; return -1 and set the error
* code on 'inp' on failure.
@ -469,7 +469,7 @@ int link_specifier_set_un_ipv4_addr(link_specifier_t *inp, uint32_t val);
/** Return the value of the un_ipv4_port field of the link_specifier_t
* in 'inp'
*/
uint16_t link_specifier_get_un_ipv4_port(link_specifier_t *inp);
uint16_t link_specifier_get_un_ipv4_port(const link_specifier_t *inp);
/** Set the value of the un_ipv4_port field of the link_specifier_t in
* 'inp' to 'val'. Return 0 on success; return -1 and set the error
* code on 'inp' on failure.
@ -503,7 +503,7 @@ const uint8_t * link_specifier_getconstarray_un_ipv6_addr(const link_specifier_
/** Return the value of the un_ipv6_port field of the link_specifier_t
* in 'inp'
*/
uint16_t link_specifier_get_un_ipv6_port(link_specifier_t *inp);
uint16_t link_specifier_get_un_ipv6_port(const link_specifier_t *inp);
/** Set the value of the un_ipv6_port field of the link_specifier_t in
* 'inp' to 'val'. Return 0 on success; return -1 and set the error
* code on 'inp' on failure.
@ -632,7 +632,7 @@ int ed25519_cert_clear_errors(ed25519_cert_t *obj);
/** Return the value of the version field of the ed25519_cert_t in
* 'inp'
*/
uint8_t ed25519_cert_get_version(ed25519_cert_t *inp);
uint8_t ed25519_cert_get_version(const ed25519_cert_t *inp);
/** Set the value of the version field of the ed25519_cert_t in 'inp'
* to 'val'. Return 0 on success; return -1 and set the error code on
* 'inp' on failure.
@ -641,7 +641,7 @@ int ed25519_cert_set_version(ed25519_cert_t *inp, uint8_t val);
/** Return the value of the cert_type field of the ed25519_cert_t in
* 'inp'
*/
uint8_t ed25519_cert_get_cert_type(ed25519_cert_t *inp);
uint8_t ed25519_cert_get_cert_type(const ed25519_cert_t *inp);
/** Set the value of the cert_type field of the ed25519_cert_t in
* 'inp' to 'val'. Return 0 on success; return -1 and set the error
* code on 'inp' on failure.
@ -650,7 +650,7 @@ int ed25519_cert_set_cert_type(ed25519_cert_t *inp, uint8_t val);
/** Return the value of the exp_field field of the ed25519_cert_t in
* 'inp'
*/
uint32_t ed25519_cert_get_exp_field(ed25519_cert_t *inp);
uint32_t ed25519_cert_get_exp_field(const ed25519_cert_t *inp);
/** Set the value of the exp_field field of the ed25519_cert_t in
* 'inp' to 'val'. Return 0 on success; return -1 and set the error
* code on 'inp' on failure.
@ -659,7 +659,7 @@ int ed25519_cert_set_exp_field(ed25519_cert_t *inp, uint32_t val);
/** Return the value of the cert_key_type field of the ed25519_cert_t
* in 'inp'
*/
uint8_t ed25519_cert_get_cert_key_type(ed25519_cert_t *inp);
uint8_t ed25519_cert_get_cert_key_type(const ed25519_cert_t *inp);
/** Set the value of the cert_key_type field of the ed25519_cert_t in
* 'inp' to 'val'. Return 0 on success; return -1 and set the error
* code on 'inp' on failure.
@ -693,7 +693,7 @@ const uint8_t * ed25519_cert_getconstarray_certified_key(const ed25519_cert_t *
/** Return the value of the n_extensions field of the ed25519_cert_t
* in 'inp'
*/
uint8_t ed25519_cert_get_n_extensions(ed25519_cert_t *inp);
uint8_t ed25519_cert_get_n_extensions(const ed25519_cert_t *inp);
/** Set the value of the n_extensions field of the ed25519_cert_t in
* 'inp' to 'val'. Return 0 on success; return -1 and set the error
* code on 'inp' on failure.
@ -795,7 +795,7 @@ int extend2_cell_body_clear_errors(extend2_cell_body_t *obj);
/** Return the value of the n_spec field of the extend2_cell_body_t in
* 'inp'
*/
uint8_t extend2_cell_body_get_n_spec(extend2_cell_body_t *inp);
uint8_t extend2_cell_body_get_n_spec(const extend2_cell_body_t *inp);
/** Set the value of the n_spec field of the extend2_cell_body_t in
* 'inp' to 'val'. Return 0 on success; return -1 and set the error
* code on 'inp' on failure.
@ -893,7 +893,7 @@ int link_specifier_list_clear_errors(link_specifier_list_t *obj);
/** Return the value of the n_spec field of the link_specifier_list_t
* in 'inp'
*/
uint8_t link_specifier_list_get_n_spec(link_specifier_list_t *inp);
uint8_t link_specifier_list_get_n_spec(const link_specifier_list_t *inp);
/** Set the value of the n_spec field of the link_specifier_list_t in
* 'inp' to 'val'. Return 0 on success; return -1 and set the error
* code on 'inp' on failure.

View File

@ -1,4 +1,4 @@
/* cell_common.c -- generated by Trunnel v1.5.
/* cell_common.c -- generated by Trunnel v1.5.1.
* https://gitweb.torproject.org/trunnel.git
* You probably shouldn't edit this file.
*/
@ -58,7 +58,7 @@ cell_extension_fields_free(cell_extension_fields_t *obj)
}
uint8_t
cell_extension_fields_get_field_type(cell_extension_fields_t *inp)
cell_extension_fields_get_field_type(const cell_extension_fields_t *inp)
{
return inp->field_type;
}
@ -69,7 +69,7 @@ cell_extension_fields_set_field_type(cell_extension_fields_t *inp, uint8_t val)
return 0;
}
uint8_t
cell_extension_fields_get_field_len(cell_extension_fields_t *inp)
cell_extension_fields_get_field_len(const cell_extension_fields_t *inp)
{
return inp->field_len;
}
@ -340,7 +340,7 @@ cell_extension_free(cell_extension_t *obj)
}
uint8_t
cell_extension_get_num(cell_extension_t *inp)
cell_extension_get_num(const cell_extension_t *inp)
{
return inp->num;
}

View File

@ -1,4 +1,4 @@
/* cell_common.h -- generated by by Trunnel v1.5.
/* cell_common.h -- generated by by Trunnel v1.5.1.
* https://gitweb.torproject.org/trunnel.git
* You probably shouldn't edit this file.
*/
@ -64,7 +64,7 @@ int cell_extension_fields_clear_errors(cell_extension_fields_t *obj);
/** Return the value of the field_type field of the
* cell_extension_fields_t in 'inp'
*/
uint8_t cell_extension_fields_get_field_type(cell_extension_fields_t *inp);
uint8_t cell_extension_fields_get_field_type(const cell_extension_fields_t *inp);
/** Set the value of the field_type field of the
* cell_extension_fields_t in 'inp' to 'val'. Return 0 on success;
* return -1 and set the error code on 'inp' on failure.
@ -73,7 +73,7 @@ int cell_extension_fields_set_field_type(cell_extension_fields_t *inp, uint8_t v
/** Return the value of the field_len field of the
* cell_extension_fields_t in 'inp'
*/
uint8_t cell_extension_fields_get_field_len(cell_extension_fields_t *inp);
uint8_t cell_extension_fields_get_field_len(const cell_extension_fields_t *inp);
/** Set the value of the field_len field of the
* cell_extension_fields_t in 'inp' to 'val'. Return 0 on success;
* return -1 and set the error code on 'inp' on failure.
@ -150,7 +150,7 @@ const char *cell_extension_check(const cell_extension_t *obj);
int cell_extension_clear_errors(cell_extension_t *obj);
/** Return the value of the num field of the cell_extension_t in 'inp'
*/
uint8_t cell_extension_get_num(cell_extension_t *inp);
uint8_t cell_extension_get_num(const cell_extension_t *inp);
/** Set the value of the num field of the cell_extension_t in 'inp' to
* 'val'. Return 0 on success; return -1 and set the error code on
* 'inp' on failure.

View File

@ -1,4 +1,4 @@
/* cell_establish_intro.c -- generated by Trunnel v1.5.
/* cell_establish_intro.c -- generated by Trunnel v1.5.1.
* https://gitweb.torproject.org/trunnel.git
* You probably shouldn't edit this file.
*/
@ -75,7 +75,7 @@ hs_cell_establish_intro_get_start_cell(const hs_cell_establish_intro_t *inp)
return inp->start_cell;
}
uint8_t
hs_cell_establish_intro_get_auth_key_type(hs_cell_establish_intro_t *inp)
hs_cell_establish_intro_get_auth_key_type(const hs_cell_establish_intro_t *inp)
{
return inp->auth_key_type;
}
@ -90,7 +90,7 @@ hs_cell_establish_intro_set_auth_key_type(hs_cell_establish_intro_t *inp, uint8_
return 0;
}
uint16_t
hs_cell_establish_intro_get_auth_key_len(hs_cell_establish_intro_t *inp)
hs_cell_establish_intro_get_auth_key_len(const hs_cell_establish_intro_t *inp)
{
return inp->auth_key_len;
}
@ -232,7 +232,7 @@ hs_cell_establish_intro_getconstarray_handshake_mac(const hs_cell_establish_intr
return (const uint8_t *)hs_cell_establish_intro_getarray_handshake_mac((hs_cell_establish_intro_t*)inp);
}
uint16_t
hs_cell_establish_intro_get_sig_len(hs_cell_establish_intro_t *inp)
hs_cell_establish_intro_get_sig_len(const hs_cell_establish_intro_t *inp)
{
return inp->sig_len;
}

View File

@ -1,4 +1,4 @@
/* cell_establish_intro.h -- generated by by Trunnel v1.5.
/* cell_establish_intro.h -- generated by by Trunnel v1.5.1.
* https://gitweb.torproject.org/trunnel.git
* You probably shouldn't edit this file.
*/
@ -75,7 +75,7 @@ const uint8_t * hs_cell_establish_intro_get_start_cell(const hs_cell_establish_i
/** Return the value of the auth_key_type field of the
* hs_cell_establish_intro_t in 'inp'
*/
uint8_t hs_cell_establish_intro_get_auth_key_type(hs_cell_establish_intro_t *inp);
uint8_t hs_cell_establish_intro_get_auth_key_type(const hs_cell_establish_intro_t *inp);
/** Set the value of the auth_key_type field of the
* hs_cell_establish_intro_t in 'inp' to 'val'. Return 0 on success;
* return -1 and set the error code on 'inp' on failure.
@ -84,7 +84,7 @@ int hs_cell_establish_intro_set_auth_key_type(hs_cell_establish_intro_t *inp, ui
/** Return the value of the auth_key_len field of the
* hs_cell_establish_intro_t in 'inp'
*/
uint16_t hs_cell_establish_intro_get_auth_key_len(hs_cell_establish_intro_t *inp);
uint16_t hs_cell_establish_intro_get_auth_key_len(const hs_cell_establish_intro_t *inp);
/** Set the value of the auth_key_len field of the
* hs_cell_establish_intro_t in 'inp' to 'val'. Return 0 on success;
* return -1 and set the error code on 'inp' on failure.
@ -173,7 +173,7 @@ const uint8_t * hs_cell_establish_intro_getconstarray_handshake_mac(const hs_ce
/** Return the value of the sig_len field of the
* hs_cell_establish_intro_t in 'inp'
*/
uint16_t hs_cell_establish_intro_get_sig_len(hs_cell_establish_intro_t *inp);
uint16_t hs_cell_establish_intro_get_sig_len(const hs_cell_establish_intro_t *inp);
/** Set the value of the sig_len field of the
* hs_cell_establish_intro_t in 'inp' to 'val'. Return 0 on success;
* return -1 and set the error code on 'inp' on failure.

View File

@ -1,4 +1,4 @@
/* cell_introduce1.c -- generated by Trunnel v1.5.
/* cell_introduce1.c -- generated by Trunnel v1.5.1.
* https://gitweb.torproject.org/trunnel.git
* You probably shouldn't edit this file.
*/
@ -114,7 +114,7 @@ hs_cell_introduce1_getconstarray_legacy_key_id(const hs_cell_introduce1_t *inp)
return (const uint8_t *)hs_cell_introduce1_getarray_legacy_key_id((hs_cell_introduce1_t*)inp);
}
uint8_t
hs_cell_introduce1_get_auth_key_type(hs_cell_introduce1_t *inp)
hs_cell_introduce1_get_auth_key_type(const hs_cell_introduce1_t *inp)
{
return inp->auth_key_type;
}
@ -129,7 +129,7 @@ hs_cell_introduce1_set_auth_key_type(hs_cell_introduce1_t *inp, uint8_t val)
return 0;
}
uint16_t
hs_cell_introduce1_get_auth_key_len(hs_cell_introduce1_t *inp)
hs_cell_introduce1_get_auth_key_len(const hs_cell_introduce1_t *inp)
{
return inp->auth_key_len;
}
@ -543,7 +543,7 @@ hs_cell_introduce_ack_free(hs_cell_introduce_ack_t *obj)
}
uint16_t
hs_cell_introduce_ack_get_status(hs_cell_introduce_ack_t *inp)
hs_cell_introduce_ack_get_status(const hs_cell_introduce_ack_t *inp)
{
return inp->status;
}
@ -830,7 +830,7 @@ hs_cell_introduce_encrypted_set0_extensions(hs_cell_introduce_encrypted_t *inp,
return 0;
}
uint8_t
hs_cell_introduce_encrypted_get_onion_key_type(hs_cell_introduce_encrypted_t *inp)
hs_cell_introduce_encrypted_get_onion_key_type(const hs_cell_introduce_encrypted_t *inp)
{
return inp->onion_key_type;
}
@ -845,7 +845,7 @@ hs_cell_introduce_encrypted_set_onion_key_type(hs_cell_introduce_encrypted_t *in
return 0;
}
uint16_t
hs_cell_introduce_encrypted_get_onion_key_len(hs_cell_introduce_encrypted_t *inp)
hs_cell_introduce_encrypted_get_onion_key_len(const hs_cell_introduce_encrypted_t *inp)
{
return inp->onion_key_len;
}
@ -923,7 +923,7 @@ hs_cell_introduce_encrypted_setlen_onion_key(hs_cell_introduce_encrypted_t *inp,
return -1;
}
uint8_t
hs_cell_introduce_encrypted_get_nspec(hs_cell_introduce_encrypted_t *inp)
hs_cell_introduce_encrypted_get_nspec(const hs_cell_introduce_encrypted_t *inp)
{
return inp->nspec;
}

View File

@ -1,4 +1,4 @@
/* cell_introduce1.h -- generated by by Trunnel v1.5.
/* cell_introduce1.h -- generated by by Trunnel v1.5.1.
* https://gitweb.torproject.org/trunnel.git
* You probably shouldn't edit this file.
*/
@ -110,7 +110,7 @@ const uint8_t * hs_cell_introduce1_getconstarray_legacy_key_id(const hs_cell_in
/** Return the value of the auth_key_type field of the
* hs_cell_introduce1_t in 'inp'
*/
uint8_t hs_cell_introduce1_get_auth_key_type(hs_cell_introduce1_t *inp);
uint8_t hs_cell_introduce1_get_auth_key_type(const hs_cell_introduce1_t *inp);
/** Set the value of the auth_key_type field of the
* hs_cell_introduce1_t in 'inp' to 'val'. Return 0 on success; return
* -1 and set the error code on 'inp' on failure.
@ -119,7 +119,7 @@ int hs_cell_introduce1_set_auth_key_type(hs_cell_introduce1_t *inp, uint8_t val)
/** Return the value of the auth_key_len field of the
* hs_cell_introduce1_t in 'inp'
*/
uint16_t hs_cell_introduce1_get_auth_key_len(hs_cell_introduce1_t *inp);
uint16_t hs_cell_introduce1_get_auth_key_len(const hs_cell_introduce1_t *inp);
/** Set the value of the auth_key_len field of the
* hs_cell_introduce1_t in 'inp' to 'val'. Return 0 on success; return
* -1 and set the error code on 'inp' on failure.
@ -250,7 +250,7 @@ int hs_cell_introduce_ack_clear_errors(hs_cell_introduce_ack_t *obj);
/** Return the value of the status field of the
* hs_cell_introduce_ack_t in 'inp'
*/
uint16_t hs_cell_introduce_ack_get_status(hs_cell_introduce_ack_t *inp);
uint16_t hs_cell_introduce_ack_get_status(const hs_cell_introduce_ack_t *inp);
/** Set the value of the status field of the hs_cell_introduce_ack_t
* in 'inp' to 'val'. Return 0 on success; return -1 and set the error
* code on 'inp' on failure.
@ -358,7 +358,7 @@ int hs_cell_introduce_encrypted_set0_extensions(hs_cell_introduce_encrypted_t *i
/** Return the value of the onion_key_type field of the
* hs_cell_introduce_encrypted_t in 'inp'
*/
uint8_t hs_cell_introduce_encrypted_get_onion_key_type(hs_cell_introduce_encrypted_t *inp);
uint8_t hs_cell_introduce_encrypted_get_onion_key_type(const hs_cell_introduce_encrypted_t *inp);
/** Set the value of the onion_key_type field of the
* hs_cell_introduce_encrypted_t in 'inp' to 'val'. Return 0 on
* success; return -1 and set the error code on 'inp' on failure.
@ -367,7 +367,7 @@ int hs_cell_introduce_encrypted_set_onion_key_type(hs_cell_introduce_encrypted_t
/** Return the value of the onion_key_len field of the
* hs_cell_introduce_encrypted_t in 'inp'
*/
uint16_t hs_cell_introduce_encrypted_get_onion_key_len(hs_cell_introduce_encrypted_t *inp);
uint16_t hs_cell_introduce_encrypted_get_onion_key_len(const hs_cell_introduce_encrypted_t *inp);
/** Set the value of the onion_key_len field of the
* hs_cell_introduce_encrypted_t in 'inp' to 'val'. Return 0 on
* success; return -1 and set the error code on 'inp' on failure.
@ -410,7 +410,7 @@ int hs_cell_introduce_encrypted_setlen_onion_key(hs_cell_introduce_encrypted_t *
/** Return the value of the nspec field of the
* hs_cell_introduce_encrypted_t in 'inp'
*/
uint8_t hs_cell_introduce_encrypted_get_nspec(hs_cell_introduce_encrypted_t *inp);
uint8_t hs_cell_introduce_encrypted_get_nspec(const hs_cell_introduce_encrypted_t *inp);
/** Set the value of the nspec field of the
* hs_cell_introduce_encrypted_t in 'inp' to 'val'. Return 0 on
* success; return -1 and set the error code on 'inp' on failure.

View File

@ -1,4 +1,4 @@
/* link_handshake.c -- generated by Trunnel v1.5.
/* link_handshake.c -- generated by Trunnel v1.5.1.
* https://gitweb.torproject.org/trunnel.git
* You probably shouldn't edit this file.
*/
@ -94,7 +94,7 @@ auth_challenge_cell_getconstarray_challenge(const auth_challenge_cell_t *inp)
return (const uint8_t *)auth_challenge_cell_getarray_challenge((auth_challenge_cell_t*)inp);
}
uint16_t
auth_challenge_cell_get_n_methods(auth_challenge_cell_t *inp)
auth_challenge_cell_get_n_methods(const auth_challenge_cell_t *inp)
{
return inp->n_methods;
}
@ -362,7 +362,7 @@ auth_ctx_free(auth_ctx_t *obj)
}
uint8_t
auth_ctx_get_is_ed(auth_ctx_t *inp)
auth_ctx_get_is_ed(const auth_ctx_t *inp)
{
return inp->is_ed;
}
@ -402,7 +402,7 @@ certs_cell_cert_free(certs_cell_cert_t *obj)
}
uint8_t
certs_cell_cert_get_cert_type(certs_cell_cert_t *inp)
certs_cell_cert_get_cert_type(const certs_cell_cert_t *inp)
{
return inp->cert_type;
}
@ -413,7 +413,7 @@ certs_cell_cert_set_cert_type(certs_cell_cert_t *inp, uint8_t val)
return 0;
}
uint16_t
certs_cell_cert_get_cert_len(certs_cell_cert_t *inp)
certs_cell_cert_get_cert_len(const certs_cell_cert_t *inp)
{
return inp->cert_len;
}
@ -712,7 +712,7 @@ rsa_ed_crosscert_getconstarray_ed_key(const rsa_ed_crosscert_t *inp)
return (const uint8_t *)rsa_ed_crosscert_getarray_ed_key((rsa_ed_crosscert_t*)inp);
}
uint32_t
rsa_ed_crosscert_get_expiration(rsa_ed_crosscert_t *inp)
rsa_ed_crosscert_get_expiration(const rsa_ed_crosscert_t *inp)
{
return inp->expiration;
}
@ -728,7 +728,7 @@ rsa_ed_crosscert_get_end_of_signed(const rsa_ed_crosscert_t *inp)
return inp->end_of_signed;
}
uint8_t
rsa_ed_crosscert_get_sig_len(rsa_ed_crosscert_t *inp)
rsa_ed_crosscert_get_sig_len(const rsa_ed_crosscert_t *inp)
{
return inp->sig_len;
}
@ -1807,7 +1807,7 @@ certs_cell_free(certs_cell_t *obj)
}
uint8_t
certs_cell_get_n_certs(certs_cell_t *inp)
certs_cell_get_n_certs(const certs_cell_t *inp)
{
return inp->n_certs;
}

View File

@ -1,4 +1,4 @@
/* link_handshake.h -- generated by by Trunnel v1.5.
/* link_handshake.h -- generated by by Trunnel v1.5.1.
* https://gitweb.torproject.org/trunnel.git
* You probably shouldn't edit this file.
*/
@ -141,7 +141,7 @@ const uint8_t * auth_challenge_cell_getconstarray_challenge(const auth_challeng
/** Return the value of the n_methods field of the
* auth_challenge_cell_t in 'inp'
*/
uint16_t auth_challenge_cell_get_n_methods(auth_challenge_cell_t *inp);
uint16_t auth_challenge_cell_get_n_methods(const auth_challenge_cell_t *inp);
/** Set the value of the n_methods field of the auth_challenge_cell_t
* in 'inp' to 'val'. Return 0 on success; return -1 and set the error
* code on 'inp' on failure.
@ -190,7 +190,7 @@ auth_ctx_t *auth_ctx_new(void);
void auth_ctx_free(auth_ctx_t *victim);
/** Return the value of the is_ed field of the auth_ctx_t in 'inp'
*/
uint8_t auth_ctx_get_is_ed(auth_ctx_t *inp);
uint8_t auth_ctx_get_is_ed(const auth_ctx_t *inp);
/** Set the value of the is_ed field of the auth_ctx_t in 'inp' to
* 'val'. Return 0 on success; return -1 and set the error code on
* 'inp' on failure.
@ -235,7 +235,7 @@ int certs_cell_cert_clear_errors(certs_cell_cert_t *obj);
/** Return the value of the cert_type field of the certs_cell_cert_t
* in 'inp'
*/
uint8_t certs_cell_cert_get_cert_type(certs_cell_cert_t *inp);
uint8_t certs_cell_cert_get_cert_type(const certs_cell_cert_t *inp);
/** Set the value of the cert_type field of the certs_cell_cert_t in
* 'inp' to 'val'. Return 0 on success; return -1 and set the error
* code on 'inp' on failure.
@ -244,7 +244,7 @@ int certs_cell_cert_set_cert_type(certs_cell_cert_t *inp, uint8_t val);
/** Return the value of the cert_len field of the certs_cell_cert_t in
* 'inp'
*/
uint16_t certs_cell_cert_get_cert_len(certs_cell_cert_t *inp);
uint16_t certs_cell_cert_get_cert_len(const certs_cell_cert_t *inp);
/** Set the value of the cert_len field of the certs_cell_cert_t in
* 'inp' to 'val'. Return 0 on success; return -1 and set the error
* code on 'inp' on failure.
@ -344,7 +344,7 @@ const uint8_t * rsa_ed_crosscert_getconstarray_ed_key(const rsa_ed_crosscert_t
/** Return the value of the expiration field of the rsa_ed_crosscert_t
* in 'inp'
*/
uint32_t rsa_ed_crosscert_get_expiration(rsa_ed_crosscert_t *inp);
uint32_t rsa_ed_crosscert_get_expiration(const rsa_ed_crosscert_t *inp);
/** Set the value of the expiration field of the rsa_ed_crosscert_t in
* 'inp' to 'val'. Return 0 on success; return -1 and set the error
* code on 'inp' on failure.
@ -356,7 +356,7 @@ const uint8_t * rsa_ed_crosscert_get_end_of_signed(const rsa_ed_crosscert_t *inp
/** Return the value of the sig_len field of the rsa_ed_crosscert_t in
* 'inp'
*/
uint8_t rsa_ed_crosscert_get_sig_len(rsa_ed_crosscert_t *inp);
uint8_t rsa_ed_crosscert_get_sig_len(const rsa_ed_crosscert_t *inp);
/** Set the value of the sig_len field of the rsa_ed_crosscert_t in
* 'inp' to 'val'. Return 0 on success; return -1 and set the error
* code on 'inp' on failure.
@ -715,7 +715,7 @@ const char *certs_cell_check(const certs_cell_t *obj);
int certs_cell_clear_errors(certs_cell_t *obj);
/** Return the value of the n_certs field of the certs_cell_t in 'inp'
*/
uint8_t certs_cell_get_n_certs(certs_cell_t *inp);
uint8_t certs_cell_get_n_certs(const certs_cell_t *inp);
/** Set the value of the n_certs field of the certs_cell_t in 'inp' to
* 'val'. Return 0 on success; return -1 and set the error code on
* 'inp' on failure.

View File

@ -1,4 +1,4 @@
/* pwbox.c -- generated by Trunnel v1.5.
/* pwbox.c -- generated by Trunnel v1.5.1.
* https://gitweb.torproject.org/trunnel.git
* You probably shouldn't edit this file.
*/
@ -62,7 +62,7 @@ pwbox_encoded_free(pwbox_encoded_t *obj)
}
uint32_t
pwbox_encoded_get_fixedbytes0(pwbox_encoded_t *inp)
pwbox_encoded_get_fixedbytes0(const pwbox_encoded_t *inp)
{
return inp->fixedbytes0;
}
@ -77,7 +77,7 @@ pwbox_encoded_set_fixedbytes0(pwbox_encoded_t *inp, uint32_t val)
return 0;
}
uint32_t
pwbox_encoded_get_fixedbytes1(pwbox_encoded_t *inp)
pwbox_encoded_get_fixedbytes1(const pwbox_encoded_t *inp)
{
return inp->fixedbytes1;
}
@ -92,7 +92,7 @@ pwbox_encoded_set_fixedbytes1(pwbox_encoded_t *inp, uint32_t val)
return 0;
}
uint8_t
pwbox_encoded_get_header_len(pwbox_encoded_t *inp)
pwbox_encoded_get_header_len(const pwbox_encoded_t *inp)
{
return inp->header_len;
}

View File

@ -1,4 +1,4 @@
/* pwbox.h -- generated by by Trunnel v1.5.
/* pwbox.h -- generated by by Trunnel v1.5.1.
* https://gitweb.torproject.org/trunnel.git
* You probably shouldn't edit this file.
*/
@ -61,7 +61,7 @@ int pwbox_encoded_clear_errors(pwbox_encoded_t *obj);
/** Return the value of the fixedbytes0 field of the pwbox_encoded_t
* in 'inp'
*/
uint32_t pwbox_encoded_get_fixedbytes0(pwbox_encoded_t *inp);
uint32_t pwbox_encoded_get_fixedbytes0(const pwbox_encoded_t *inp);
/** Set the value of the fixedbytes0 field of the pwbox_encoded_t in
* 'inp' to 'val'. Return 0 on success; return -1 and set the error
* code on 'inp' on failure.
@ -70,7 +70,7 @@ int pwbox_encoded_set_fixedbytes0(pwbox_encoded_t *inp, uint32_t val);
/** Return the value of the fixedbytes1 field of the pwbox_encoded_t
* in 'inp'
*/
uint32_t pwbox_encoded_get_fixedbytes1(pwbox_encoded_t *inp);
uint32_t pwbox_encoded_get_fixedbytes1(const pwbox_encoded_t *inp);
/** Set the value of the fixedbytes1 field of the pwbox_encoded_t in
* 'inp' to 'val'. Return 0 on success; return -1 and set the error
* code on 'inp' on failure.
@ -79,7 +79,7 @@ int pwbox_encoded_set_fixedbytes1(pwbox_encoded_t *inp, uint32_t val);
/** Return the value of the header_len field of the pwbox_encoded_t in
* 'inp'
*/
uint8_t pwbox_encoded_get_header_len(pwbox_encoded_t *inp);
uint8_t pwbox_encoded_get_header_len(const pwbox_encoded_t *inp);
/** Set the value of the header_len field of the pwbox_encoded_t in
* 'inp' to 'val'. Return 0 on success; return -1 and set the error
* code on 'inp' on failure.