Lines Matching refs:NULL

35     if (ctx == NULL)  in OSSL_SAFE_MATH_SIGNED()
38 if (ctx->cipher == NULL || ctx->cipher->prov == NULL) in OSSL_SAFE_MATH_SIGNED()
41 if (ctx->algctx != NULL) { in OSSL_SAFE_MATH_SIGNED()
42 if (ctx->cipher->freectx != NULL) in OSSL_SAFE_MATH_SIGNED()
44 ctx->algctx = NULL; in OSSL_SAFE_MATH_SIGNED()
46 if (ctx->fetched_cipher != NULL) in OSSL_SAFE_MATH_SIGNED()
56 if (ctx->cipher != NULL) { in OSSL_SAFE_MATH_SIGNED()
77 if (ctx == NULL) in EVP_CIPHER_CTX_new()
78 return NULL; in EVP_CIPHER_CTX_new()
86 if (ctx == NULL) in EVP_CIPHER_CTX_free()
100 ENGINE *tmpimpl = NULL; in evp_cipher_init_internal()
116 if (cipher == NULL && ctx->cipher == NULL) { in evp_cipher_init_internal()
131 && (cipher == NULL || cipher->nid == ctx->cipher->nid)) in evp_cipher_init_internal()
134 if (cipher != NULL && impl == NULL) { in evp_cipher_init_internal()
143 if (ctx->engine != NULL in evp_cipher_init_internal()
145 || tmpimpl != NULL in evp_cipher_init_internal()
147 || impl != NULL in evp_cipher_init_internal()
148 || (cipher != NULL && cipher->origin == EVP_ORIG_METH) in evp_cipher_init_internal()
149 || (cipher == NULL && ctx->cipher != NULL in evp_cipher_init_internal()
152 ctx->cipher = NULL; in evp_cipher_init_internal()
154 ctx->fetched_cipher = NULL; in evp_cipher_init_internal()
161 if (cipher != NULL && ctx->cipher != NULL) { in evp_cipher_init_internal()
162 if (ctx->cipher->cleanup != NULL && !ctx->cipher->cleanup(ctx)) in evp_cipher_init_internal()
165 ctx->cipher_data = NULL; in evp_cipher_init_internal()
171 if (cipher != NULL && ctx->cipher != NULL) { in evp_cipher_init_internal()
180 if (cipher == NULL) in evp_cipher_init_internal()
183 if (cipher->prov == NULL) { in evp_cipher_init_internal()
190 EVP_CIPHER_fetch(NULL, in evp_cipher_init_internal()
195 if (provciph == NULL) in evp_cipher_init_internal()
203 if (!ossl_assert(cipher->prov != NULL)) { in evp_cipher_init_internal()
219 if (ctx->algctx == NULL) { in evp_cipher_init_internal()
221 if (ctx->algctx == NULL) { in evp_cipher_init_internal()
245 if (params != NULL) { in evp_cipher_init_internal()
252 if (p != NULL) in evp_cipher_init_internal()
260 if (p != NULL) in evp_cipher_init_internal()
273 if (ctx->cipher->einit == NULL) { in evp_cipher_init_internal()
280 key == NULL ? 0 in evp_cipher_init_internal()
283 iv == NULL ? 0 in evp_cipher_init_internal()
288 if (ctx->cipher->dinit == NULL) { in evp_cipher_init_internal()
295 key == NULL ? 0 in evp_cipher_init_internal()
298 iv == NULL ? 0 in evp_cipher_init_internal()
305 if (cipher != NULL) { in evp_cipher_init_internal()
319 if (impl != NULL) { in evp_cipher_init_internal()
327 if (impl != NULL) { in evp_cipher_init_internal()
331 if (c == NULL) { in evp_cipher_init_internal()
348 ctx->engine = NULL; in evp_cipher_init_internal()
355 if (ctx->cipher_data == NULL) { in evp_cipher_init_internal()
356 ctx->cipher = NULL; in evp_cipher_init_internal()
360 ctx->cipher_data = NULL; in evp_cipher_init_internal()
366 if (EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_INIT, 0, NULL) <= 0) { in evp_cipher_init_internal()
367 ctx->cipher = NULL; in evp_cipher_init_internal()
376 if (ctx->cipher == NULL) in evp_cipher_init_internal()
410 if (iv != NULL) in evp_cipher_init_internal()
418 if (iv != NULL) { in evp_cipher_init_internal()
433 if (key != NULL || (ctx->cipher->flags & EVP_CIPH_ALWAYS_CALL_INIT)) { in evp_cipher_init_internal()
447 return evp_cipher_init_internal(ctx, cipher, NULL, key, iv, enc, params); in EVP_CipherInit_ex2()
453 if (cipher != NULL) in EVP_CipherInit()
455 return evp_cipher_init_internal(ctx, cipher, NULL, key, iv, enc, NULL); in EVP_CipherInit()
462 return evp_cipher_init_internal(ctx, cipher, impl, key, iv, enc, NULL); in EVP_CipherInit_ex()
574 cmpl = safe_div_round_up_int(cmpl, 8, NULL); in evp_EncryptDecryptUpdate()
665 if (ossl_likely(outl != NULL)) { in EVP_EncryptUpdate()
678 if (ossl_unlikely(ctx->cipher == NULL)) { in EVP_EncryptUpdate()
683 if (ossl_unlikely(ctx->cipher->prov == NULL)) in EVP_EncryptUpdate()
688 if (ossl_unlikely(ctx->cipher->cupdate == NULL || blocksize < 1)) { in EVP_EncryptUpdate()
727 if (outl != NULL) { in EVP_EncryptFinal_ex()
740 if (ctx->cipher == NULL) { in EVP_EncryptFinal_ex()
744 if (ctx->cipher->prov == NULL) in EVP_EncryptFinal_ex()
749 if (blocksize < 1 || ctx->cipher->cfinal == NULL) { in EVP_EncryptFinal_ex()
771 ret = ctx->cipher->do_cipher(ctx, out, NULL, 0); in EVP_EncryptFinal_ex()
814 if (ossl_likely(outl != NULL)) { in EVP_DecryptUpdate()
827 if (ossl_unlikely(ctx->cipher == NULL)) { in EVP_DecryptUpdate()
831 if (ossl_unlikely(ctx->cipher->prov == NULL)) in EVP_DecryptUpdate()
836 if (ossl_unlikely(ctx->cipher->cupdate == NULL || blocksize < 1)) { in EVP_DecryptUpdate()
860 cmpl = safe_div_round_up_int(cmpl, 8, NULL); in EVP_DecryptUpdate()
948 if (outl != NULL) { in EVP_DecryptFinal_ex()
961 if (ctx->cipher == NULL) { in EVP_DecryptFinal_ex()
966 if (ctx->cipher->prov == NULL) in EVP_DecryptFinal_ex()
971 if (blocksize < 1 || ctx->cipher->cfinal == NULL) { in EVP_DecryptFinal_ex()
994 i = ctx->cipher->do_cipher(ctx, out, NULL, 0); in EVP_DecryptFinal_ex()
1043 if (c->cipher->prov != NULL) { in EVP_CIPHER_CTX_set_key_length()
1053 OSSL_CIPHER_PARAM_KEYLEN) == NULL) { in EVP_CIPHER_CTX_set_key_length()
1075 return EVP_CIPHER_CTX_ctrl(c, EVP_CTRL_SET_KEY_LENGTH, keylen, NULL); in EVP_CIPHER_CTX_set_key_length()
1097 if (ctx->cipher != NULL && ctx->cipher->prov == NULL) in EVP_CIPHER_CTX_set_padding()
1115 if (ctx == NULL || ctx->cipher == NULL) { in EVP_CIPHER_CTX_ctrl()
1120 if (ctx->cipher->prov == NULL) in EVP_CIPHER_CTX_ctrl()
1306 if (ctx->cipher->ctrl == NULL) { in EVP_CIPHER_CTX_ctrl()
1323 if (cipher != NULL && cipher->get_params != NULL) in EVP_CIPHER_get_params()
1333 if (ctx->cipher != NULL && ctx->cipher->set_ctx_params != NULL) { in EVP_CIPHER_CTX_set_params()
1337 if (p != NULL && !OSSL_PARAM_get_int(p, &ctx->key_len)) { in EVP_CIPHER_CTX_set_params()
1344 if (p != NULL && !OSSL_PARAM_get_int(p, &ctx->iv_len)) { in EVP_CIPHER_CTX_set_params()
1355 if (ctx->cipher != NULL && ctx->cipher->get_ctx_params != NULL) in EVP_CIPHER_CTX_get_params()
1362 if (cipher != NULL && cipher->gettable_params != NULL) in EVP_CIPHER_gettable_params()
1365 return NULL; in EVP_CIPHER_gettable_params()
1372 if (cipher != NULL && cipher->settable_ctx_params != NULL) { in EVP_CIPHER_settable_ctx_params()
1374 return cipher->settable_ctx_params(NULL, provctx); in EVP_CIPHER_settable_ctx_params()
1376 return NULL; in EVP_CIPHER_settable_ctx_params()
1383 if (cipher != NULL && cipher->gettable_ctx_params != NULL) { in EVP_CIPHER_gettable_ctx_params()
1385 return cipher->gettable_ctx_params(NULL, provctx); in EVP_CIPHER_gettable_ctx_params()
1387 return NULL; in EVP_CIPHER_gettable_ctx_params()
1394 if (cctx != NULL && cctx->cipher->settable_ctx_params != NULL) { in EVP_CIPHER_CTX_settable_params()
1398 return NULL; in EVP_CIPHER_CTX_settable_params()
1405 if (cctx != NULL && cctx->cipher->gettable_ctx_params != NULL) { in EVP_CIPHER_CTX_gettable_params()
1409 return NULL; in EVP_CIPHER_CTX_gettable_params()
1418 if (cipher == NULL) in EVP_CIPHER_CTX_get_libctx()
1419 return NULL; in EVP_CIPHER_CTX_get_libctx()
1450 if (out != NULL && !EVP_CIPHER_CTX_copy(out, in)) { in EVP_CIPHER_CTX_dup()
1452 out = NULL; in EVP_CIPHER_CTX_dup()
1459 if ((in == NULL) || (in->cipher == NULL)) { in EVP_CIPHER_CTX_copy()
1464 if (in->cipher->prov == NULL) in EVP_CIPHER_CTX_copy()
1467 if (in->cipher->dupctx == NULL) { in EVP_CIPHER_CTX_copy()
1475 out->algctx = NULL; in EVP_CIPHER_CTX_copy()
1477 if (in->fetched_cipher != NULL && !EVP_CIPHER_up_ref(in->fetched_cipher)) { in EVP_CIPHER_CTX_copy()
1478 out->fetched_cipher = NULL; in EVP_CIPHER_CTX_copy()
1483 if (out->algctx == NULL) { in EVP_CIPHER_CTX_copy()
1506 if (out->cipher_data == NULL) { in EVP_CIPHER_CTX_copy()
1507 out->cipher = NULL; in EVP_CIPHER_CTX_copy()
1515 out->cipher = NULL; in EVP_CIPHER_CTX_copy()
1526 if (cipher != NULL && !CRYPTO_NEW_REF(&cipher->refcnt, 1)) { in evp_cipher_new()
1528 return NULL; in evp_cipher_new()
1553 if (legacy_method == NULL) in set_legacy_nid()
1569 EVP_CIPHER *cipher = NULL; in evp_cipher_from_algorithm()
1572 if ((cipher = evp_cipher_new()) == NULL) { in evp_cipher_from_algorithm()
1574 return NULL; in evp_cipher_from_algorithm()
1583 return NULL; in evp_cipher_from_algorithm()
1588 if ((cipher->type_name = ossl_algorithm_get1_first_name(algodef)) == NULL) { in evp_cipher_from_algorithm()
1590 return NULL; in evp_cipher_from_algorithm()
1597 if (cipher->newctx != NULL) in evp_cipher_from_algorithm()
1603 if (cipher->einit != NULL) in evp_cipher_from_algorithm()
1609 if (cipher->dinit != NULL) in evp_cipher_from_algorithm()
1615 if (cipher->cupdate != NULL) in evp_cipher_from_algorithm()
1621 if (cipher->cfinal != NULL) in evp_cipher_from_algorithm()
1627 if (cipher->ccipher != NULL) in evp_cipher_from_algorithm()
1632 if (cipher->freectx != NULL) in evp_cipher_from_algorithm()
1638 if (cipher->dupctx != NULL) in evp_cipher_from_algorithm()
1643 if (cipher->get_params != NULL) in evp_cipher_from_algorithm()
1648 if (cipher->get_ctx_params != NULL) in evp_cipher_from_algorithm()
1653 if (cipher->set_ctx_params != NULL) in evp_cipher_from_algorithm()
1658 if (cipher->gettable_params != NULL) in evp_cipher_from_algorithm()
1663 if (cipher->gettable_ctx_params != NULL) in evp_cipher_from_algorithm()
1669 if (cipher->settable_ctx_params != NULL) in evp_cipher_from_algorithm()
1677 || (fnciphcnt == 0 && cipher->ccipher == NULL) in evp_cipher_from_algorithm()
1687 return NULL; in evp_cipher_from_algorithm()
1690 if (prov != NULL) in evp_cipher_from_algorithm()
1696 cipher = NULL; in evp_cipher_from_algorithm()
1744 if (cipher == NULL || cipher->origin != EVP_ORIG_DYNAMIC) in EVP_CIPHER_free()