diff --git a/tools/itscertgen/generator/certgen.c b/tools/itscertgen/generator/certgen.c index 5fb64875076d45864354170fad01d95f86f6ed52..89a0678891b48f27278011efb8a001f91f0efa25 100644 --- a/tools/itscertgen/generator/certgen.c +++ b/tools/itscertgen/generator/certgen.c @@ -1466,7 +1466,18 @@ static int region_id_tag (cxml_handler_t* const _h, cxml_tag_t * const tag) fprintf(stderr, "ERROR: Region identifier must be set\n"); return -1; } - while(cisspace(*v))v++; + + while (cisspace(*v))v++; + if (!cisdigit(*v)){ + // look in the macro map + const char * v1 = macro_lookup(v); + if (!v1){ + fprintf(stderr, "%s: Invalid region identifier\n", v); + return -1; + } + while (cisspace(*v1))v1++; + v = v1; + } uvalue = strtoul(v, NULL, 0); if(uvalue > 0xFFFF){ fprintf(stderr, "%s: Invalid region identifier\n", v);