Lines Matching refs:env

24 static void cms_env_set_version(CMS_EnvelopedData *env);
231 CMS_EnvelopedData *env; in CMS_EnvelopedData_create_ex() local
236 env = cms_enveloped_data_init(cms); 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()
255 BIO *CMS_EnvelopedData_decrypt(CMS_EnvelopedData *env, BIO *detached_data, in CMS_EnvelopedData_decrypt() argument
264 if (env == NULL) { in CMS_EnvelopedData_decrypt()
273 ci->d.envelopedData = env; in CMS_EnvelopedData_decrypt()
1053 static void cms_env_set_originfo_version(CMS_EnvelopedData *env) in cms_env_set_originfo_version() argument
1055 CMS_OriginatorInfo *org = env->originatorInfo; in cms_env_set_originfo_version()
1063 env->version = 4; in cms_env_set_originfo_version()
1066 if (env->version < 3) in cms_env_set_originfo_version()
1067 env->version = 3; in cms_env_set_originfo_version()
1075 env->version = 4; in cms_env_set_originfo_version()
1081 static void cms_env_set_version(CMS_EnvelopedData *env) in cms_env_set_version() argument
1089 if (env->version >= 4) in cms_env_set_version()
1092 cms_env_set_originfo_version(env); in cms_env_set_version()
1094 if (env->version >= 3) in cms_env_set_version()
1097 for (i = 0; i < sk_CMS_RecipientInfo_num(env->recipientInfos); i++) { in cms_env_set_version()
1098 ri = sk_CMS_RecipientInfo_value(env->recipientInfos, i); in cms_env_set_version()
1100 env->version = 3; in cms_env_set_version()
1104 env->version = 2; in cms_env_set_version()
1107 if (env->originatorInfo || env->unprotectedAttrs) in cms_env_set_version()
1108 env->version = 2; in cms_env_set_version()
1109 if (env->version == 2) in cms_env_set_version()
1111 env->version = 0; in cms_env_set_version()
1171 CMS_EnvelopedData *env = cms->d.envelopedData; in cms_EnvelopedData_Encryption_init_bio() local
1175 ec = env->encryptedContentInfo; in cms_EnvelopedData_Encryption_init_bio()
1183 rinfos = env->recipientInfos; in cms_EnvelopedData_Encryption_init_bio()
1190 cms_env_set_version(env); in cms_EnvelopedData_Encryption_init_bio()
1256 CMS_EnvelopedData *env = NULL; in ossl_cms_EnvelopedData_final() local
1260 env = ossl_cms_get0_enveloped(cms); in ossl_cms_EnvelopedData_final()
1261 if (env == NULL) in ossl_cms_EnvelopedData_final()
1277 if (env->unprotectedAttrs == NULL) in ossl_cms_EnvelopedData_final()
1278 env->unprotectedAttrs = sk_X509_ATTRIBUTE_new_null(); in ossl_cms_EnvelopedData_final()
1280 if (env->unprotectedAttrs == NULL) { in ossl_cms_EnvelopedData_final()
1286 1, env->unprotectedAttrs) <= 0) { in ossl_cms_EnvelopedData_final()