/openbsd/lib/libcrypto/cms/ |
H A D | cms_smime.c | 188 if (!cms) in CMS_data_create() 192 return cms; in CMS_data_create() 234 if (!cms) in CMS_digest_create() 241 return cms; in CMS_digest_create() 297 return cms; in CMS_EncryptedData_encrypt() 526 if (cms == NULL || !CMS_SignedData_init(cms)) in CMS_sign() 548 return cms; in CMS_sign() 583 if (!cms) in CMS_sign_receipt() 623 return cms; in CMS_sign_receipt() 639 if (!cms) in CMS_encrypt() [all …]
|
H A D | cms_lib.c | 109 return cms->contentType; in CMS_get0_type() 116 CMS_ContentInfo *cms; in cms_Data_create() local 118 cms = CMS_ContentInfo_new(); in cms_Data_create() 119 if (cms != NULL) { in cms_Data_create() 122 CMS_set_detached(cms, 0); in cms_Data_create() 124 return cms; in cms_Data_create() 293 return &cms->d.data; in CMS_get0_content() 393 pos = CMS_get0_content(cms); in CMS_is_detached() 408 pos = CMS_get0_content(cms); in CMS_set_detached() 566 r = CMS_add0_cert(cms, cert); in CMS_add1_cert() [all …]
|
H A D | cms.h | 137 BIO *CMS_dataInit(CMS_ContentInfo *cms, BIO *icont); 138 int CMS_dataFinal(CMS_ContentInfo *cms, BIO *bio); 141 int CMS_is_detached(CMS_ContentInfo *cms); 152 int i2d_CMS_bio(BIO *bp, CMS_ContentInfo *cms); 154 BIO *BIO_new_CMS(BIO *out, CMS_ContentInfo *cms); 251 int CMS_add0_cert(CMS_ContentInfo *cms, X509 *cert); 252 int CMS_add1_cert(CMS_ContentInfo *cms, X509 *cert); 253 STACK_OF(X509) *CMS_get1_certs(CMS_ContentInfo *cms); 256 int CMS_add0_crl(CMS_ContentInfo *cms, X509_CRL *crl); 257 int CMS_add1_crl(CMS_ContentInfo *cms, X509_CRL *crl); [all …]
|
H A D | cms_io.c | 65 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 146 return i2d_ASN1_bio_stream(out, (ASN1_VALUE *)cms, in, flags, in i2d_CMS_bio_stream() 163 int ctype_nid = OBJ_obj2nid(cms->contentType); in SMIME_write_CMS() 164 int econt_nid = OBJ_obj2nid(CMS_get0_eContentType(cms)); in SMIME_write_CMS() [all …]
|
H A D | cms_env.c | 79 return cms->d.envelopedData; in cms_get0_enveloped() 85 if (cms->d.other == NULL) { in cms_enveloped_data_init() 87 if (!cms->d.envelopedData) { in cms_enveloped_data_init() 96 return cms->d.envelopedData; in cms_enveloped_data_init() 98 return cms_get0_enveloped(cms); in cms_enveloped_data_init() 138 env = cms_get0_enveloped(cms); in STACK_OF() 168 CMS_ContentInfo *cms; in CMS_EnvelopedData_create() local 171 cms = CMS_ContentInfo_new(); in CMS_EnvelopedData_create() 172 if (cms == NULL) in CMS_EnvelopedData_create() 181 return cms; in CMS_EnvelopedData_create() [all …]
|
H A D | cms_dd.c | 71 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 D | cms_sd.c | 81 return cms->d.signedData; in cms_get0_signed() 87 if (cms->d.other == NULL) { 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() 99 return cms->d.signedData; in cms_signed_data_init() 101 return cms_get0_signed(cms); in cms_signed_data_init() 109 if (cms_signed_data_init(cms)) in CMS_SignedData_init() 351 sd = cms_signed_data_init(cms); in CMS_add1_signer() 535 sd = cms_get0_signed(cms); in STACK_OF() 611 sd = cms_get0_signed(cms); in CMS_set1_signers_certs() [all …]
|
H A D | cms_enc.c | 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->d.encryptedData; in cms_EncryptedData_init_bio()
|
H A D | cms_local.h | 414 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 D | cms_ess.c | 252 cms_Receipt_verify(CMS_ContentInfo *cms, CMS_ContentInfo *req_cms) in cms_Receipt_verify() argument 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()
|
H A D | cms_pwri.c | 93 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 D | cms_kari.c | 289 CMS_RecipientInfo_kari_decrypt(CMS_ContentInfo *cms, CMS_RecipientInfo *ri, in CMS_RecipientInfo_kari_decrypt() argument 306 ec = cms->d.envelopedData->encryptedContentInfo; in CMS_RecipientInfo_kari_decrypt() 444 cms_RecipientInfo_kari_encrypt(CMS_ContentInfo *cms, CMS_RecipientInfo *ri) in cms_RecipientInfo_kari_encrypt() argument 458 ec = cms->d.envelopedData->encryptedContentInfo; in cms_RecipientInfo_kari_encrypt()
|
/openbsd/usr.sbin/rpki-client/ |
H A D | cms.c | 43 if ((os = CMS_get0_content(cms)) == NULL || *os == NULL) { in cms_extract_econtent() 100 CMS_ContentInfo *cms; in cms_parse_validate_internal() local 136 if (!CMS_verify(cms, NULL, NULL, bio, NULL, 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)) == NULL) { in cms_parse_validate_internal() 161 if (!CMS_get_version(cms, &version)) { in cms_parse_validate_internal() 272 obj = CMS_get0_eContentType(cms); in cms_parse_validate_internal() 316 crls = CMS_get1_crls(cms); in cms_parse_validate_internal() 328 certs = CMS_get0_signers(cms); in cms_parse_validate_internal() 359 if (!cms_extract_econtent(fn, cms, res, rsz)) in cms_parse_validate_internal() [all …]
|
H A D | gbr.c | 41 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 D | tak.c | 210 unsigned char *cms; in tak_parse() local 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()
|
H A D | aspa.c | 169 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 D | rsc.c | 386 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 D | roa.c | 243 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); in roa_parse()
|
H A D | spl.c | 250 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 D | mft.c | 425 unsigned char *cms; in mft_parse() local 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); in mft_parse()
|
/openbsd/usr.bin/openssl/ |
H A D | cms.c | 1386 cms = d2i_CMS_bio(in, NULL); in cms_main() 1392 if (cms == NULL) { in cms_main() 1480 if (cms == NULL) in cms_main() 1542 sis = CMS_get0_SignerInfos(cms); in cms_main() 1552 CMS_ContentInfo_free(cms); in cms_main() 1553 cms = srcms; in cms_main() 1568 if (cms == NULL) in cms_main() 1571 if (!CMS_set1_eContentType(cms, in cms_main() 1640 if (cms == NULL) { in cms_main() 1702 if (!CMS_add1_crl(cms, crl)) in cms_main() [all …]
|
/openbsd/regress/usr.sbin/rpki-client/ |
H A D | Makefile.inc | 30 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 \ 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.c x509.c ip.c as.c io.c \ 94 SRCS_test-spl+= test-spl.c spl.c cms.c x509.c ip.c as.c io.c \ [all …]
|
/openbsd/regress/usr.sbin/rpki-client/openssl/ |
H A D | unistd.h | 18 CMS_get_version(CMS_ContentInfo *cms, long *version) in CMS_get_version() argument
|
/openbsd/regress/lib/libcrypto/x509/bettertls/certificates/ |
H A D | 1175.key | 13 cms/j/ECgYEA2zEbBfQa+nuH63pxExGF3e89S9zFhGtrF1pe8qiwOAGgXiDUHKCo
|
/openbsd/regress/lib/libcrypto/free/ |
H A D | freenull.c.head | 5 #include <openssl/cms.h>
|