Lines Matching refs:mpi
386 mbedtls_mpi *mpi[LWS_GENCRYPTO_RSA_KEYEL_COUNT]; in lws_x509_public_to_jwk() local
396 mpi[LWS_GENCRYPTO_RSA_KEYEL_E] = &rsactx->MBEDTLS_PRIVATE(E); in lws_x509_public_to_jwk()
397 mpi[LWS_GENCRYPTO_RSA_KEYEL_N] = &rsactx->MBEDTLS_PRIVATE(N); in lws_x509_public_to_jwk()
398 mpi[LWS_GENCRYPTO_RSA_KEYEL_D] = &rsactx->MBEDTLS_PRIVATE(D); in lws_x509_public_to_jwk()
399 mpi[LWS_GENCRYPTO_RSA_KEYEL_P] = &rsactx->MBEDTLS_PRIVATE(P); in lws_x509_public_to_jwk()
400 mpi[LWS_GENCRYPTO_RSA_KEYEL_Q] = &rsactx->MBEDTLS_PRIVATE(Q); in lws_x509_public_to_jwk()
401 mpi[LWS_GENCRYPTO_RSA_KEYEL_DP] = &rsactx->MBEDTLS_PRIVATE(DP); in lws_x509_public_to_jwk()
402 mpi[LWS_GENCRYPTO_RSA_KEYEL_DQ] = &rsactx->MBEDTLS_PRIVATE(DQ); in lws_x509_public_to_jwk()
403 mpi[LWS_GENCRYPTO_RSA_KEYEL_QI] = &rsactx->MBEDTLS_PRIVATE(QP); in lws_x509_public_to_jwk()
413 mpi[LWS_GENCRYPTO_EC_KEYEL_X] = &ecpctx->MBEDTLS_PRIVATE(Q).MBEDTLS_PRIVATE(X); in lws_x509_public_to_jwk()
414 mpi[LWS_GENCRYPTO_EC_KEYEL_D] = &ecpctx->MBEDTLS_PRIVATE(d); in lws_x509_public_to_jwk()
415 mpi[LWS_GENCRYPTO_EC_KEYEL_Y] = &ecpctx->MBEDTLS_PRIVATE(Q).MBEDTLS_PRIVATE(Y); in lws_x509_public_to_jwk()
432 if (!mbedtls_mpi_size(mpi[n])) in lws_x509_public_to_jwk()
435 jwk->e[n].buf = lws_malloc(mbedtls_mpi_size(mpi[n]), "certjwk"); in lws_x509_public_to_jwk()
438 jwk->e[n].len = (uint32_t)mbedtls_mpi_size(mpi[n]); in lws_x509_public_to_jwk()
439 mbedtls_mpi_write_binary(mpi[n], jwk->e[n].buf, jwk->e[n].len); in lws_x509_public_to_jwk()
459 mbedtls_mpi *mpi[LWS_GENCRYPTO_RSA_KEYEL_COUNT]; in lws_x509_jwk_privkey_pem() local
486 mpi[LWS_GENCRYPTO_RSA_KEYEL_D] = &rsactx->MBEDTLS_PRIVATE(D); in lws_x509_jwk_privkey_pem()
487 mpi[LWS_GENCRYPTO_RSA_KEYEL_P] = &rsactx->MBEDTLS_PRIVATE(P); in lws_x509_jwk_privkey_pem()
488 mpi[LWS_GENCRYPTO_RSA_KEYEL_Q] = &rsactx->MBEDTLS_PRIVATE(Q); in lws_x509_jwk_privkey_pem()
498 mpi[LWS_GENCRYPTO_EC_KEYEL_D] = &ecpctx->MBEDTLS_PRIVATE(d); in lws_x509_jwk_privkey_pem()
509 if (!mbedtls_mpi_size(mpi[n])) { in lws_x509_jwk_privkey_pem()
514 jwk->e[n].buf = lws_malloc(mbedtls_mpi_size(mpi[n]), "certjwk"); in lws_x509_jwk_privkey_pem()
517 jwk->e[n].len = (uint32_t)mbedtls_mpi_size(mpi[n]); in lws_x509_jwk_privkey_pem()
518 mbedtls_mpi_write_binary(mpi[n], jwk->e[n].buf, jwk->e[n].len); in lws_x509_jwk_privkey_pem()