Lines Matching refs:usage
248 psa_key_usage_t usage)
268 /* Filter out non allowed usage flags */
269 if (usage == 0 ||
270 (usage & ~(PSA_KEY_USAGE_SIGN_HASH |
315 return (key_usage & usage) == usage;
338 if ((key_usage & usage) != usage) {
405 psa_key_usage_t usage,
410 psa_key_usage_t more_usage = usage;
411 if (usage == PSA_KEY_USAGE_SIGN_MESSAGE) {
413 } else if (usage == PSA_KEY_USAGE_SIGN_HASH) {
415 } else if (usage == PSA_KEY_USAGE_DECRYPT) {
420 int want_private = !(usage == PSA_KEY_USAGE_VERIFY_MESSAGE ||
421 usage == PSA_KEY_USAGE_VERIFY_HASH ||
422 usage == PSA_KEY_USAGE_ENCRYPT);
429 switch (usage) {
482 switch (usage) {
532 switch (usage) {
558 * on the input if the required usage is private. We just need
559 * to adjust the type correctly if the required usage is public. */
564 if ((usage & more_usage) == 0) {
616 if (status == PSA_ERROR_NOT_PERMITTED /*missing COPY usage*/ ||
621 * - If the old key's usage does not allow what attributes wants.