psa_is_valid_key_id() function
Validate a key identifier.
Arguments
vendor_ok
Non-zero to indicate that key identifiers in the vendor range are allowed, volatile key identifiers excepted \c 0 otherwise.
Return value
0 if the key identifier is valid, 0 otherwise.