9 struct ed25519_cert_extension ext[n_extensions];
13 const CERTEXT_SIGNED_WITH_KEY = 4;
14 const CERTEXT_FLAG_AFFECTS_VALIDATION = 1;
16 struct ed25519_cert_extension {
20 union un[ext_type] with length ext_length {
21 CERTEXT_SIGNED_WITH_KEY : u8 signing_key[32];
22 default: u8 unparsed[];
28 const LS_LEGACY_ID = 0x02;
29 const LS_ED25519_ID = 0x03;
31 // XXX hs_link_specifier_dup() violates the opaqueness of link_specifier_t by
32 // taking its sizeof(). If we ever want to turn on TRUNNEL_OPAQUE, or
33 // if we ever make link_specifier contain other types, we will
34 // need to refactor that function to do the copy by encoding and decoding the
37 // amended from tor.trunnel
38 struct link_specifier {
41 union un[ls_type] with length ls_len {
42 LS_IPV4: u32 ipv4_addr; u16 ipv4_port;
43 LS_IPV6: u8 ipv6_addr[16]; u16 ipv6_port;
44 LS_LEGACY_ID: u8 legacy_id[20];
45 LS_ED25519_ID: u8 ed25519_id[32];
46 default: u8 unrecognized[];
50 struct link_specifier_list {
52 struct link_specifier spec[n_spec];
55 struct extend1_cell_body {
62 struct create2_cell_body {
65 u8 handshake_data[handshake_len];
68 struct extend2_cell_body {
70 struct link_specifier ls[n_spec];
71 struct create2_cell_body create2;