//
// ssl_dh_to_pkey from 0x9a3ec0 to 0x9a3efc (60 bytes)
//
// 4 xrefs:
// > ssl3_ctrl @ 0x9a4194
// > ssl3_ctx_ctrl @ 0x9a4e14
// > tls_construct_server_key_exchange @ 0x9bf450
// > ??> @ 0x7495c
//
// 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:49 +0000
//
int __fastcall ssl_dh_to_pkey(int result)
{
int v1; // r4
int v2; // r5
bool v3; // cc
if ( result )
{
v1 = result;
v2 = EVP_PKEY_new();
v3 = EVP_PKEY_set1_DH(v2, v1) <= 0;
result = v2;
if ( v3 )
{
EVP_PKEY_free(v2);
return 0;
}
}
return result;
}