//
// tls_construct_client_certificate from 0xfc94a4 to 0xfc952c (136 bytes)
//
// 2 xrefs:
// > ossl_statem_client_construct_message @ 0xfca750
// > ??> @ 0xf24b8
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 13:15:25 +0000
//
__int64 __fastcall tls_construct_client_certificate(__int64 a1)
{
__int64 v2; // x1
__int64 v3; // x20
__int64 result; // x0
if ( *(_DWORD *)(*(_QWORD *)(a1 + 144) + 568LL) == 2 )
v2 = 0;
else
v2 = **(_QWORD **)(a1 + 328);
v3 = ssl3_output_cert_chain(a1, v2);
result = 1;
if ( !v3 )
{
ERR_put_error(20, 355, 68, "ssl/statem/statem_clnt.c", 2786);
ssl3_send_alert(a1, 2, 0x50u);
ossl_statem_set_error(a1);
return 0;
}
return result;
}