Lines Matching defs:kty
67 "kty", "kid", "use", "key_ops", "base_iv", "alg"
114 lwsl_cose("%s: cose_key %p, kty: %lld (gc %d)\n", __func__, ck,
115 (long long)ck->kty, ck->gencrypto_kty);
140 lws_cose_key_checks(const lws_cose_key_t *key, int64_t kty, cose_param_t alg,
150 assert(kty);
153 assert((kty != LWSCOSE_WKKTV_OKP && kty != LWSCOSE_WKKTV_EC2) || crv);
157 * The 'kty' field MUST be present, and it MUST be '...'.
159 * But kty can come as an int or a string, but we convert well-known
160 * kty ints to the corresponding string representation at key import
162 if (!kty || kty >= (int)LWS_ARRAY_SIZE(kty_strings)) {
164 lwsl_notice("%s: unknown kty %d\n", __func__, (int)kty);
169 if (ke->buf && (strlen(kty_strings[kty]) != ke->len ||
170 memcmp(kty_strings[kty], ke->buf, ke->len))) {
171 lwsl_notice("%s: key is of wrong kty\n", __func__);
219 if (kty == LWSCOSE_WKKTV_OKP || kty == LWSCOSE_WKKTV_EC2) {
369 cps->ck->kty = (int)ctx->item.u.u64;
396 lwsl_warn("%s: unknown kty\n", __func__);
494 switch (cps->ck->kty) {
595 lwsl_warn("%s: unknown kty\n", __func__);
800 ck->kty = cose_kty;
895 lwsl_err("%s: unknown kty\n", __func__);
1020 * We always issue kty, others may be
1036 lws_lec_signed(ctx, (int64_t)ck->kty);