//
// ssl_cert_add0_chain_cert from 0xd3a548 to 0xd3a5e8 (160 bytes)
//
// 4 xrefs:
// > ssl3_ctrl @ 0xd38fa0
// > ssl3_ctx_ctrl @ 0xd39598
// > ssl_cert_add1_chain_cert @ 0xd3a5f8
// > ??> @ 0xa86f0
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
bool __fastcall ssl_cert_add0_chain_cert(__int64 a1, __int64 a2, __int64 a3)
{
__int64 *v3; // x3
__int64 v4; // x20
unsigned int v6; // w0
__int64 v7; // x0
if ( a1 )
v3 = *(__int64 **)(a1 + 328);
else
v3 = *(__int64 **)(a2 + 288);
v4 = *v3;
if ( *v3 )
{
v6 = ssl_security_cert(a1, a2, a3, 0, 0);
if ( v6 == 1 )
{
v7 = *(_QWORD *)(v4 + 16);
if ( v7 )
return (unsigned int)OPENSSL_sk_push(v7, a3) != 0;
v7 = OPENSSL_sk_new_null();
*(_QWORD *)(v4 + 16) = v7;
if ( v7 )
return (unsigned int)OPENSSL_sk_push(v7, a3) != 0;
}
else
{
ERR_put_error(20, 346, v6, "ssl/ssl_cert.c", 305);
}
}
return 0;
}