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()
4209 status = mbedtls_psa_external_get_random(&global_data.rng, in psa_generate_random_internal()
4231 ret = mbedtls_ctr_drbg_random(&global_data.rng.drbg, output, request_size); in psa_generate_random_internal()
4233 ret = mbedtls_hmac_drbg_random(&global_data.rng.drbg, output, request_size); in psa_generate_random_internal()
8031 if (global_data.rng_state != RNG_NOT_INITIALIZED) { in mbedtls_psa_crypto_configure_entropy_sources()
8034 global_data.rng.entropy_init = entropy_init; in mbedtls_psa_crypto_configure_entropy_sources()
8035 global_data.rng.entropy_free = entropy_free; in mbedtls_psa_crypto_configure_entropy_sources()
8055 if (global_data.initialized & PSA_CRYPTO_SUBSYSTEM_TRANSACTION_INITIALIZED) { in mbedtls_psa_crypto_free()
8056 global_data.initialized &= ~PSA_CRYPTO_SUBSYSTEM_TRANSACTION_INITIALIZED; in mbedtls_psa_crypto_free()
8059 if (global_data.initialized & PSA_CRYPTO_SUBSYSTEM_KEY_SLOTS_INITIALIZED) { in mbedtls_psa_crypto_free()
8061 global_data.initialized &= ~PSA_CRYPTO_SUBSYSTEM_KEY_SLOTS_INITIALIZED; in mbedtls_psa_crypto_free()
8072 if (global_data.rng_state != RNG_NOT_INITIALIZED) { in mbedtls_psa_crypto_free()
8073 mbedtls_psa_random_free(&global_data.rng); in mbedtls_psa_crypto_free()
8075 global_data.rng_state = RNG_NOT_INITIALIZED; in mbedtls_psa_crypto_free()
8076 mbedtls_platform_zeroize(&global_data.rng, sizeof(global_data.rng)); in mbedtls_psa_crypto_free()
8087 if (global_data.initialized & PSA_CRYPTO_SUBSYSTEM_DRIVER_WRAPPERS_INITIALIZED) { in mbedtls_psa_crypto_free()
8089 global_data.initialized &= ~PSA_CRYPTO_SUBSYSTEM_DRIVER_WRAPPERS_INITIALIZED; in mbedtls_psa_crypto_free()
8135 if (!(global_data.initialized & PSA_CRYPTO_SUBSYSTEM_DRIVER_WRAPPERS_INITIALIZED)) { in mbedtls_psa_crypto_init_subsystem()
8140 global_data.initialized |= PSA_CRYPTO_SUBSYSTEM_DRIVER_WRAPPERS_INITIALIZED; in mbedtls_psa_crypto_init_subsystem()
8157 if (!(global_data.initialized & PSA_CRYPTO_SUBSYSTEM_KEY_SLOTS_INITIALIZED)) { in mbedtls_psa_crypto_init_subsystem()
8161 global_data.initialized |= PSA_CRYPTO_SUBSYSTEM_KEY_SLOTS_INITIALIZED; in mbedtls_psa_crypto_init_subsystem()
8178 (global_data.initialized & PSA_CRYPTO_SUBSYSTEM_DRIVER_WRAPPERS_INITIALIZED); in mbedtls_psa_crypto_init_subsystem()
8193 if (global_data.rng_state == RNG_NOT_INITIALIZED && driver_wrappers_initialized) { in mbedtls_psa_crypto_init_subsystem()
8194 mbedtls_psa_random_init(&global_data.rng); in mbedtls_psa_crypto_init_subsystem()
8195 global_data.rng_state = RNG_INITIALIZED; in mbedtls_psa_crypto_init_subsystem()
8197 status = mbedtls_psa_random_seed(&global_data.rng); in mbedtls_psa_crypto_init_subsystem()
8199 global_data.rng_state = RNG_SEEDED; in mbedtls_psa_crypto_init_subsystem()
8216 if (!(global_data.initialized & PSA_CRYPTO_SUBSYSTEM_TRANSACTION_INITIALIZED)) { in mbedtls_psa_crypto_init_subsystem()
8222 global_data.initialized |= PSA_CRYPTO_SUBSYSTEM_TRANSACTION_INITIALIZED; in mbedtls_psa_crypto_init_subsystem()
8227 global_data.initialized |= PSA_CRYPTO_SUBSYSTEM_TRANSACTION_INITIALIZED; in mbedtls_psa_crypto_init_subsystem()
8231 global_data.initialized |= PSA_CRYPTO_SUBSYSTEM_TRANSACTION_INITIALIZED; in mbedtls_psa_crypto_init_subsystem()