//
// ssl_dh_to_pkey from 0x78f2bc to 0x78f2f8 (60 bytes)
//
// 4 xrefs:
// > ssl3_ctrl @ 0x78f590
// > ssl3_ctx_ctrl @ 0x790210
// > tls_construct_server_key_exchange @ 0x7aa84c
// > ??> @ 0x5aedc
//
// 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_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;
}