Lines Matching refs:NULL

56     if (rand_engine_lock == NULL)  in DEFINE_RUN_ONCE_STATIC()
62 if (rand_meth_lock == NULL) in DEFINE_RUN_ONCE_STATIC()
75 rand_meth_lock = NULL; in DEFINE_RUN_ONCE_STATIC()
79 rand_engine_lock = NULL; in DEFINE_RUN_ONCE_STATIC()
92 if (meth != NULL && meth->cleanup != NULL) in ossl_rand_cleanup_int()
94 RAND_set_rand_method(NULL); in ossl_rand_cleanup_int()
99 rand_engine_lock = NULL; in ossl_rand_cleanup_int()
103 rand_meth_lock = NULL; in ossl_rand_cleanup_int()
135 if (meth == NULL) in RAND_poll()
144 if (pool == NULL) in RAND_poll()
150 if (meth->add == NULL in RAND_poll()
187 return rand_set_rand_method_internal(meth, NULL); in RAND_set_rand_method()
192 const RAND_METHOD *tmp_meth = NULL; in RAND_get_rand_method()
195 return NULL; in RAND_get_rand_method()
198 return NULL; in RAND_get_rand_method()
201 if (tmp_meth != NULL) in RAND_get_rand_method()
205 return NULL; in RAND_get_rand_method()
206 if (default_RAND_meth == NULL) { in RAND_get_rand_method()
211 if ((e = ENGINE_get_default_RAND()) != NULL in RAND_get_rand_method()
212 && (tmp_meth = ENGINE_get_RAND(e)) != NULL) { in RAND_get_rand_method()
231 const RAND_METHOD *tmp_meth = NULL; in RAND_set_rand_engine()
236 if (engine != NULL) { in RAND_set_rand_engine()
240 if (tmp_meth == NULL) { in RAND_set_rand_engine()
264 if (meth != NULL && meth->seed != NULL) { in RAND_seed()
270 drbg = RAND_get0_primary(NULL); in RAND_seed()
271 if (drbg != NULL && num > 0) in RAND_seed()
272 EVP_RAND_reseed(drbg, 0, NULL, 0, buf, num); in RAND_seed()
281 if (meth != NULL && meth->add != NULL) { in RAND_add()
286 drbg = RAND_get0_primary(NULL); in RAND_add()
287 if (drbg != NULL && num > 0) in RAND_add()
290 EVP_RAND_reseed(drbg, 0, buf, num, NULL, 0); in RAND_add()
293 EVP_RAND_reseed(drbg, 0, NULL, 0, buf, num); in RAND_add()
302 if (meth != NULL && meth->pseudorand != NULL) in RAND_pseudo_bytes()
315 if (meth != NULL && meth != RAND_OpenSSL()) in RAND_status()
316 return meth->status != NULL ? meth->status() : 0; in RAND_status()
319 if ((rand = RAND_get0_primary(NULL)) == NULL) in RAND_status()
328 return NULL; in RAND_get_rand_method()
345 if (meth != NULL && meth != RAND_OpenSSL()) { in RAND_priv_bytes_ex()
346 if (meth->bytes != NULL) in RAND_priv_bytes_ex()
354 if (rand != NULL) in RAND_priv_bytes_ex()
355 return EVP_RAND_generate(rand, buf, num, strength, 0, NULL, 0); in RAND_priv_bytes_ex()
364 return RAND_priv_bytes_ex(NULL, buf, (size_t)num, 0); in RAND_priv_bytes()
374 if (meth != NULL && meth != RAND_OpenSSL()) { in RAND_bytes_ex()
375 if (meth->bytes != NULL) in RAND_bytes_ex()
383 if (rand != NULL) in RAND_bytes_ex()
384 return EVP_RAND_generate(rand, buf, num, strength, 0, NULL, 0); in RAND_bytes_ex()
393 return RAND_bytes_ex(NULL, buf, (size_t)num, 0); in RAND_bytes()
461 if (dgbl == NULL) in ossl_rand_ctx_new()
462 return NULL; in ossl_rand_ctx_new()
469 OPENSSL_init_crypto(OPENSSL_INIT_BASE_ONLY, NULL); in ossl_rand_ctx_new()
473 if (dgbl->lock == NULL) in ossl_rand_ctx_new()
476 if (!CRYPTO_THREAD_init_local(&dgbl->private, NULL)) in ossl_rand_ctx_new()
479 if (!CRYPTO_THREAD_init_local(&dgbl->public, NULL)) in ossl_rand_ctx_new()
489 return NULL; in ossl_rand_ctx_new()
496 if (dgbl == NULL) in ossl_rand_ctx_free()
525 if (dgbl == NULL) in rand_delete_thread_state()
529 CRYPTO_THREAD_set_local(&dgbl->public, NULL); in rand_delete_thread_state()
533 CRYPTO_THREAD_set_local(&dgbl->private, NULL); in rand_delete_thread_state()
542 EVP_RAND_CTX *ctx = NULL; in rand_new_seed()
544 char *name, *props = NULL; in rand_new_seed()
546 OSSL_PROPERTY_LIST *pl1, *pl2, *pl3 = NULL; in rand_new_seed()
548 if (dgbl == NULL) in rand_new_seed()
549 return NULL; in rand_new_seed()
551 if (dgbl->seed_name != NULL) { in rand_new_seed()
558 if (propq == NULL || *propq == '\0') { in rand_new_seed()
562 if (pl1 == NULL) { in rand_new_seed()
564 return NULL; in rand_new_seed()
567 if (pl2 == NULL) { in rand_new_seed()
570 return NULL; in rand_new_seed()
575 if (pl3 == NULL) { in rand_new_seed()
577 return NULL; in rand_new_seed()
579 props_len = ossl_property_list_to_string(libctx, pl3, NULL, 0); in rand_new_seed()
586 if (props == NULL) { in rand_new_seed()
596 pl3 = NULL; in rand_new_seed()
604 if (rand == NULL) { in rand_new_seed()
608 ctx = EVP_RAND_CTX_new(rand, NULL); in rand_new_seed()
610 if (ctx == NULL) { in rand_new_seed()
614 if (!EVP_RAND_instantiate(ctx, 0, 0, NULL, 0, NULL)) { in rand_new_seed()
624 return NULL; in rand_new_seed()
632 if (dgbl == NULL) in ossl_rand_get0_seed_noncreating()
633 return NULL; in ossl_rand_get0_seed_noncreating()
636 return NULL; in ossl_rand_get0_seed_noncreating()
655 if (dgbl == NULL) in rand_new_drbg()
656 return NULL; in rand_new_drbg()
657 name = dgbl->rng_name != NULL ? dgbl->rng_name : "CTR-DRBG"; in rand_new_drbg()
659 if (rand == NULL) { in rand_new_drbg()
661 return NULL; in rand_new_drbg()
665 if (ctx == NULL) { in rand_new_drbg()
667 return NULL; in rand_new_drbg()
672 cipher = dgbl->rng_cipher != NULL ? dgbl->rng_cipher : "AES-256-CTR"; in rand_new_drbg()
676 if (dgbl->rng_digest != NULL in rand_new_drbg()
680 if (dgbl->rng_propq != NULL) in rand_new_drbg()
692 if (!EVP_RAND_instantiate(ctx, 0, 0, NULL, 0, params)) { in rand_new_drbg()
695 return NULL; in rand_new_drbg()
707 if (rand == NULL) { in rand_new_crngt()
709 return NULL; in rand_new_crngt()
713 if (ctx == NULL) { in rand_new_crngt()
715 return NULL; in rand_new_crngt()
718 if (!EVP_RAND_instantiate(ctx, 0, 0, NULL, 0, NULL)) { in rand_new_crngt()
721 return NULL; in rand_new_crngt()
737 if (dgbl == NULL) in RAND_get0_primary()
738 return NULL; in RAND_get0_primary()
741 return NULL; in RAND_get0_primary()
746 if (ret != NULL) in RAND_get0_primary()
750 return NULL; in RAND_get0_primary()
753 if (ret != NULL) { in RAND_get0_primary()
761 if (dgbl->seed == NULL) { in RAND_get0_primary()
775 if (ret != NULL && !EVP_RAND_enable_locking(ret)) { in RAND_get0_primary()
778 ret = dgbl->primary = NULL; in RAND_get0_primary()
794 if (dgbl == NULL) in RAND_get0_public()
795 return NULL; in RAND_get0_public()
798 if (rand == NULL) { in RAND_get0_public()
800 if (primary == NULL) in RAND_get0_public()
801 return NULL; in RAND_get0_public()
808 if (CRYPTO_THREAD_get_local(&dgbl->private) == NULL in RAND_get0_public()
809 && !ossl_init_thread_start(NULL, ctx, rand_delete_thread_state)) in RAND_get0_public()
810 return NULL; in RAND_get0_public()
827 if (dgbl == NULL) in RAND_get0_private()
828 return NULL; in RAND_get0_private()
831 if (rand == NULL) { in RAND_get0_private()
833 if (primary == NULL) in RAND_get0_private()
834 return NULL; in RAND_get0_private()
841 if (CRYPTO_THREAD_get_local(&dgbl->public) == NULL in RAND_get0_private()
842 && !ossl_init_thread_start(NULL, ctx, rand_delete_thread_state)) in RAND_get0_private()
843 return NULL; in RAND_get0_private()
856 if (dgbl == NULL) in ossl_rand_get0_private_noncreating()
857 return NULL; in ossl_rand_get0_private_noncreating()
869 if (dgbl == NULL) in RAND_set0_public()
883 if (dgbl == NULL) in RAND_set0_private()
894 char *d = NULL; in random_set_string()
896 if (s != NULL) { in random_set_string()
898 if (d == NULL) in random_set_string()
921 if (elist == NULL) { in random_conf_init()
926 if (dgbl == NULL) in random_conf_init()
976 if (dgbl == NULL) in RAND_set_DRBG_type()
978 if (dgbl->primary != NULL) { in RAND_set_DRBG_type()
993 if (dgbl == NULL) in RAND_set_seed_source_type()
995 if (dgbl->seed != NULL) { in RAND_set_seed_source_type()