Lines Matching refs:cms

23 **cms_get0_certificate_choices(CMS_ContentInfo *cms);
73 void CMS_ContentInfo_free(CMS_ContentInfo *cms) in CMS_ContentInfo_free() argument
75 if (cms != NULL) { in CMS_ContentInfo_free()
76 OPENSSL_free(cms->ctx.propq); in CMS_ContentInfo_free()
77 ASN1_item_free((ASN1_VALUE *)cms, ASN1_ITEM_rptr(CMS_ContentInfo)); in CMS_ContentInfo_free()
81 const CMS_CTX *ossl_cms_get0_cmsctx(const CMS_ContentInfo *cms) in ossl_cms_get0_cmsctx() argument
83 return cms != NULL ? &cms->ctx : NULL; in ossl_cms_get0_cmsctx()
118 const ASN1_OBJECT *CMS_get0_type(const CMS_ContentInfo *cms) in CMS_get0_type() argument
120 return cms->contentType; in CMS_get0_type()
125 CMS_ContentInfo *cms = CMS_ContentInfo_new_ex(libctx, propq); in ossl_cms_Data_create() local
127 if (cms != NULL) { in ossl_cms_Data_create()
128 cms->contentType = OBJ_nid2obj(NID_pkcs7_data); in ossl_cms_Data_create()
130 CMS_set_detached(cms, 0); in ossl_cms_Data_create()
132 return cms; in ossl_cms_Data_create()
135 BIO *ossl_cms_content_bio(CMS_ContentInfo *cms) in ossl_cms_content_bio() argument
137 ASN1_OCTET_STRING **pos = CMS_get0_content(cms); in ossl_cms_content_bio()
153 BIO *CMS_dataInit(CMS_ContentInfo *cms, BIO *icont) in CMS_dataInit() argument
159 cont = ossl_cms_content_bio(cms); in CMS_dataInit()
164 switch (OBJ_obj2nid(cms->contentType)) { in CMS_dataInit()
170 cmsbio = ossl_cms_SignedData_init_bio(cms); in CMS_dataInit()
174 cmsbio = ossl_cms_DigestedData_init_bio(cms); in CMS_dataInit()
178 cmsbio = ossl_cms_CompressedData_init_bio(cms); in CMS_dataInit()
183 cmsbio = ossl_cms_EncryptedData_init_bio(cms); in CMS_dataInit()
187 cmsbio = ossl_cms_EnvelopedData_init_bio(cms); in CMS_dataInit()
191 cmsbio = ossl_cms_AuthEnvelopedData_init_bio(cms); in CMS_dataInit()
209 int CMS_dataFinal(CMS_ContentInfo *cms, BIO *cmsbio) in CMS_dataFinal() argument
211 ASN1_OCTET_STRING **pos = CMS_get0_content(cms); in CMS_dataFinal()
233 switch (OBJ_obj2nid(cms->contentType)) { in CMS_dataFinal()
242 return ossl_cms_EnvelopedData_final(cms, cmsbio); in CMS_dataFinal()
245 return ossl_cms_AuthEnvelopedData_final(cms, cmsbio); in CMS_dataFinal()
248 return ossl_cms_SignedData_final(cms, cmsbio); in CMS_dataFinal()
251 return ossl_cms_DigestedData_do_final(cms, cmsbio, 0); in CMS_dataFinal()
264 ASN1_OCTET_STRING **CMS_get0_content(CMS_ContentInfo *cms) in CMS_get0_content() argument
266 switch (OBJ_obj2nid(cms->contentType)) { in CMS_get0_content()
269 return &cms->d.data; in CMS_get0_content()
272 return &cms->d.signedData->encapContentInfo->eContent; in CMS_get0_content()
275 return &cms->d.envelopedData->encryptedContentInfo->encryptedContent; in CMS_get0_content()
278 return &cms->d.digestedData->encapContentInfo->eContent; in CMS_get0_content()
281 return &cms->d.encryptedData->encryptedContentInfo->encryptedContent; in CMS_get0_content()
284 return &cms->d.authEnvelopedData->authEncryptedContentInfo in CMS_get0_content()
288 return &cms->d.authenticatedData->encapContentInfo->eContent; in CMS_get0_content()
291 return &cms->d.compressedData->encapContentInfo->eContent; in CMS_get0_content()
294 if (cms->d.other->type == V_ASN1_OCTET_STRING) in CMS_get0_content()
295 return &cms->d.other->value.octet_string; in CMS_get0_content()
307 static ASN1_OBJECT **cms_get0_econtent_type(CMS_ContentInfo *cms) in cms_get0_econtent_type() argument
309 switch (OBJ_obj2nid(cms->contentType)) { in cms_get0_econtent_type()
312 return &cms->d.signedData->encapContentInfo->eContentType; in cms_get0_econtent_type()
315 return &cms->d.envelopedData->encryptedContentInfo->contentType; in cms_get0_econtent_type()
318 return &cms->d.digestedData->encapContentInfo->eContentType; in cms_get0_econtent_type()
321 return &cms->d.encryptedData->encryptedContentInfo->contentType; in cms_get0_econtent_type()
324 return &cms->d.authEnvelopedData->authEncryptedContentInfo in cms_get0_econtent_type()
327 return &cms->d.authenticatedData->encapContentInfo->eContentType; in cms_get0_econtent_type()
330 return &cms->d.compressedData->encapContentInfo->eContentType; in cms_get0_econtent_type()
339 const ASN1_OBJECT *CMS_get0_eContentType(CMS_ContentInfo *cms) in CMS_get0_eContentType() argument
342 petype = cms_get0_econtent_type(cms); in CMS_get0_eContentType()
348 int CMS_set1_eContentType(CMS_ContentInfo *cms, const ASN1_OBJECT *oid) in CMS_set1_eContentType() argument
352 petype = cms_get0_econtent_type(cms); in CMS_set1_eContentType()
365 int CMS_is_detached(CMS_ContentInfo *cms) in CMS_is_detached() argument
369 pos = CMS_get0_content(cms); in CMS_is_detached()
377 int CMS_set_detached(CMS_ContentInfo *cms, int detached) in CMS_set_detached() argument
381 pos = CMS_get0_content(cms); in CMS_set_detached()
474 **cms_get0_certificate_choices(CMS_ContentInfo *cms) in STACK_OF()
476 switch (OBJ_obj2nid(cms->contentType)) { in STACK_OF()
479 return &cms->d.signedData->certificates; in STACK_OF()
482 if (cms->d.envelopedData->originatorInfo == NULL) in STACK_OF()
484 return &cms->d.envelopedData->originatorInfo->certificates; in STACK_OF()
487 if (cms->d.authEnvelopedData->originatorInfo == NULL) in STACK_OF()
489 return &cms->d.authEnvelopedData->originatorInfo->certificates; in STACK_OF()
498 CMS_CertificateChoices *CMS_add0_CertificateChoices(CMS_ContentInfo *cms) in CMS_add0_CertificateChoices() argument
503 pcerts = cms_get0_certificate_choices(cms); in CMS_add0_CertificateChoices()
520 int CMS_add0_cert(CMS_ContentInfo *cms, X509 *cert) in CMS_add0_cert() argument
526 pcerts = cms_get0_certificate_choices(cms); in CMS_add0_cert()
538 cch = CMS_add0_CertificateChoices(cms); in CMS_add0_cert()
546 int CMS_add1_cert(CMS_ContentInfo *cms, X509 *cert) in CMS_add1_cert() argument
549 r = CMS_add0_cert(cms, cert); in CMS_add1_cert()
556 **cms_get0_revocation_choices(CMS_ContentInfo *cms) in STACK_OF()
558 switch (OBJ_obj2nid(cms->contentType)) { in STACK_OF()
561 return &cms->d.signedData->crls; in STACK_OF()
564 if (cms->d.envelopedData->originatorInfo == NULL) in STACK_OF()
566 return &cms->d.envelopedData->originatorInfo->crls; in STACK_OF()
569 if (cms->d.authEnvelopedData->originatorInfo == NULL) in STACK_OF()
571 return &cms->d.authEnvelopedData->originatorInfo->crls; in STACK_OF()
580 CMS_RevocationInfoChoice *CMS_add0_RevocationInfoChoice(CMS_ContentInfo *cms) in CMS_add0_RevocationInfoChoice() argument
585 pcrls = cms_get0_revocation_choices(cms); in CMS_add0_RevocationInfoChoice()
602 int CMS_add0_crl(CMS_ContentInfo *cms, X509_CRL *crl) in CMS_add0_crl() argument
605 rch = CMS_add0_RevocationInfoChoice(cms); in CMS_add0_crl()
613 int CMS_add1_crl(CMS_ContentInfo *cms, X509_CRL *crl) in CMS_add1_crl() argument
616 r = CMS_add0_crl(cms, crl); in CMS_add1_crl()
622 STACK_OF(X509) *CMS_get1_certs(CMS_ContentInfo *cms) in STACK_OF()
629 pcerts = cms_get0_certificate_choices(cms); in STACK_OF()
646 STACK_OF(X509_CRL) *CMS_get1_crls(CMS_ContentInfo *cms) in STACK_OF()
653 pcrls = cms_get0_revocation_choices(cms); in STACK_OF()