//
// cms_set1_keyid from 0xe2081c to 0xe208b4 (152 bytes)
//
// 3 xrefs:
// > cms_RecipientInfo_kari_init @ 0xe1f398
// > cms_set1_SignerIdentifier @ 0xe21328
// > ??> @ 0x80958
//
// 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 cms_set1_keyid(__int64 *a1, __int64 a2)
{
__int64 v3; // x0
__int64 v4; // x19
v3 = X509_get0_subject_key_id(a2);
if ( v3 )
{
v4 = ASN1_STRING_dup(v3);
if ( v4 )
{
ASN1_OCTET_STRING_free(*a1);
*a1 = v4;
return 1;
}
else
{
ERR_put_error(46, 177, 65, (__int64)"crypto/cms/cms_lib.c", 581);
return 0;
}
}
else
{
ERR_put_error(46, 177, 160, (__int64)"crypto/cms/cms_lib.c", 576);
return 0;
}
}