asn1: note IMPLICIT CHOICE promoted to EXPLICIT
Record when a CHOICE field is promoted from IMPLICIT to EXPLICIT and convey this in the ASN.1 compiler's JSON output, so that other tools (e.g. which have a representation isomorphic to the original ASN.1) may use it.
This commit is contained in:

committed by
Nico Williams

parent
5398425cd2
commit
16179383fb
@@ -1529,6 +1529,9 @@ define_type(int level, const char *name, const char *basename, Type *pt, Type *t
|
||||
fprintf(jsonfile, "\"ttype\":\"TeletexString\",\"ctype\":\"heim_general_string\"");
|
||||
break;
|
||||
case TTag:
|
||||
if (t->implicit_choice) {
|
||||
fprintf(jsonfile, "\"desired_tagenv\":\"IMPLICIT\",");
|
||||
}
|
||||
fprintf(jsonfile, "\"tagclass\":\"%s\",\"tagvalue\":%d,\"tagenv\":\"%s\",\n",
|
||||
tagclassnames[t->tag.tagclass], t->tag.tagvalue,
|
||||
t->tag.tagenv == TE_EXPLICIT ? "EXPLICIT" : "IMPLICIT");
|
||||
|
Reference in New Issue
Block a user