Home
last modified time | relevance | path

Searched refs:kty (Results 1 – 25 of 33) sorted by relevance

12

/third_party/libwebsockets/minimal-examples/crypto/minimal-crypto-cose-key/
DREADME.md18 Stdin is not used, give parameters for the kty and kid etc to create a
22 $ ./bin/lws-crypto-cose-key --kty EC2 --curve P-521 --kid sec512 >ec512.key
35 |--kty type|Key type, one of OKP, EC2, RSA or SYMMETRIC|
59 kty: EC2
61 kty: P-256
66 kty: EC2
68 kty: P-256
73 kty: SYMMETRIC
77 kty: EC2
79 kty: P-521
[all …]
DCMakeLists.txt21 COMMAND lws-crypto-cose-key --kty EC2 --curve P-256 --kid ctest-256 --stdout ctest-ec-256.key)
23 COMMAND lws-crypto-cose-key --kty EC2 --curve P-384 --kid ctest-384 --stdout ctest-ec-384.key)
25 COMMAND lws-crypto-cose-key --kty EC2 --curve P-521 --kid ctest-512 --stdout ctest-ec-512.key)
27 COMMAND lws-crypto-cose-key --kty SYMMETRIC --bits 256 --stdout ctest-sym-256.key)
29 COMMAND lws-crypto-cose-key --kty RSA --bits 2048 --stdout ctest-rsa-2048.key)
/third_party/libwebsockets/minimal-examples/api-tests/api-test-cose/
Dkeys.c21 lwsl_notice("%s: key type %lld\n", __func__, (long long)s->kty); in key_import_cb()
726 if (ck->kty != LWSCOSE_WKKTV_EC2 || in test_cose_keys()
758 if (ck->kty != LWSCOSE_WKKTV_EC2 || in test_cose_keys()
780 if (ck->kty != LWSCOSE_WKKTV_SYMMETRIC || in test_cose_keys()
785 (int)ck->kty, (int)ck->gencrypto_kty, in test_cose_keys()
800 if (ck->kty != LWSCOSE_WKKTV_EC2 || in test_cose_keys()
820 if (ck->kty != LWSCOSE_WKKTV_SYMMETRIC || in test_cose_keys()
836 if (ck->kty != LWSCOSE_WKKTV_EC2 || in test_cose_keys()
856 if (ck->kty != LWSCOSE_WKKTV_SYMMETRIC || in test_cose_keys()
872 if (ck->kty != LWSCOSE_WKKTV_SYMMETRIC || in test_cose_keys()
[all …]
/third_party/libwebsockets/minimal-examples/crypto/minimal-crypto-jwk/
Dmain.c71 enum lws_gencrypto_kty kty = LWS_GENCRYPTO_KTY_RSA; in main() local
91 kty = LWS_GENCRYPTO_KTY_RSA; in main()
94 kty = LWS_GENCRYPTO_KTY_OCT; in main()
97 kty = LWS_GENCRYPTO_KTY_EC; in main()
121 if (lws_jwk_generate(context, &jwk, kty, bits, curve)) { in main()
140 kty != LWS_GENCRYPTO_KTY_OCT) { in main()
DREADME.md43 {"crv":"P-256","d":"eMKM_S4BTL2aiebZLqvxglufV2YX4b3_32DesgEUOaM","key_ops":["sign","verify"],"kty":…
49 {"crv":"P-256","key_ops":["verify"],"kty":"EC","x":"OWauiGGtJ60ZegtqlwETQlmO1exTZdWbT2VbUs4a1hg","y…
/third_party/libwebsockets/lib/jose/jwk/
Djose_key.c259 if (jwk->kty == LWS_GENCRYPTO_KTY_RSA && in cb_jwk()
276 if (jwk->kty == LWS_GENCRYPTO_KTY_RSA && in cb_jwk()
293 if (jwk->kty == LWS_GENCRYPTO_KTY_RSA && in cb_jwk()
301 if ((jwk->kty == LWS_GENCRYPTO_KTY_RSA || in cb_jwk()
302 jwk->kty == LWS_GENCRYPTO_KTY_EC) && in cb_jwk()
329 jwk->kty = LWS_GENCRYPTO_KTY_OCT; in cb_jwk()
336 jwk->kty = LWS_GENCRYPTO_KTY_RSA; in cb_jwk()
343 jwk->kty = LWS_GENCRYPTO_KTY_EC; in cb_jwk()
440 switch (jwk->kty) { in lws_jwk_import()
469 switch (jwk->kty) { in lws_jwk_export()
[all …]
Djwk.c61 switch (jwk->kty) { in lws_jwk_dump()
169 jwk->kty = LWS_GENCRYPTO_KTY_OCT; in lws_jwk_dup_oct()
179 enum lws_gencrypto_kty kty, int bits, const char *curve) in lws_jwk_generate() argument
186 jwk->kty = (int)kty; in lws_jwk_generate()
189 switch (kty) { in lws_jwk_generate()
/third_party/libwebsockets/lib/cose/
Dcose_key.c115 (long long)ck->kty, ck->gencrypto_kty); in lws_cose_key_dump()
140 lws_cose_key_checks(const lws_cose_key_t *key, int64_t kty, cose_param_t alg, in lws_cose_key_checks() argument
150 assert(kty); in lws_cose_key_checks()
153 assert((kty != LWSCOSE_WKKTV_OKP && kty != LWSCOSE_WKKTV_EC2) || crv); in lws_cose_key_checks()
162 if (!kty || kty >= (int)LWS_ARRAY_SIZE(kty_strings)) { in lws_cose_key_checks()
164 lwsl_notice("%s: unknown kty %d\n", __func__, (int)kty); in lws_cose_key_checks()
169 if (ke->buf && (strlen(kty_strings[kty]) != ke->len || in lws_cose_key_checks()
170 memcmp(kty_strings[kty], ke->buf, ke->len))) { in lws_cose_key_checks()
219 if (kty == LWSCOSE_WKKTV_OKP || kty == LWSCOSE_WKKTV_EC2) { in lws_cose_key_checks()
369 cps->ck->kty = (int)ctx->item.u.u64; in cb_cose_key()
[all …]
/third_party/libwebsockets/lib/jose/jwe/enc/
Daeskw.c47 if (jwe->jws.jwk->kty != LWS_GENCRYPTO_KTY_OCT) { in lws_jwe_encrypt_aeskw_cbc_hs()
48 lwsl_err("%s: unexpected kty %d\n", __func__, jwe->jws.jwk->kty); in lws_jwe_encrypt_aeskw_cbc_hs()
125 if (jwe->jws.jwk->kty != LWS_GENCRYPTO_KTY_OCT) { in lws_jwe_auth_and_decrypt_aeskw_cbc_hs()
126 lwsl_err("%s: unexpected kty %d\n", __func__, jwe->jws.jwk->kty); in lws_jwe_auth_and_decrypt_aeskw_cbc_hs()
/third_party/libwebsockets/lib/jose/jwe/
Djwe-rsa-aescbc.c54 if (jwe->jws.jwk->kty != LWS_GENCRYPTO_KTY_RSA) { in lws_jwe_encrypt_rsa_aes_cbc_hs()
55 lwsl_err("%s: unexpected kty %d\n", __func__, jwe->jws.jwk->kty); in lws_jwe_encrypt_rsa_aes_cbc_hs()
139 if (jwe->jws.jwk->kty != LWS_GENCRYPTO_KTY_RSA) { in lws_jwe_auth_and_decrypt_rsa_aes_cbc_hs()
140 lwsl_err("%s: unexpected kty %d\n", __func__, jwe->jws.jwk->kty); in lws_jwe_auth_and_decrypt_rsa_aes_cbc_hs()
Djwe-rsa-aesgcm.c38 if (jwe->jws.jwk->kty != LWS_GENCRYPTO_KTY_RSA) { in lws_jwe_encrypt_rsa_aes_gcm()
39 lwsl_err("%s: wrong kty %d\n", __func__, jwe->jws.jwk->kty); in lws_jwe_encrypt_rsa_aes_gcm()
130 if (jwe->jws.jwk->kty != LWS_GENCRYPTO_KTY_RSA) { in lws_jwe_auth_and_decrypt_rsa_aes_gcm()
131 lwsl_err("%s: unexpected kty %d\n", __func__, jwe->jws.jwk->kty); in lws_jwe_auth_and_decrypt_rsa_aes_gcm()
Djwe-ecdh-es-aeskw.c211 if (jwe->jws.jwk->kty != LWS_GENCRYPTO_KTY_EC) { in lws_jwe_encrypt_ecdh()
212 lwsl_err("%s: unexpected kty %d\n", __func__, jwe->jws.jwk->kty); in lws_jwe_encrypt_ecdh()
217 ephem->kty = LWS_GENCRYPTO_KTY_EC; in lws_jwe_encrypt_ecdh()
462 if (jwe->jws.jwk->kty != LWS_GENCRYPTO_KTY_EC) { in lws_jwe_auth_and_decrypt_ecdh()
463 lwsl_err("%s: unexpected kty %d\n", __func__, jwe->jws.jwk->kty); in lws_jwe_auth_and_decrypt_ecdh()
468 if (jwe->jose.recipient[jwe->recip].jwk_ephemeral.kty != in lws_jwe_auth_and_decrypt_ecdh()
/third_party/libwebsockets/minimal-examples/api-tests/api-test-jose/
Djws.c152 if (jwk.kty != LWS_GENCRYPTO_KTY_OCT) { in test_jws_HS256()
153 lwsl_err("%s: unexpected kty %d\n", __func__, jwk.kty); in test_jws_HS256()
303 if (jwk.kty != LWS_GENCRYPTO_KTY_RSA) { in test_jws_RS256()
304 lwsl_err("%s: 2.2: kty: %d instead of RSA\n", __func__, jwk.kty); in test_jws_RS256()
472 if (jwk.kty != LWS_GENCRYPTO_KTY_EC) { in test_jws_ES256()
474 __func__, jwk.kty); in test_jws_ES256()
634 if (jwk.kty != LWS_GENCRYPTO_KTY_EC) { in test_jws_ES512()
636 __func__, jwk.kty); in test_jws_ES512()
Djwk.c272 lwsl_notice("%s: key type %d\n", __func__, s->kty); in key_import_callback()
/third_party/libwebsockets/include/libwebsockets/
Dlws-jwk.h55 int kty; /**< one of LWS_GENCRYPTO_KTY_ */ member
218 enum lws_gencrypto_kty kty, int bits, const char *curve);
Dlws-cose.h278 cose_param_t kty; member
/third_party/grpc/src/core/lib/security/credentials/jwt/
Djwt_verifier.cc501 static EVP_PKEY* pkey_from_jwk(const Json& json, const char* kty) { in pkey_from_jwk() argument
509 GPR_ASSERT(kty != nullptr); in pkey_from_jwk()
510 if (strcmp(kty, "RSA") != 0) { in pkey_from_jwk()
511 gpr_log(GPR_ERROR, "Unsupported key type %s.", kty); in pkey_from_jwk()
581 const char* kty = nullptr; in find_verification_key() local
584 kty = validate_string_field(it->second, "kty"); in find_verification_key()
586 if (alg != nullptr && kid != nullptr && kty != nullptr && in find_verification_key()
588 return pkey_from_jwk(jkey, kty); in find_verification_key()
/third_party/libwebsockets/minimal-examples/crypto/minimal-crypto-jwe/
Dkey-rsa-4096.pub1 {"e":"AQAB","kid":"my kid","kty":"RSA","n":"2_YjG_D1sOWJxs6cohikupHf5WJfWSFfSCrnNZ7WR7AyTLnKZAF4VKy…
Dkey-rsa-4096.private1 …LP3CRlqzDTvHrMe2A9cNAQ4dNsCbNAjW_MxxGKKWuWXAMQ","e":"AQAB","kid":"my kid","kty":"RSA","n":"2_YjG_D…
/third_party/libwebsockets/minimal-examples/crypto/minimal-crypto-x509/
DREADME.md38 {"crv":"P-521","kty":"EC","x":"_uRNBbIbm0zhk8v6ujvQX9924264ZkqJhit0qamAoCegzuJbLf434kN7_aFEt6u-QWUu…
55 …ncrYLhipUYzLYty2XhemTQ_nSuUB1vB76jHmOYUTRXFBLkVCW8cQYyMa5dMa3Bvv-cdvH0IB","kty":"EC","x":"_uRNBbIb…
/third_party/libwebsockets/lib/tls/openssl/
Dopenssl-x509.c520 jwk->kty = LWS_GENCRYPTO_KTY_EC; in lws_x509_public_to_jwk()
578 jwk->kty = LWS_GENCRYPTO_KTY_RSA; in lws_x509_public_to_jwk()
691 switch (jwk->kty) { in lws_x509_jwk_privkey_pem()
814 lwsl_err("%s: JWK has unknown kty %d\n", __func__, jwk->kty); in lws_x509_jwk_privkey_pem()
821 if (jwk->kty == LWS_GENCRYPTO_KTY_EC) in lws_x509_jwk_privkey_pem()
/third_party/libwebsockets/lib/tls/mbedtls/
Dmbedtls-x509.c393 jwk->kty = LWS_GENCRYPTO_KTY_RSA; in lws_x509_public_to_jwk()
411 jwk->kty = LWS_GENCRYPTO_KTY_EC; in lws_x509_public_to_jwk()
481 if (jwk->kty != LWS_GENCRYPTO_KTY_RSA) { in lws_x509_jwk_privkey_pem()
493 if (jwk->kty != LWS_GENCRYPTO_KTY_EC) { in lws_x509_jwk_privkey_pem()
/third_party/libwebsockets/minimal-examples/api-tests/api-test-gencrypto/
Dlws-genec.c57 if (jwk.kty != LWS_GENCRYPTO_KTY_EC) { in test_genec1()
/third_party/libwebsockets/lib/jose/jws/
Djws.c494 if (jwk->kty != LWS_GENCRYPTO_KTY_RSA) in lws_jws_sig_confirm()
589 if (jwk->kty != LWS_GENCRYPTO_KTY_EC) in lws_jws_sig_confirm()
776 if (jws->jwk->kty != LWS_GENCRYPTO_KTY_RSA) in lws_jws_sign_from_b64()
819 if (jws->jwk->kty != LWS_GENCRYPTO_KTY_EC) in lws_jws_sign_from_b64()
/third_party/libwebsockets/lib/jose/
DREADME.md49 |JWK kty|JWA|lws|

12