зеркало из https://github.com/microsoft/CCF.git
Fix cleanup of custom claims (#3584)
This commit is contained in:
Родитель
acbde42bf8
Коммит
023e1be4db
|
@ -34,6 +34,17 @@ namespace ccf::js
|
|||
}
|
||||
};
|
||||
|
||||
struct CustomClaims
|
||||
{
|
||||
oe_claim_t* data = nullptr;
|
||||
size_t length = 0;
|
||||
|
||||
~CustomClaims()
|
||||
{
|
||||
oe_free_custom_claims(data, length);
|
||||
}
|
||||
};
|
||||
|
||||
static JSValue js_verify_open_enclave_evidence(
|
||||
JSContext* ctx, JSValueConst, int argc, JSValueConst* argv)
|
||||
{
|
||||
|
@ -119,7 +130,7 @@ namespace ccf::js
|
|||
|
||||
if (claim_name == OE_CLAIM_CUSTOM_CLAIMS_BUFFER)
|
||||
{
|
||||
Claims custom_claims;
|
||||
CustomClaims custom_claims;
|
||||
rc = oe_deserialize_custom_claims(
|
||||
claim.value,
|
||||
claim.value_size,
|
||||
|
|
|
@ -59,6 +59,17 @@ namespace ccf
|
|||
}
|
||||
};
|
||||
|
||||
struct CustomClaims
|
||||
{
|
||||
oe_claim_t* data = nullptr;
|
||||
size_t length = 0;
|
||||
|
||||
~CustomClaims()
|
||||
{
|
||||
oe_free_custom_claims(data, length);
|
||||
}
|
||||
};
|
||||
|
||||
struct SerialisedClaims
|
||||
{
|
||||
uint8_t* buffer = nullptr;
|
||||
|
@ -138,7 +149,7 @@ namespace ccf
|
|||
else if (claim_name == OE_CLAIM_CUSTOM_CLAIMS_BUFFER)
|
||||
{
|
||||
// Find sgx report data in custom claims
|
||||
Claims custom_claims;
|
||||
CustomClaims custom_claims;
|
||||
rc = oe_deserialize_custom_claims(
|
||||
claim.value,
|
||||
claim.value_size,
|
||||
|
|
Загрузка…
Ссылка в новой задаче