//
// SSL_add_client_CA from 0xd3ad34 to 0xd3adc8 (148 bytes)
//
// 1 xrefs:
// > ??> @ 0x56be0
//
// 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
//
__int64 __fastcall SSL_add_client_CA(__int64 a1, __int64 a2)
{
__int64 subject_name; // x0
__int64 v5; // x20
__int64 v7; // x0
if ( !a2 )
return 0;
if ( !*(_QWORD *)(a1 + 472) )
{
v7 = OPENSSL_sk_new_null();
*(_QWORD *)(a1 + 472) = v7;
if ( !v7 )
return 0;
}
subject_name = X509_get_subject_name(a2);
v5 = X509_NAME_dup(subject_name);
if ( !v5 )
return 0;
if ( (unsigned int)OPENSSL_sk_push(*(_QWORD *)(a1 + 472), v5) )
return 1;
X509_NAME_free(v5);
return 0;
}