Home
last modified time | relevance | path

Searched refs:cms (Results 1 – 25 of 34) sorted by relevance

12

/openbsd-src/lib/libcrypto/cms/
H A Dcms_smime.c135 check_content(CMS_ContentInfo *cms) in check_content() argument
137 ASN1_OCTET_STRING **pos = CMS_get0_content(cms); in check_content()
163 CMS_data(CMS_ContentInfo *cms, BIO *out, unsigned int flags) in CMS_data() argument
168 if (OBJ_obj2nid(CMS_get0_type(cms)) != NID_pkcs7_data) { in CMS_data()
172 cont = CMS_dataInit(cms, NULL); in CMS_data()
185 CMS_ContentInfo *cms; in CMS_data_create() local
187 cms = cms_Data_create(); in CMS_data_create()
188 if (!cms) in CMS_data_create()
191 if ((flags & CMS_STREAM) || CMS_final(cms, in, NULL, flags)) in CMS_data_create()
192 return cms; in CMS_data_create()
[all …]
H A Dcms_lib.c59 #include <openssl/cms.h>
107 CMS_get0_type(const CMS_ContentInfo *cms) in CMS_get0_type()
109 return cms->contentType;
116 CMS_ContentInfo *cms; in cms_Data_create()
118 cms = CMS_ContentInfo_new(); in cms_Data_create()
119 if (cms != NULL) { in cms_Data_create()
120 cms->contentType = OBJ_nid2obj(NID_pkcs7_data); in cms_Data_create()
122 CMS_set_detached(cms, 0); in cms_Data_create()
124 return cms;
128 cms_content_bio(CMS_ContentInfo *cms) in cms_content_bio()
104 CMS_get0_type(const CMS_ContentInfo * cms) CMS_get0_type() argument
113 CMS_ContentInfo *cms; cms_Data_create() local
125 cms_content_bio(CMS_ContentInfo * cms) cms_content_bio() argument
145 CMS_dataInit(CMS_ContentInfo * cms,BIO * in_content_bio) CMS_dataInit() argument
191 CMS_dataFinal(CMS_ContentInfo * cms,BIO * cmsbio) CMS_dataFinal() argument
238 CMS_get_version(const CMS_ContentInfo * cms,long * version) CMS_get_version() argument
286 CMS_get0_content(CMS_ContentInfo * cms) CMS_get0_content() argument
325 cms_get0_econtent_type(CMS_ContentInfo * cms) cms_get0_econtent_type() argument
353 CMS_get0_eContentType(CMS_ContentInfo * cms) CMS_get0_eContentType() argument
366 CMS_set1_eContentType(CMS_ContentInfo * cms,const ASN1_OBJECT * oid) CMS_set1_eContentType() argument
386 CMS_is_detached(CMS_ContentInfo * cms) CMS_is_detached() argument
401 CMS_set_detached(CMS_ContentInfo * cms,int detached) CMS_set_detached() argument
505 CMS_add0_CertificateChoices(CMS_ContentInfo * cms) CMS_add0_CertificateChoices() argument
530 CMS_add0_cert(CMS_ContentInfo * cms,X509 * cert) CMS_add0_cert() argument
559 CMS_add1_cert(CMS_ContentInfo * cms,X509 * cert) CMS_add1_cert() argument
590 CMS_add0_RevocationInfoChoice(CMS_ContentInfo * cms) CMS_add0_RevocationInfoChoice() argument
615 CMS_add0_crl(CMS_ContentInfo * cms,X509_CRL * crl) CMS_add0_crl() argument
630 CMS_add1_crl(CMS_ContentInfo * cms,X509_CRL * crl) CMS_add1_crl() argument
[all...]
H A Dcms.h132 const ASN1_OBJECT *CMS_get0_type(const CMS_ContentInfo *cms);
134 int CMS_get_version(const CMS_ContentInfo *cms, long *version);
137 BIO *CMS_dataInit(CMS_ContentInfo *cms, BIO *icont);
138 int CMS_dataFinal(CMS_ContentInfo *cms, BIO *bio);
140 ASN1_OCTET_STRING **CMS_get0_content(CMS_ContentInfo *cms);
141 int CMS_is_detached(CMS_ContentInfo *cms);
142 int CMS_set_detached(CMS_ContentInfo *cms, int detached);
150 int CMS_stream(unsigned char ***boundary, CMS_ContentInfo *cms);
151 CMS_ContentInfo *d2i_CMS_bio(BIO *bp, CMS_ContentInfo **cms);
152 int i2d_CMS_bio(BIO *bp, CMS_ContentInfo *cms);
[all …]
H A Dcms_io.c65 CMS_stream(unsigned char ***boundary, CMS_ContentInfo *cms) in CMS_stream() argument
69 if ((pos = CMS_get0_content(cms)) == NULL) in CMS_stream()
88 d2i_CMS_bio(BIO *bp, CMS_ContentInfo **cms) in d2i_CMS_bio() argument
90 return ASN1_item_d2i_bio(&CMS_ContentInfo_it, bp, cms); in d2i_CMS_bio()
95 i2d_CMS_bio(BIO *bp, CMS_ContentInfo *cms) in i2d_CMS_bio() argument
97 return ASN1_item_i2d_bio(&CMS_ContentInfo_it, bp, cms); in i2d_CMS_bio()
135 BIO_new_CMS(BIO *out, CMS_ContentInfo *cms) in BIO_new_CMS() argument
137 return BIO_new_NDEF(out, (ASN1_VALUE *)cms, &CMS_ContentInfo_it); in BIO_new_CMS()
144 i2d_CMS_bio_stream(BIO *out, CMS_ContentInfo *cms, BIO *in, int flags) in i2d_CMS_bio_stream() argument
146 return i2d_ASN1_bio_stream(out, (ASN1_VALUE *)cms, in, flags, in i2d_CMS_bio_stream()
[all …]
H A Dcms_env.c61 #include <openssl/cms.h>
73 cms_get0_enveloped(CMS_ContentInfo *cms) in cms_get0_enveloped()
75 if (OBJ_obj2nid(cms->contentType) != NID_pkcs7_enveloped) { in cms_get0_enveloped()
79 return cms->d.envelopedData; in cms_get0_enveloped()
83 cms_enveloped_data_init(CMS_ContentInfo *cms) in cms_enveloped_data_init()
85 if (cms->d.other == NULL) { in cms_enveloped_data_init()
86 cms->d.envelopedData = (CMS_EnvelopedData *)ASN1_item_new(&CMS_EnvelopedData_it); in cms_enveloped_data_init()
87 if (!cms->d.envelopedData) { in cms_enveloped_data_init()
91 cms->d.envelopedData->version = 0; in cms_enveloped_data_init()
92 cms in cms_enveloped_data_init()
72 cms_get0_enveloped(CMS_ContentInfo * cms) cms_get0_enveloped() argument
82 cms_enveloped_data_init(CMS_ContentInfo * cms) cms_enveloped_data_init() argument
167 CMS_ContentInfo *cms; CMS_EnvelopedData_create() local
246 CMS_add1_recipient_cert(CMS_ContentInfo * cms,X509 * recip,unsigned int flags) CMS_add1_recipient_cert() argument
367 cms_RecipientInfo_ktri_encrypt(CMS_ContentInfo * cms,CMS_RecipientInfo * ri) cms_RecipientInfo_ktri_encrypt() argument
433 cms_RecipientInfo_ktri_decrypt(CMS_ContentInfo * cms,CMS_RecipientInfo * ri) cms_RecipientInfo_ktri_decrypt() argument
558 CMS_add0_recipient_key(CMS_ContentInfo * cms,int nid,unsigned char * key,size_t keylen,unsigned char * id,size_t idlen,ASN1_GENERALIZEDTIME * date,ASN1_OBJECT * otherTypeId,ASN1_TYPE * otherType) CMS_add0_recipient_key() argument
711 cms_RecipientInfo_kekri_encrypt(CMS_ContentInfo * cms,CMS_RecipientInfo * ri) cms_RecipientInfo_kekri_encrypt() argument
760 cms_RecipientInfo_kekri_decrypt(CMS_ContentInfo * cms,CMS_RecipientInfo * ri) cms_RecipientInfo_kekri_decrypt() argument
825 CMS_RecipientInfo_decrypt(CMS_ContentInfo * cms,CMS_RecipientInfo * ri) CMS_RecipientInfo_decrypt() argument
845 CMS_RecipientInfo_encrypt(CMS_ContentInfo * cms,CMS_RecipientInfo * ri) CMS_RecipientInfo_encrypt() argument
936 cms_EnvelopedData_init_bio(CMS_ContentInfo * cms) cms_EnvelopedData_init_bio() argument
[all...]
H A Dcms_dd.c71 CMS_ContentInfo *cms; in cms_DigestedData_create() local
74 cms = CMS_ContentInfo_new(); in cms_DigestedData_create()
75 if (cms == NULL) in cms_DigestedData_create()
83 cms->contentType = OBJ_nid2obj(NID_pkcs7_digest); in cms_DigestedData_create()
84 cms->d.digestedData = dd; in cms_DigestedData_create()
92 return cms; in cms_DigestedData_create()
95 CMS_ContentInfo_free(cms); in cms_DigestedData_create()
101 cms_DigestedData_init_bio(CMS_ContentInfo *cms) in cms_DigestedData_init_bio() argument
105 dd = cms->d.digestedData; in cms_DigestedData_init_bio()
111 cms_DigestedData_do_final(CMS_ContentInfo *cms, BIO *chain, int verify) in cms_DigestedData_do_final() argument
[all …]
H A Dcms_sd.c75 cms_get0_signed(CMS_ContentInfo *cms) in cms_get0_signed() argument
77 if (OBJ_obj2nid(cms->contentType) != NID_pkcs7_signed) { in cms_get0_signed()
81 return cms->d.signedData; in cms_get0_signed()
85 cms_signed_data_init(CMS_ContentInfo *cms) in cms_signed_data_init() argument
87 if (cms->d.other == NULL) { in cms_signed_data_init()
88 cms->d.signedData = (CMS_SignedData *)ASN1_item_new(&CMS_SignedData_it); in cms_signed_data_init()
89 if (!cms->d.signedData) { in cms_signed_data_init()
93 cms->d.signedData->version = 1; in cms_signed_data_init()
94 cms->d.signedData->encapContentInfo->eContentType = in cms_signed_data_init()
96 cms->d.signedData->encapContentInfo->partial = 1; in cms_signed_data_init()
[all …]
H A Dcms_enc.c60 #include <openssl/cms.h>
230 CMS_EncryptedData_set1_key(CMS_ContentInfo *cms, const EVP_CIPHER *ciph, in CMS_EncryptedData_set1_key() argument
240 cms->d.encryptedData = (CMS_EncryptedData *)ASN1_item_new(&CMS_EncryptedData_it); in CMS_EncryptedData_set1_key()
241 if (!cms->d.encryptedData) { in CMS_EncryptedData_set1_key()
245 cms->contentType = OBJ_nid2obj(NID_pkcs7_encrypted); in CMS_EncryptedData_set1_key()
246 cms->d.encryptedData->version = 0; in CMS_EncryptedData_set1_key()
247 } else if (OBJ_obj2nid(cms->contentType) != NID_pkcs7_encrypted) { in CMS_EncryptedData_set1_key()
251 ec = cms->d.encryptedData->encryptedContentInfo; in CMS_EncryptedData_set1_key()
258 cms_EncryptedData_init_bio(CMS_ContentInfo *cms) in cms_EncryptedData_init_bio() argument
260 CMS_EncryptedData *enc = cms in cms_EncryptedData_init_bio()
[all...]
H A Dcms_local.h414 BIO *cms_DigestedData_init_bio(CMS_ContentInfo *cms);
415 int cms_DigestedData_do_final(CMS_ContentInfo *cms, BIO *chain, int verify);
417 BIO *cms_SignedData_init_bio(CMS_ContentInfo *cms);
418 int cms_SignedData_final(CMS_ContentInfo *cms, BIO *chain);
434 BIO *cms_EncryptedData_init_bio(CMS_ContentInfo *cms);
438 int cms_Receipt_verify(CMS_ContentInfo *cms, CMS_ContentInfo *req_cms);
442 BIO *cms_EnvelopedData_init_bio(CMS_ContentInfo *cms);
443 CMS_EnvelopedData *cms_get0_enveloped(CMS_ContentInfo *cms);
449 int cms_RecipientInfo_kari_encrypt(CMS_ContentInfo *cms, CMS_RecipientInfo *ri);
452 int cms_RecipientInfo_pwri_crypt(CMS_ContentInfo *cms, CMS_RecipientInfo *ri,
H A Dcms_ess.c59 #include <openssl/cms.h>
252 cms_Receipt_verify(CMS_ContentInfo *cms, CMS_ContentInfo *req_cms) in cms_Receipt_verify()
266 sis = CMS_get0_SignerInfos(cms); in cms_Receipt_verify()
276 if (OBJ_obj2nid(CMS_get0_eContentType(cms)) != NID_id_smime_ct_receipt) { in cms_Receipt_verify()
282 pcont = CMS_get0_content(cms); in cms_Receipt_verify()
251 cms_Receipt_verify(CMS_ContentInfo * cms,CMS_ContentInfo * req_cms) cms_Receipt_verify() argument
H A Dcms_pwri.c93 CMS_add0_recipient_password(CMS_ContentInfo *cms, int iter, int wrap_nid, in CMS_add0_recipient_password() argument
105 env = cms_get0_enveloped(cms); in CMS_add0_recipient_password()
330 cms_RecipientInfo_pwri_crypt(CMS_ContentInfo *cms, CMS_RecipientInfo *ri, in cms_RecipientInfo_pwri_crypt() argument
342 ec = cms->d.envelopedData->encryptedContentInfo; in cms_RecipientInfo_pwri_crypt()
H A Dcms_kari.c59 #include <openssl/cms.h>
289 CMS_RecipientInfo_kari_decrypt(CMS_ContentInfo *cms, CMS_RecipientInfo *ri,
306 ec = cms->d.envelopedData->encryptedContentInfo; in CMS_RecipientInfo_kari_decrypt()
444 cms_RecipientInfo_kari_encrypt(CMS_ContentInfo *cms, CMS_RecipientInfo *ri)
458 ec = cms->d.envelopedData->encryptedContentInfo; in cms_RecipientInfo_kari_encrypt()
291 CMS_RecipientInfo_kari_decrypt(CMS_ContentInfo * cms,CMS_RecipientInfo * ri,CMS_RecipientEncryptedKey * rek) CMS_RecipientInfo_kari_decrypt() argument
446 cms_RecipientInfo_kari_encrypt(CMS_ContentInfo * cms,CMS_RecipientInfo * ri) cms_RecipientInfo_kari_encrypt() argument
/openbsd-src/usr.sbin/rpki-client/
H A Dcms.c1 /* $OpenBSD: cms.c,v 1.50 2024/11/27 15:19:26 tb Exp $ */
25 #include <openssl/cms.h>
34 cms_extract_econtent(const char *fn, CMS_ContentInfo *cms, unsigned char **res, in cms_extract_econtent() argument
43 if ((os = CMS_get0_content(cms)) == NULL || *os == NULL) { in cms_extract_econtent()
100 CMS_ContentInfo *cms; in cms_parse_validate_internal() local
123 if ((cms = d2i_CMS_ContentInfo(NULL, &der, len)) == NULL) { in cms_parse_validate_internal()
136 if (!CMS_verify(cms, NULL, NULL, bio, NULL, in cms_parse_validate_internal()
144 /* Should only return NULL if cms is not of type SignedData. */ in cms_parse_validate_internal()
145 if ((sinfos = CMS_get0_SignerInfos(cms)) == NULL) { in cms_parse_validate_internal()
146 if ((obj = CMS_get0_type(cms)) in cms_parse_validate_internal()
[all...]
H A Dgbr.c41 unsigned char *cms; in gbr_parse() local
44 cms = cms_parse_validate(x509, fn, der, len, gbr_oid, &cmsz, &signtime); in gbr_parse()
45 if (cms == NULL) in gbr_parse()
51 if ((gbr->vcard = strndup(cms, cmsz)) == NULL) in gbr_parse()
53 free(cms); in gbr_parse()
H A Dtak.c210 unsigned char *cms; in tak_parse()
215 cms = cms_parse_validate(x509, fn, der, len, tak_oid, &cmsz, &signtime); in tak_parse()
216 if (cms == NULL) in tak_parse()
248 if (!tak_parse_econtent(fn, tak, cms, cmsz)) in tak_parse()
268 free(cms); in tak_parse()
209 unsigned char *cms; tak_parse() local
H A Daspa.c169 unsigned char *cms; in aspa_parse() local
174 cms = cms_parse_validate(x509, fn, der, len, aspa_oid, &cmsz, in aspa_parse()
176 if (cms == NULL) in aspa_parse()
214 if (!aspa_parse_econtent(fn, aspa, cms, cmsz)) in aspa_parse()
231 free(cms); in aspa_parse()
H A Drsc.c386 unsigned char *cms; in rsc_parse() local
392 cms = cms_parse_validate(x509, fn, der, len, rsc_oid, &cmsz, in rsc_parse()
394 if (cms == NULL) in rsc_parse()
428 if (!rsc_parse_econtent(fn, rsc, cms, cmsz)) in rsc_parse()
445 free(cms); in rsc_parse()
H A Droa.c243 unsigned char *cms; in roa_parse() local
248 cms = cms_parse_validate(x509, fn, der, len, roa_oid, &cmsz, &signtime); in roa_parse()
249 if (cms == NULL) in roa_parse()
276 if (!roa_parse_econtent(fn, roa, cms, cmsz)) in roa_parse()
312 free(cms);
H A Dspl.c250 unsigned char *cms; in spl_parse() local
255 cms = cms_parse_validate(x509, fn, der, len, spl_oid, &cmsz, &signtime); in spl_parse()
256 if (cms == NULL) in spl_parse()
283 if (!spl_parse_econtent(fn, spl, cms, cmsz)) in spl_parse()
319 free(cms); in spl_parse()
H A Dmft.c425 unsigned char *cms; in mft_parse()
429 cms = cms_parse_validate(x509, fn, der, len, mft_oid, &cmsz, &signtime); in mft_parse()
430 if (cms == NULL) in mft_parse()
482 if (mft_parse_econtent(fn, mft, cms, cmsz) == 0) in mft_parse()
504 free(cms);
419 unsigned char *cms; mft_parse() local
/openbsd-src/usr.bin/openssl/
H A Dcms.c1 /* $OpenBSD: cms.c,v 1.36 2024/08/12 15:34:58 job Exp $ */
69 #include <openssl/cms.h>
72 static void receipt_request_print(BIO *out, CMS_ContentInfo *cms);
1118 fprintf(stderr, "usage: cms " in cms_usage()
1164 CMS_ContentInfo *cms = NULL, *rcms = NULL; in cms_main()
1382 cms = SMIME_read_CMS(in, &indata); in cms_main()
1384 cms = PEM_read_bio_CMS(in, NULL, NULL, NULL); in cms_main()
1386 cms = d2i_CMS_bio(in, NULL); in cms_main()
1392 if (cms == NULL) { in cms_main()
1408 if ((allcerts = CMS_get1_certs(cms)) in cms_main()
1156 CMS_ContentInfo *cms = NULL, *rcms = NULL; cms_main() local
1825 receipt_request_print(BIO * out,CMS_ContentInfo * cms) receipt_request_print() argument
[all...]
/openbsd-src/regress/usr.sbin/rpki-client/
H A DMakefile.inc30 validate.c as.c cert.c cms.c crl.c mft.c json.c \
39 SRCS_test-cert+= test-cert.c cert.c cms.c crl.c x509.c ip.c as.c io.c \
46 SRCS_test-mft+= test-mft.c mft.c crl.c cms.c x509.c ip.c io.c validate.c \
52 SRCS_test-roa+= test-roa.c roa.c cms.c x509.c ip.c as.c io.c json.c \
58 SRCS_test-rsc+= test-rsc.c rsc.c cms.c x509.c ip.c as.c io.c \
64 SRCS_test-gbr+= test-gbr.c gbr.c cms.c crl.c x509.c ip.c io.c \
70 SRCS_test-geofeed+= test-geofeed.c geofeed.c cms.c x509.c ip.c io.c \
76 SRCS_test-tal+= test-tal.c tal.c ip.c io.c validate.c cms.c \
82 SRCS_test-aspa+= test-aspa.c aspa.c cms.c x509.c ip.c as.c io.c \
88 SRCS_test-tak+= test-tak.c tak.c cms
[all...]
/openbsd-src/regress/usr.sbin/rpki-client/openssl11/
H A Dunistd.h
/openbsd-src/regress/lib/libcrypto/x509/bettertls/certificates/
H A D1175.key13 cms/j/ECgYEA2zEbBfQa+nuH63pxExGF3e89S9zFhGtrF1pe8qiwOAGgXiDUHKCo
/openbsd-src/regress/lib/libcrypto/free/
H A Dfreenull.c.head5 #include <openssl/cms.h>

12