//
// SSL_use_certificate_file from 0x9b05e4 to 0x9b0744 (352 bytes)
//
// 1 xrefs:
// > ??> @ 0x7629c
//
// 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:56 +0000
//
int __fastcall SSL_use_certificate_file(int a1, int a2, int a3)
{
int v6; // r0
int v7; // r0
int v8; // r5
int v9; // r4
int v10; // r6
int bio_X509; // r0
int v13; // r2
int v14; // r0
v6 = BIO_s_file();
v7 = BIO_new(v6);
v8 = v7;
if ( !v7 )
{
ERR_put_error(20, 200, 7, "ssl/ssl_rsa.c", 45);
v9 = 0;
v10 = 0;
goto LABEL_6;
}
if ( BIO_ctrl(v7, 108, 3, a2) <= 0 )
{
v9 = 0;
ERR_put_error(20, 200, 2, "ssl/ssl_rsa.c", 50);
v10 = 0;
goto LABEL_6;
}
if ( a3 == 2 )
{
v14 = d2i_X509_bio(v8, 0);
v13 = 13;
v9 = v14;
}
else
{
if ( a3 != 1 )
{
ERR_put_error(20, 200, 124, "ssl/ssl_rsa.c", 61);
v9 = 0;
v10 = 0;
goto LABEL_6;
}
bio_X509 = PEM_read_bio_X509(
v8,
0,
*(_DWORD *)(*(_DWORD *)(a1 + 276) + 108),
*(_DWORD *)(*(_DWORD *)(a1 + 276) + 112));
v13 = 9;
v9 = bio_X509;
}
if ( v9 )
{
v10 = SSL_use_certificate(a1, v9);
}
else
{
ERR_put_error(20, 200, v13, "ssl/ssl_rsa.c", 66);
v10 = 0;
}
LABEL_6:
X509_free(v9);
BIO_free(v8);
return v10;
}