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()
543 EVP_RAND_CTX *ctx = NULL; in rand_new_seed()
546 char *props = NULL; in rand_new_seed()
548 OSSL_PROPERTY_LIST *pl1, *pl2, *pl3 = NULL; in rand_new_seed()
550 if (dgbl == NULL) in rand_new_seed()
551 return NULL; in rand_new_seed()
553 if (dgbl->seed_name != NULL) { in rand_new_seed()
560 if (propq == NULL || *propq == '\0') { in rand_new_seed()
564 if (pl1 == NULL) { in rand_new_seed()
566 return NULL; in rand_new_seed()
569 if (pl2 == NULL) { in rand_new_seed()
572 return NULL; in rand_new_seed()
577 if (pl3 == NULL) { in rand_new_seed()
579 return NULL; in rand_new_seed()
581 props_len = ossl_property_list_to_string(libctx, pl3, NULL, 0); in rand_new_seed()
588 if (props == NULL) { in rand_new_seed()
598 pl3 = NULL; in rand_new_seed()
610 if (rand == NULL) { in rand_new_seed()
614 ctx = EVP_RAND_CTX_new(rand, NULL); in rand_new_seed()
616 if (ctx == NULL) { in rand_new_seed()
620 if (!EVP_RAND_instantiate(ctx, 0, 0, NULL, 0, NULL)) { in rand_new_seed()
634 return NULL; in rand_new_seed()
644 if (dgbl == NULL) in ossl_rand_get0_seed_noncreating()
645 return NULL; in ossl_rand_get0_seed_noncreating()
648 return NULL; in ossl_rand_get0_seed_noncreating()
667 if (dgbl == NULL) in rand_new_drbg()
668 return NULL; in rand_new_drbg()
669 name = dgbl->rng_name != NULL ? dgbl->rng_name : "CTR-DRBG"; in rand_new_drbg()
671 if (rand == NULL) { in rand_new_drbg()
673 return NULL; in rand_new_drbg()
677 if (ctx == NULL) { in rand_new_drbg()
679 return NULL; in rand_new_drbg()
684 cipher = dgbl->rng_cipher != NULL ? dgbl->rng_cipher : "AES-256-CTR"; in rand_new_drbg()
688 if (dgbl->rng_digest != NULL in rand_new_drbg()
692 if (dgbl->rng_propq != NULL) in rand_new_drbg()
704 if (!EVP_RAND_instantiate(ctx, 0, 0, NULL, 0, params)) { in rand_new_drbg()
707 return NULL; in rand_new_drbg()
719 if (rand == NULL) { in rand_new_crngt()
721 return NULL; in rand_new_crngt()
725 if (ctx == NULL) { in rand_new_crngt()
727 return NULL; in rand_new_crngt()
730 if (!EVP_RAND_instantiate(ctx, 0, 0, NULL, 0, NULL)) { in rand_new_crngt()
733 return NULL; in rand_new_crngt()
749 if (dgbl == NULL) in RAND_get0_primary()
750 return NULL; in RAND_get0_primary()
753 return NULL; in RAND_get0_primary()
758 if (ret != NULL) in RAND_get0_primary()
762 return NULL; in RAND_get0_primary()
765 if (ret != NULL) { in RAND_get0_primary()
772 if (dgbl->seed == NULL) { in RAND_get0_primary()
792 if (ret != NULL && !EVP_RAND_enable_locking(ret)) { in RAND_get0_primary()
795 ret = dgbl->primary = NULL; in RAND_get0_primary()
811 if (dgbl == NULL) in RAND_get0_public()
812 return NULL; in RAND_get0_public()
815 if (rand == NULL) { in RAND_get0_public()
817 if (primary == NULL) in RAND_get0_public()
818 return NULL; in RAND_get0_public()
825 if (CRYPTO_THREAD_get_local(&dgbl->private) == NULL in RAND_get0_public()
826 && !ossl_init_thread_start(NULL, ctx, rand_delete_thread_state)) in RAND_get0_public()
827 return NULL; in RAND_get0_public()
844 if (dgbl == NULL) in RAND_get0_private()
845 return NULL; in RAND_get0_private()
848 if (rand == NULL) { in RAND_get0_private()
850 if (primary == NULL) in RAND_get0_private()
851 return NULL; in RAND_get0_private()
858 if (CRYPTO_THREAD_get_local(&dgbl->public) == NULL in RAND_get0_private()
859 && !ossl_init_thread_start(NULL, ctx, rand_delete_thread_state)) in RAND_get0_private()
860 return NULL; in RAND_get0_private()
873 if (dgbl == NULL) in ossl_rand_get0_private_noncreating()
874 return NULL; in ossl_rand_get0_private_noncreating()
886 if (dgbl == NULL) in RAND_set0_public()
900 if (dgbl == NULL) in RAND_set0_private()
911 char *d = NULL; in random_set_string()
913 if (s != NULL) { in random_set_string()
915 if (d == NULL) in random_set_string()
938 if (elist == NULL) { in random_conf_init()
943 if (dgbl == NULL) in random_conf_init()
993 if (dgbl == NULL) in RAND_set_DRBG_type()
995 if (dgbl->primary != NULL) { in RAND_set_DRBG_type()
1010 if (dgbl == NULL) in RAND_set_seed_source_type()
1012 if (dgbl->seed != NULL) { in RAND_set_seed_source_type()