mirror of
https://github.com/estkme-group/lpac
synced 2024-09-11 19:40:49 +02:00
add forbiddenProfilePolicyRules in es10cex
This commit is contained in:
parent
58faf61a52
commit
ff6c5f3543
|
@ -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,
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue