2.1.4.3.6 Cond
This processing step MUST return TRUE if a given claim matches the current Cond, and FALSE otherwise.
The TYPE, VALUE, and VALUE-TYPE in a Cond MUST be replaced by the current claim's TYPE, VALUE, and VALUE-TYPE, respectively (section 2.1.2). The current claim's TYPE and VALUE-TYPE MUST always be treated as STRING-TYPE. The current claim's VALUE MUST be interpreted based on its VALUE-TYPE.
The right side of Cond-oper in the Cond MUST be convertible to the same type as the operand on the left side of the Cond-oper; otherwise, the Cond MUST return the evaluation result as FALSE. Converting STRING-TYPE variables to other types MUST be performed as specified in [ISO/IEC-9899] section 7.20.1.4.
The Cond-oper in the Cond MUST be interpreted based upon the type of the operand on the left side of the Cond-oper, as shown in the following table.
INT64_TYPE
UINT64_TYPE
BOOLEAN_TYPE
STRING_TYPE
EQ
Signed integer equality comparison.
Unsigned integer equality comparison.
BOOLEAN equality comparison.
Unsigned integers MUST be interpreted as BOOLEAN values as follows:
0 == FALSE
(!0) == TRUE
Case-insensitive, NULL terminated Unicode-string comparison, excluding terminating NULLs for equality.
NEQ
Negation of EQ comparison.
Negation of EQ comparison.
Negation of EQ comparison.
Negation of EQ comparison.
REGEXP-MATCH
Not valid.
Not valid.
Not valid.
Regular expression match of NULL terminated Unicode strings.
REGEXP-NOT-MATCH
Not valid.
Not valid.
Not valid.
Negation of REGEXP-MATCH.
If the current processing encounters a Cond-oper and the type combination is identified as "Not Valid" in the preceding table, the processing MUST return the result of the evaluation as FALSE.
Return the result of the evaluation of Cond, comparing the operands based on interpretation of the Cond-oper from the preceding table.