Lines Matching refs:global_data
121 static psa_global_data_t global_data; variable
131 initialized = global_data.rng_state == RNG_SEEDED; in psa_get_initialized()
142 (initialized && (global_data.initialized == PSA_CRYPTO_SUBSYSTEM_ALL_INITIALISED)); in psa_get_initialized()
159 initialized = (global_data.initialized & PSA_CRYPTO_SUBSYSTEM_DRIVER_WRAPPERS_INITIALIZED) != 0; in psa_get_drivers_initialized()
4399 status = mbedtls_psa_external_get_random(&global_data.rng, in psa_generate_random_internal()
4421 ret = mbedtls_ctr_drbg_random(&global_data.rng.drbg, output, request_size); in psa_generate_random_internal()
4423 ret = mbedtls_hmac_drbg_random(&global_data.rng.drbg, output, request_size); in psa_generate_random_internal()
8314 if (global_data.rng_state != RNG_NOT_INITIALIZED) { in mbedtls_psa_crypto_configure_entropy_sources()
8317 global_data.rng.entropy_init = entropy_init; in mbedtls_psa_crypto_configure_entropy_sources()
8318 global_data.rng.entropy_free = entropy_free; in mbedtls_psa_crypto_configure_entropy_sources()
8338 if (global_data.initialized & PSA_CRYPTO_SUBSYSTEM_TRANSACTION_INITIALIZED) { in mbedtls_psa_crypto_free()
8339 global_data.initialized &= ~PSA_CRYPTO_SUBSYSTEM_TRANSACTION_INITIALIZED; in mbedtls_psa_crypto_free()
8342 if (global_data.initialized & PSA_CRYPTO_SUBSYSTEM_KEY_SLOTS_INITIALIZED) { in mbedtls_psa_crypto_free()
8344 global_data.initialized &= ~PSA_CRYPTO_SUBSYSTEM_KEY_SLOTS_INITIALIZED; in mbedtls_psa_crypto_free()
8355 if (global_data.rng_state != RNG_NOT_INITIALIZED) { in mbedtls_psa_crypto_free()
8356 mbedtls_psa_random_free(&global_data.rng); in mbedtls_psa_crypto_free()
8358 global_data.rng_state = RNG_NOT_INITIALIZED; in mbedtls_psa_crypto_free()
8359 mbedtls_platform_zeroize(&global_data.rng, sizeof(global_data.rng)); in mbedtls_psa_crypto_free()
8370 if (global_data.initialized & PSA_CRYPTO_SUBSYSTEM_DRIVER_WRAPPERS_INITIALIZED) { in mbedtls_psa_crypto_free()
8372 global_data.initialized &= ~PSA_CRYPTO_SUBSYSTEM_DRIVER_WRAPPERS_INITIALIZED; in mbedtls_psa_crypto_free()
8418 if (!(global_data.initialized & PSA_CRYPTO_SUBSYSTEM_DRIVER_WRAPPERS_INITIALIZED)) { in mbedtls_psa_crypto_init_subsystem()
8423 global_data.initialized |= PSA_CRYPTO_SUBSYSTEM_DRIVER_WRAPPERS_INITIALIZED; in mbedtls_psa_crypto_init_subsystem()
8440 if (!(global_data.initialized & PSA_CRYPTO_SUBSYSTEM_KEY_SLOTS_INITIALIZED)) { in mbedtls_psa_crypto_init_subsystem()
8444 global_data.initialized |= PSA_CRYPTO_SUBSYSTEM_KEY_SLOTS_INITIALIZED; in mbedtls_psa_crypto_init_subsystem()
8461 (global_data.initialized & PSA_CRYPTO_SUBSYSTEM_DRIVER_WRAPPERS_INITIALIZED); in mbedtls_psa_crypto_init_subsystem()
8476 if (global_data.rng_state == RNG_NOT_INITIALIZED && driver_wrappers_initialized) { in mbedtls_psa_crypto_init_subsystem()
8477 mbedtls_psa_random_init(&global_data.rng); in mbedtls_psa_crypto_init_subsystem()
8478 global_data.rng_state = RNG_INITIALIZED; in mbedtls_psa_crypto_init_subsystem()
8480 status = mbedtls_psa_random_seed(&global_data.rng); in mbedtls_psa_crypto_init_subsystem()
8482 global_data.rng_state = RNG_SEEDED; in mbedtls_psa_crypto_init_subsystem()
8499 if (!(global_data.initialized & PSA_CRYPTO_SUBSYSTEM_TRANSACTION_INITIALIZED)) { in mbedtls_psa_crypto_init_subsystem()
8505 global_data.initialized |= PSA_CRYPTO_SUBSYSTEM_TRANSACTION_INITIALIZED; in mbedtls_psa_crypto_init_subsystem()
8510 global_data.initialized |= PSA_CRYPTO_SUBSYSTEM_TRANSACTION_INITIALIZED; in mbedtls_psa_crypto_init_subsystem()
8514 global_data.initialized |= PSA_CRYPTO_SUBSYSTEM_TRANSACTION_INITIALIZED; in mbedtls_psa_crypto_init_subsystem()