//
// OCSP_request_sign from 0xdc36a0 to 0xdc37e4 (324 bytes)
//
// 1 xrefs:
// > ??> @ 0x4b7b0
//
// 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
//
__int64 __fastcall OCSP_request_sign(__int64 a1, __int64 a2, __int64 a3, __int64 a4, __int64 a5, char a6)
{
__int64 subject_name; // x0
__int64 v13; // x0
int v15; // w20
__int64 v16; // x0
subject_name = X509_get_subject_name(a2);
if ( !(unsigned int)OCSP_request_set1_name(a1, subject_name) )
goto LABEL_8;
v13 = OCSP_SIGNATURE_new();
*(_QWORD *)(a1 + 32) = v13;
if ( !v13 )
{
LABEL_6:
OCSP_SIGNATURE_free(v13);
*(_QWORD *)(a1 + 32) = 0;
return 0;
}
if ( a3 )
{
if ( !(unsigned int)X509_check_private_key(a2, a3) )
{
ERR_put_error(39, 110, 110, (__int64)"crypto/ocsp/ocsp_cl.c", 112);
v13 = *(_QWORD *)(a1 + 32);
goto LABEL_6;
}
if ( !(unsigned int)ASN1_item_sign(
OCSP_REQINFO_it,
*(_QWORD *)(a1 + 32),
0,
*(_QWORD *)(*(_QWORD *)(a1 + 32) + 16LL),
a1,
a3,
a4) )
{
LABEL_8:
v13 = *(_QWORD *)(a1 + 32);
goto LABEL_6;
}
}
if ( (a6 & 1) != 0 )
return 1;
if ( !(unsigned int)OCSP_request_add1_cert(a1, a2) )
goto LABEL_8;
v15 = 0;
while ( v15 < (int)OPENSSL_sk_num(a5) )
{
v16 = OPENSSL_sk_value(a5, (unsigned int)v15++);
if ( !(unsigned int)OCSP_request_add1_cert(a1, v16) )
goto LABEL_8;
}
return 1;
}