//
// SSL_CTX_add_client_CA from 0x9a6838 to 0x9a68b8 (128 bytes)
//
// 2 xrefs:
// > sub_8539B8 @ 0x854894
// > ??> @ 0x683bc
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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 12:06:51 +0000
//
int __fastcall SSL_CTX_add_client_CA(int a1, int a2)
{
int subject_name; // r0
int v5; // r5
int v7; // r0
if ( !a2 )
return 0;
if ( !*(_DWORD *)(a1 + 152) )
{
v7 = OPENSSL_sk_new_null();
*(_DWORD *)(a1 + 152) = v7;
if ( !v7 )
return 0;
}
subject_name = X509_get_subject_name(a2);
v5 = X509_NAME_dup(subject_name);
if ( !v5 )
return 0;
if ( OPENSSL_sk_push(*(_DWORD *)(a1 + 152), v5) )
return 1;
X509_NAME_free(v5);
return 0;
}