Home
last modified time | relevance | path

Searched refs:kctx (Results 1 – 2 of 2) sorted by relevance

/hal_espressif-latest/components/wpa_supplicant/esp_supplicant/src/crypto/
Dcrypto_mbedtls-rsa.c139 mbedtls_pk_context *kctx = os_zalloc(sizeof(*kctx)); in crypto_public_key_from_cert() local
141 if (!kctx) { in crypto_public_key_from_cert()
159 mbedtls_pk_init(kctx); in crypto_public_key_from_cert()
161 if(mbedtls_pk_setup(kctx, mbedtls_pk_info_from_type(mbedtls_pk_get_type(&cert->pk))) != 0) { in crypto_public_key_from_cert()
165 ret = mbedtls_rsa_copy(mbedtls_pk_rsa(*kctx), mbedtls_pk_rsa(cert->pk)); in crypto_public_key_from_cert()
175 return (struct crypto_public_key *)kctx; in crypto_public_key_from_cert()
177 os_free(kctx); in crypto_public_key_from_cert()
178 kctx = NULL; in crypto_public_key_from_cert()
Dcrypto_mbedtls-ec.c683 mbedtls_pk_context *kctx = (mbedtls_pk_context *)crypto_alloc_key(); in crypto_ec_get_key() local
685 if (!kctx) { in crypto_ec_get_key()
689 ret = mbedtls_pk_parse_key(kctx, privkey, privkey_len, NULL, 0, crypto_rng_wrapper, NULL); in crypto_ec_get_key()
696 return (struct crypto_key *)kctx; in crypto_ec_get_key()
699 mbedtls_pk_free(kctx); in crypto_ec_get_key()
700 os_free(kctx); in crypto_ec_get_key()
899 mbedtls_pk_context *kctx = (mbedtls_pk_context *)crypto_alloc_key(); in crypto_ec_gen_keypair() local
901 if (!kctx) { in crypto_ec_gen_keypair()
906 if(mbedtls_pk_setup(kctx, in crypto_ec_gen_keypair()
910 mbedtls_ecp_gen_key(MBEDTLS_ECP_DP_SECP256R1, mbedtls_pk_ec(*kctx), //get this from argument in crypto_ec_gen_keypair()
[all …]