Lines Matching refs:NULL

58         return NULL;  in ossl_cms_get0_enveloped()
67 return NULL; in ossl_cms_get0_auth_enveloped()
74 if (cms->d.other == NULL) { in cms_enveloped_data_init()
76 if (cms->d.envelopedData == NULL) { in cms_enveloped_data_init()
78 return NULL; in cms_enveloped_data_init()
93 if (cms->d.other == NULL) { in cms_auth_enveloped_data_init()
95 if (cms->d.authEnvelopedData == NULL) { in cms_auth_enveloped_data_init()
97 return NULL; in cms_auth_enveloped_data_init()
119 if (pctx == NULL) in ossl_cms_env_asn1_ctrl()
122 if (pkey == NULL) in ossl_cms_env_asn1_ctrl()
135 if (pkey->ameth == NULL || pkey->ameth->pkey_ctrl == NULL) in ossl_cms_env_asn1_ctrl()
153 return cms->d.envelopedData == NULL ? NULL in ossl_cms_get0_env_enc_content()
157 return cms->d.authEnvelopedData == NULL ? NULL in ossl_cms_get0_env_enc_content()
161 return NULL; in ossl_cms_get0_env_enc_content()
175 return NULL; in STACK_OF()
188 if (ri != NULL) { in ossl_cms_RecipientInfos_set_cmsctx()
223 return NULL; in CMS_RecipientInfo_get0_pkey_ctx()
234 if (cms == NULL) in CMS_EnvelopedData_create_ex()
237 if (env == NULL) in CMS_EnvelopedData_create_ex()
240 if (!ossl_cms_EncryptedContent_init(env->encryptedContentInfo, cipher, NULL, in CMS_EnvelopedData_create_ex()
247 return NULL; in CMS_EnvelopedData_create_ex()
252 return CMS_EnvelopedData_create_ex(cipher, NULL, NULL); in CMS_EnvelopedData_create()
261 BIO *bio = NULL; in CMS_EnvelopedData_decrypt()
264 if (env == NULL) { in CMS_EnvelopedData_decrypt()
266 return NULL; in CMS_EnvelopedData_decrypt()
269 if ((ci = CMS_ContentInfo_new_ex(libctx, propq)) == NULL in CMS_EnvelopedData_decrypt()
270 || (bio = BIO_new(BIO_s_mem())) == NULL) in CMS_EnvelopedData_decrypt()
274 if (secret != NULL in CMS_EnvelopedData_decrypt()
279 res = CMS_decrypt(ci, secret == NULL ? pkey : NULL, in CMS_EnvelopedData_decrypt()
280 secret == NULL ? cert : NULL, detached_data, bio, flags); in CMS_EnvelopedData_decrypt()
283 if (ci != NULL) { in CMS_EnvelopedData_decrypt()
284 ci->d.envelopedData = NULL; /* do not indirectly free |env| */ in CMS_EnvelopedData_decrypt()
285 ci->contentType = NULL; in CMS_EnvelopedData_decrypt()
290 bio = NULL; in CMS_EnvelopedData_decrypt()
303 if (cms == NULL) in CMS_AuthEnvelopedData_create_ex()
306 if (aenv == NULL) in CMS_AuthEnvelopedData_create_ex()
309 cipher, NULL, 0, in CMS_AuthEnvelopedData_create_ex()
316 return NULL; in CMS_AuthEnvelopedData_create_ex()
322 return CMS_AuthEnvelopedData_create_ex(cipher, NULL, NULL); in CMS_AuthEnvelopedData_create()
370 if (ktri->pctx == NULL) in cms_RecipientInfo_ktri_init()
387 CMS_RecipientInfo *ri = NULL; in CMS_add1_recipient()
389 EVP_PKEY *pk = NULL; in CMS_add1_recipient()
393 if (ris == NULL) in CMS_add1_recipient()
398 if (ri == NULL) { in CMS_add1_recipient()
404 if (pk == NULL) { in CMS_add1_recipient()
437 return NULL; in CMS_add1_recipient()
444 return CMS_add1_recipient(cms, recip, NULL, NULL, flags); in CMS_add1_recipient_cert()
512 unsigned char *ek = NULL; in cms_RecipientInfo_ktri_encrypt()
534 if (pctx == NULL) in cms_RecipientInfo_ktri_encrypt()
541 if (EVP_PKEY_encrypt(pctx, NULL, &eklen, ec->key, ec->keylen) <= 0) in cms_RecipientInfo_ktri_encrypt()
545 if (ek == NULL) in cms_RecipientInfo_ktri_encrypt()
552 ek = NULL; in cms_RecipientInfo_ktri_encrypt()
558 ktri->pctx = NULL; in cms_RecipientInfo_ktri_encrypt()
570 unsigned char *ek = NULL; in cms_RecipientInfo_ktri_decrypt()
574 const EVP_CIPHER *cipher = NULL; in cms_RecipientInfo_ktri_decrypt()
575 EVP_CIPHER *fetched_cipher = NULL; in cms_RecipientInfo_ktri_decrypt()
583 if (ktri->pkey == NULL) { in cms_RecipientInfo_ktri_decrypt()
598 if (fetched_cipher != NULL) in cms_RecipientInfo_ktri_decrypt()
602 if (cipher == NULL) { in cms_RecipientInfo_ktri_decrypt()
614 if (ktri->pctx == NULL) in cms_RecipientInfo_ktri_decrypt()
643 ktri->pctx = NULL; in cms_RecipientInfo_ktri_decrypt()
695 CMS_RecipientInfo *ri = NULL; in CMS_add0_recipient_key()
699 if (ris == NULL) in CMS_add0_recipient_key()
755 if (kekri->kekid->other == NULL) { in CMS_add0_recipient_key()
783 V_ASN1_UNDEF, NULL); /* cannot fail */ in CMS_add0_recipient_key()
789 return NULL; in CMS_add0_recipient_key()
815 *potherid = NULL; in CMS_RecipientInfo_kekri_get0_id()
821 *pothertype = NULL; in CMS_RecipientInfo_kekri_get0_id()
843 const char *alg = NULL; in cms_get_key_wrap_cipher()
856 return NULL; in cms_get_key_wrap_cipher()
870 unsigned char *wkey = NULL; in cms_RecipientInfo_kekri_encrypt()
873 EVP_CIPHER *cipher = NULL; in cms_RecipientInfo_kekri_encrypt()
875 EVP_CIPHER_CTX *ctx = NULL; in cms_RecipientInfo_kekri_encrypt()
879 if (ec == NULL) in cms_RecipientInfo_kekri_encrypt()
884 if (kekri->key == NULL) { in cms_RecipientInfo_kekri_encrypt()
890 if (cipher == NULL) { in cms_RecipientInfo_kekri_encrypt()
897 if (wkey == NULL) in cms_RecipientInfo_kekri_encrypt()
901 if (ctx == NULL) { in cms_RecipientInfo_kekri_encrypt()
907 if (!EVP_EncryptInit_ex(ctx, cipher, NULL, kekri->key, NULL) in cms_RecipientInfo_kekri_encrypt()
939 unsigned char *ukey = NULL; in cms_RecipientInfo_kekri_decrypt()
942 EVP_CIPHER *cipher = NULL; in cms_RecipientInfo_kekri_decrypt()
944 EVP_CIPHER_CTX *ctx = NULL; in cms_RecipientInfo_kekri_decrypt()
948 if (ec == NULL) in cms_RecipientInfo_kekri_decrypt()
972 if (cipher == NULL) { in cms_RecipientInfo_kekri_decrypt()
978 if (ukey == NULL) in cms_RecipientInfo_kekri_decrypt()
982 if (ctx == NULL) { in cms_RecipientInfo_kekri_decrypt()
987 if (!EVP_DecryptInit_ex(ctx, cipher, NULL, kekri->key, NULL) in cms_RecipientInfo_kekri_decrypt()
1057 if (org == NULL) in cms_env_set_originfo_version()
1130 ec->cipher = NULL; in cms_env_clear_ec()
1132 ec->key = NULL; in cms_env_clear_ec()
1141 EVP_CIPHER_CTX *ctx = NULL; in cms_EnvelopedData_Decryption_init_bio()
1143 if (contentBio == NULL) in cms_EnvelopedData_Decryption_init_bio()
1144 return NULL; in cms_EnvelopedData_Decryption_init_bio()
1147 if (ctx == NULL) { in cms_EnvelopedData_Decryption_init_bio()
1149 return NULL; in cms_EnvelopedData_Decryption_init_bio()
1160 return NULL; in cms_EnvelopedData_Decryption_init_bio()
1199 return NULL; in cms_EnvelopedData_Encryption_init_bio()
1204 if (cms->d.envelopedData->encryptedContentInfo->cipher != NULL) { in ossl_cms_EnvelopedData_init_bio()
1224 if (ec->cipher == NULL) { in ossl_cms_AuthEnvelopedData_init_bio()
1231 if (ret == NULL || ec->cipher == NULL) in ossl_cms_AuthEnvelopedData_init_bio()
1251 return NULL; in ossl_cms_AuthEnvelopedData_init_bio()
1256 CMS_EnvelopedData *env = NULL; in ossl_cms_EnvelopedData_final()
1257 EVP_CIPHER_CTX *ctx = NULL; in ossl_cms_EnvelopedData_final()
1261 if (env == NULL) in ossl_cms_EnvelopedData_final()
1264 if (mbio == NULL) { in ossl_cms_EnvelopedData_final()
1277 if (env->unprotectedAttrs == NULL) in ossl_cms_EnvelopedData_final()
1280 if (env->unprotectedAttrs == NULL) { in ossl_cms_EnvelopedData_final()
1299 unsigned char *tag = NULL; in ossl_cms_AuthEnvelopedData_final()
1313 || (tag = OPENSSL_malloc(taglen)) == NULL in ossl_cms_AuthEnvelopedData_final()
1365 if (pk->ameth != NULL && pk->ameth->pkey_ctrl != NULL) { in ossl_cms_pkey_is_ri_type_supported()