//
// ssl_cert_set1_chain from 0x791308 to 0x791370 (104 bytes)
//
// 3 xrefs:
// > ssl3_ctrl @ 0x78fa38
// > ssl3_ctx_ctrl @ 0x790000
// > ??> @ 0x5afec
//
// 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
//
int __fastcall ssl_cert_set1_chain(int a1, int a2, int a3)
{
int v5; // r6
if ( !a3 )
return ssl_cert_set0_chain(a1, a2, 0);
v5 = X509_chain_up_ref(a3);
if ( !v5 )
return 0;
if ( !ssl_cert_set0_chain(a1, a2, v5) )
{
OPENSSL_sk_pop_free(v5, X509_free);
return 0;
}
return 1;
}