link_handshake.trunnel (882B)
1 2 struct certs_cell { 3 u8 n_certs; 4 struct certs_cell_cert certs[n_certs]; 5 } 6 7 const CERTTYPE_RSA1024_ID_LINK = 1; 8 const CERTTYPE_RSA1024_ID_ID = 2; 9 const CERTTYPE_RSA1024_ID_AUTH = 3; 10 const CERTTYPE_ED_ID_SIGN = 4; 11 const CERTTYPE_ED_SIGN_LINK = 5; 12 const CERTTYPE_ED_SIGN_AUTH = 6; 13 const CERTTYPE_RSA1024_ID_EDID = 7; 14 15 struct certs_cell_cert { 16 u8 cert_type; 17 u16 cert_len; 18 u8 body[cert_len]; 19 } 20 21 struct rsa_ed_crosscert { 22 u8 ed_key[32]; 23 u32 expiration; 24 @ptr end_of_signed; 25 u8 sig_len; 26 u8 sig[sig_len]; // mismatches spec. 27 } 28 29 struct auth_challenge_cell { 30 u8 challenge[32]; 31 u16 n_methods; 32 u16 methods[n_methods]; 33 } 34 35 struct auth1 { 36 u8 type[8]; 37 u8 cid[32]; 38 u8 sid[32]; 39 u8 cid_ed[32]; 40 u8 sid_ed[32]; 41 u8 slog[32]; 42 u8 clog[32]; 43 u8 scert[32]; 44 u8 tlssecrets[32]; 45 @ptr end_of_fixed_part; 46 u8 rand[24]; 47 @ptr end_of_signed; 48 u8 sig[]; 49 }