//
// X509_check_private_key from 0xde6a88 to 0xde6b38 (176 bytes)
//
// 10 xrefs:
// > SSL_CTX_check_private_key @ 0xd3fd20
// > SSL_check_private_key @ 0xd3fd94
// > sub_D43F10 @ 0xd43f9c
// > sub_D440A4 @ 0xd44118
// > SSL_use_PrivateKey @ 0xd448f4
// > SSL_CTX_use_PrivateKey @ 0xd451e4
// > OCSP_request_sign @ 0xdc36fc
// > PKCS12_parse @ 0xdca754
// > CMS_add1_signer @ 0xe228a0
// > ??> @ 0xbe518
//
// 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
//
bool __fastcall X509_check_private_key(__int64 a1, _DWORD *a2)
{
__int64 v2; // x0
int v3; // w0
v2 = X509_get0_pubkey(a1);
if ( !v2 )
{
LABEL_8:
ERR_put_error(11, 128, 117, (__int64)"crypto/x509/x509_cmp.c", 301);
return 0;
}
v3 = EVP_PKEY_cmp(v2, a2);
if ( v3 == -1 )
{
ERR_put_error(11, 128, 115, (__int64)"crypto/x509/x509_cmp.c", 298);
return 0;
}
else
{
if ( v3 )
{
if ( v3 != -2 )
return v3 > 0;
goto LABEL_8;
}
ERR_put_error(11, 128, 116, (__int64)"crypto/x509/x509_cmp.c", 295);
return 0;
}
}