add forbiddenProfilePolicyRules in es10cex

This commit is contained in:
estkme 2024-01-09 20:01:51 +08:00
parent 58faf61a52
commit ff6c5f3543
3 changed files with 20 additions and 1 deletions

View file

@ -251,6 +251,16 @@ int es10cex_get_euiccinfo2(struct euicc_ctx *ctx, struct es10cex_euiccinfo2 **al
}
}
if (asn1resp->forbiddenProfilePolicyRules)
{
static const char *desc[] = {"pprUpdateControl", "ppr1", "ppr2", "ppr3"};
if (_read_bitwise_cap(&info->forbiddenProfilePolicyRules, asn1resp->forbiddenProfilePolicyRules->buf, asn1resp->forbiddenProfilePolicyRules->size, desc))
{
goto err;
}
}
_versiontype_to_string(info->ppVersion, sizeof(info->ppVersion), asn1resp->ppVersion);
memcpy(info->sasAcreditationNumber, asn1resp->sasAcreditationNumber.buf,

View file

@ -20,7 +20,7 @@ struct es10cex_euiccinfo2
char **euiccCiPKIdListForVerification;
char **euiccCiPKIdListForSigning;
const char *euiccCategory;
// forbiddenProfilePolicyRules
const char **forbiddenProfilePolicyRules;
char ppVersion[16];
char sasAcreditationNumber[65];
struct

View file

@ -94,6 +94,15 @@ static int applet_main(int argc, char **argv)
cJSON_AddItemToObject(jeuiccinfo2, "euiccCiPKIdListForSigning", signing_keys);
}
cJSON_AddStringOrNullToObject(jeuiccinfo2, "euiccCategory", euiccinfo2->euiccCategory);
if (euiccinfo2->forbiddenProfilePolicyRules)
{
cJSON *jforbiddenProfilePolicyRules = cJSON_CreateArray();
for (int i = 0; euiccinfo2->forbiddenProfilePolicyRules[i] != NULL; i++)
{
cJSON_AddItemToArray(jforbiddenProfilePolicyRules, cJSON_CreateString(euiccinfo2->forbiddenProfilePolicyRules[i]));
}
cJSON_AddItemToObject(jeuiccinfo2, "forbiddenProfilePolicyRules", jforbiddenProfilePolicyRules);
}
cJSON_AddStringOrNullToObject(jeuiccinfo2, "ppVersion", euiccinfo2->ppVersion);
cJSON_AddStringOrNullToObject(jeuiccinfo2, "sasAcreditationNumber", euiccinfo2->sasAcreditationNumber);
{