| /freebsd-14.2/crypto/openssl/crypto/cms/ |
| H A D | cms_lib.c | 74 return cms != NULL ? &cms->ctx : NULL; in ossl_cms_get0_cmsctx() 111 return cms->contentType; in CMS_get0_type() 118 if (cms != NULL) { in ossl_cms_Data_create() 121 CMS_set_detached(cms, 0); in ossl_cms_Data_create() 123 return cms; in ossl_cms_Data_create() 150 cont = ossl_cms_content_bio(cms); in CMS_dataInit() 260 return &cms->d.data; in CMS_get0_content() 360 pos = CMS_get0_content(cms); in CMS_is_detached() 372 pos = CMS_get0_content(cms); in CMS_set_detached() 540 r = CMS_add0_cert(cms, cert); in CMS_add1_cert() [all …]
|
| H A D | cms_smime.c | 126 if (cms == NULL) in CMS_data_create_ex() 130 return cms; in CMS_data_create_ex() 179 if (cms == NULL) in CMS_digest_create_ex() 186 return cms; in CMS_digest_create_ex() 236 if (cms == NULL) in CMS_EncryptedData_encrypt_ex() 246 return cms; in CMS_EncryptedData_encrypt_ex() 514 if (cms == NULL || !CMS_SignedData_init(cms)) in CMS_sign_ex() 538 return cms; in CMS_sign_ex() 622 return cms; in CMS_sign_receipt() 656 return cms; in CMS_encrypt_ex() [all …]
|
| H A D | cms_io.c | 21 pos = CMS_get0_content(cms); in CMS_stream() 36 CMS_ContentInfo *d2i_CMS_bio(BIO *bp, CMS_ContentInfo **cms) in d2i_CMS_bio() argument 39 const CMS_CTX *ctx = ossl_cms_get0_cmsctx(cms == NULL ? NULL : *cms); in d2i_CMS_bio() 52 int i2d_CMS_bio(BIO *bp, CMS_ContentInfo *cms) in i2d_CMS_bio() argument 59 BIO *BIO_new_CMS(BIO *out, CMS_ContentInfo *cms) in IMPLEMENT_PEM_rw() 61 return BIO_new_NDEF(out, (ASN1_VALUE *)cms, in IMPLEMENT_PEM_rw() 83 int ctype_nid = OBJ_obj2nid(cms->contentType); in SMIME_write_CMS() 85 const CMS_CTX *ctx = ossl_cms_get0_cmsctx(cms); in SMIME_write_CMS() 88 mdalgs = cms->d.signedData->digestAlgorithms; in SMIME_write_CMS() 100 CMS_ContentInfo **cms) in SMIME_read_CMS_ex() argument [all …]
|
| H A D | cms_env.c | 60 return cms->d.envelopedData; in ossl_cms_get0_enveloped() 74 if (cms->d.other == NULL) { in cms_enveloped_data_init() 93 if (cms->d.other == NULL) { in cms_auth_enveloped_data_init() 230 CMS_ContentInfo *cms; in CMS_EnvelopedData_create_ex() local 234 if (cms == NULL) in CMS_EnvelopedData_create_ex() 243 return cms; in CMS_EnvelopedData_create_ex() 245 CMS_ContentInfo_free(cms); in CMS_EnvelopedData_create_ex() 259 CMS_ContentInfo *cms; in CMS_AuthEnvelopedData_create_ex() local 263 if (cms == NULL) in CMS_AuthEnvelopedData_create_ex() 272 return cms; in CMS_AuthEnvelopedData_create_ex() [all …]
|
| H A D | cms_dd.c | 24 CMS_ContentInfo *cms; in ossl_cms_DigestedData_create() local 27 cms = CMS_ContentInfo_new_ex(libctx, propq); in ossl_cms_DigestedData_create() 28 if (cms == NULL) in ossl_cms_DigestedData_create() 36 cms->contentType = OBJ_nid2obj(NID_pkcs7_digest); in ossl_cms_DigestedData_create() 37 cms->d.digestedData = dd; in ossl_cms_DigestedData_create() 44 return cms; in ossl_cms_DigestedData_create() 47 CMS_ContentInfo_free(cms); in ossl_cms_DigestedData_create() 51 BIO *ossl_cms_DigestedData_init_bio(const CMS_ContentInfo *cms) in ossl_cms_DigestedData_init_bio() argument 53 CMS_DigestedData *dd = cms->d.digestedData; in ossl_cms_DigestedData_init_bio() 56 ossl_cms_get0_cmsctx(cms)); in ossl_cms_DigestedData_init_bio() [all …]
|
| H A D | cms_cd.c | 28 CMS_ContentInfo *cms; in ossl_cms_CompressedData_create() local 39 cms = CMS_ContentInfo_new_ex(libctx, propq); in ossl_cms_CompressedData_create() 40 if (cms == NULL) in ossl_cms_CompressedData_create() 48 cms->contentType = OBJ_nid2obj(NID_id_smime_ct_compressedData); in ossl_cms_CompressedData_create() 49 cms->d.compressedData = cd; in ossl_cms_CompressedData_create() 58 return cms; in ossl_cms_CompressedData_create() 61 CMS_ContentInfo_free(cms); in ossl_cms_CompressedData_create() 65 BIO *ossl_cms_CompressedData_init_bio(const CMS_ContentInfo *cms) in ossl_cms_CompressedData_init_bio() argument 70 if (OBJ_obj2nid(cms->contentType) != NID_id_smime_ct_compressedData) { in ossl_cms_CompressedData_init_bio() 74 cd = cms->d.compressedData; in ossl_cms_CompressedData_init_bio()
|
| H A D | cms_sd.c | 33 return cms->d.signedData; in cms_get0_signed() 38 if (cms->d.other == NULL) { in cms_signed_data_init() 40 if (!cms->d.signedData) { in cms_signed_data_init() 44 cms->d.signedData->version = 1; in cms_signed_data_init() 50 return cms->d.signedData; in cms_signed_data_init() 52 return cms_get0_signed(cms); in cms_signed_data_init() 59 if (cms_signed_data_init(cms)) in CMS_SignedData_init() 146 sinfos = CMS_get0_SignerInfos(cms); in cms_copy_messageDigest() 319 sd = cms_signed_data_init(cms); in CMS_add1_signer() 627 sd = cms_get0_signed(cms); in CMS_set1_signers_certs() [all …]
|
| H A D | cms_local.h | 392 BIO *ossl_cms_content_bio(CMS_ContentInfo *cms); 393 const CMS_CTX *ossl_cms_get0_cmsctx(const CMS_ContentInfo *cms); 403 BIO *ossl_cms_DigestedData_init_bio(const CMS_ContentInfo *cms); 404 int ossl_cms_DigestedData_do_final(const CMS_ContentInfo *cms, 407 BIO *ossl_cms_SignedData_init_bio(CMS_ContentInfo *cms); 408 int ossl_cms_SignedData_final(CMS_ContentInfo *cms, BIO *chain); 434 BIO *ossl_cms_EncryptedData_init_bio(const CMS_ContentInfo *cms); 444 BIO *ossl_cms_EnvelopedData_init_bio(CMS_ContentInfo *cms); 446 BIO *ossl_cms_AuthEnvelopedData_init_bio(CMS_ContentInfo *cms); 457 void ossl_cms_RecipientInfos_set_cmsctx(CMS_ContentInfo *cms); [all …]
|
| H A D | cms_enc.c | 226 int CMS_EncryptedData_set1_key(CMS_ContentInfo *cms, const EVP_CIPHER *ciph, in CMS_EncryptedData_set1_key() argument 236 cms->d.encryptedData = M_ASN1_new_of(CMS_EncryptedData); in CMS_EncryptedData_set1_key() 237 if (!cms->d.encryptedData) { in CMS_EncryptedData_set1_key() 241 cms->contentType = OBJ_nid2obj(NID_pkcs7_encrypted); in CMS_EncryptedData_set1_key() 242 cms->d.encryptedData->version = 0; in CMS_EncryptedData_set1_key() 243 } else if (OBJ_obj2nid(cms->contentType) != NID_pkcs7_encrypted) { in CMS_EncryptedData_set1_key() 247 ec = cms->d.encryptedData->encryptedContentInfo; in CMS_EncryptedData_set1_key() 249 ossl_cms_get0_cmsctx(cms)); in CMS_EncryptedData_set1_key() 252 BIO *ossl_cms_EncryptedData_init_bio(const CMS_ContentInfo *cms) in ossl_cms_EncryptedData_init_bio() argument 254 CMS_EncryptedData *enc = cms->d.encryptedData; in ossl_cms_EncryptedData_init_bio() [all …]
|
| /freebsd-14.2/crypto/heimdal/lib/hx509/ |
| H A D | test_cms.in | 69 ${hxtool} cms-create-sd \ 75 ${hxtool} cms-verify-sd \ 82 ${hxtool} cms-create-sd \ 89 ${hxtool} cms-verify-sd \ 98 ${hxtool} cms-verify-sd \ 105 ${hxtool} cms-create-sd \ 404 ${hxtool} cms-sign \ 419 ${hxtool} cms-sign \ 428 ${hxtool} cms-sign \ 437 ${hxtool} cms-sign \ [all …]
|
| /freebsd-14.2/crypto/openssl/include/openssl/ |
| H A D | cms.h.in | 98 BIO *CMS_dataInit(CMS_ContentInfo *cms, BIO *icont); 99 int CMS_dataFinal(CMS_ContentInfo *cms, BIO *bio); 102 int CMS_is_detached(CMS_ContentInfo *cms); 110 int i2d_CMS_bio(BIO *bp, CMS_ContentInfo *cms); 112 BIO *BIO_new_CMS(BIO *out, CMS_ContentInfo *cms); 148 int CMS_EncryptedData_decrypt(CMS_ContentInfo *cms, 185 int CMS_decrypt_set1_key(CMS_ContentInfo *cms, 188 int CMS_decrypt_set1_password(CMS_ContentInfo *cms, 259 int CMS_add0_cert(CMS_ContentInfo *cms, X509 *cert); 260 int CMS_add1_cert(CMS_ContentInfo *cms, X509 *cert); [all …]
|
| H A D | cms.h | 196 BIO *CMS_dataInit(CMS_ContentInfo *cms, BIO *icont); 197 int CMS_dataFinal(CMS_ContentInfo *cms, BIO *bio); 200 int CMS_is_detached(CMS_ContentInfo *cms); 208 int i2d_CMS_bio(BIO *bp, CMS_ContentInfo *cms); 210 BIO *BIO_new_CMS(BIO *out, CMS_ContentInfo *cms); 246 int CMS_EncryptedData_decrypt(CMS_ContentInfo *cms, 283 int CMS_decrypt_set1_key(CMS_ContentInfo *cms, 286 int CMS_decrypt_set1_password(CMS_ContentInfo *cms, 357 int CMS_add0_cert(CMS_ContentInfo *cms, X509 *cert); 358 int CMS_add1_cert(CMS_ContentInfo *cms, X509 *cert); [all …]
|
| /freebsd-14.2/crypto/openssl/doc/man3/ |
| H A D | CMS_add0_cert.pod | 10 #include <openssl/cms.h> 12 int CMS_add0_cert(CMS_ContentInfo *cms, X509 *cert); 13 int CMS_add1_cert(CMS_ContentInfo *cms, X509 *cert); 14 STACK_OF(X509) *CMS_get1_certs(CMS_ContentInfo *cms); 16 int CMS_add0_crl(CMS_ContentInfo *cms, X509_CRL *crl); 17 int CMS_add1_crl(CMS_ContentInfo *cms, X509_CRL *crl); 18 STACK_OF(X509_CRL) *CMS_get1_crls(CMS_ContentInfo *cms); 30 CMS_get1_certs() returns all certificates in I<cms>. 32 CMS_add0_crl() and CMS_add1_crl() add CRL I<crl> to I<cms>. 39 CMS_get1_crls() returns all CRLs in I<cms>. [all …]
|
| /freebsd-14.2/crypto/openssl/demos/cms/ |
| H A D | cms_sign2.c | 20 CMS_ContentInfo *cms = NULL; in main() local 58 cms = CMS_sign(NULL, NULL, NULL, in, CMS_STREAM | CMS_PARTIAL); in main() 60 if (!cms) in main() 65 if (!CMS_add1_signer(cms, scert, skey, NULL, 0)) in main() 68 if (!CMS_add1_signer(cms, scert2, skey2, NULL, 0)) in main() 77 if (!SMIME_write_CMS(out, cms, in, CMS_STREAM)) in main() 89 CMS_ContentInfo_free(cms); in main()
|
| H A D | cms_denc.c | 23 CMS_ContentInfo *cms = NULL; in main() local 64 cms = CMS_encrypt(recips, in, EVP_des_ede3_cbc(), flags); in main() 66 if (!cms) in main() 73 if (!CMS_final(cms, in, dout, flags)) in main() 77 if (!PEM_write_bio_CMS(out, cms)) in main() 89 CMS_ContentInfo_free(cms); in main()
|
| H A D | cms_uncomp.c | 18 CMS_ContentInfo *cms = NULL; in main() local 32 cms = SMIME_read_CMS(in, NULL); in main() 34 if (!cms) in main() 42 if (!CMS_uncompress(cms, out, NULL, 0)) in main() 54 CMS_ContentInfo_free(cms); in main()
|
| H A D | cms_comp.c | 18 CMS_ContentInfo *cms = NULL; in main() local 38 cms = CMS_compress(in, NID_zlib_compression, flags); in main() 40 if (!cms) in main() 48 if (!SMIME_write_CMS(out, cms, in, flags)) in main() 60 CMS_ContentInfo_free(cms); in main()
|
| H A D | cms_dec.c | 20 CMS_ContentInfo *cms = NULL; in main() local 49 cms = SMIME_read_CMS(in, NULL); in main() 51 if (!cms) in main() 59 if (!CMS_decrypt(cms, rkey, rcert, NULL, out, 0)) in main() 71 CMS_ContentInfo_free(cms); in main()
|
| H A D | cms_ddec.c | 23 CMS_ContentInfo *cms = NULL; in main() local 52 cms = PEM_read_bio_CMS(in, NULL, 0, NULL); in main() 54 if (!cms) in main() 68 if (!CMS_decrypt(cms, rkey, rcert, dcont, out, 0)) in main() 80 CMS_ContentInfo_free(cms); in main()
|
| H A D | cms_sign.c | 20 CMS_ContentInfo *cms = NULL; in main() local 56 cms = CMS_sign(scert, skey, NULL, in, flags); in main() 58 if (!cms) in main() 69 if (!SMIME_write_CMS(out, cms, in, flags)) in main() 81 CMS_ContentInfo_free(cms); in main()
|
| H A D | cms_ver.c | 20 CMS_ContentInfo *cms = NULL; in main() local 55 cms = SMIME_read_CMS(in, &cont); in main() 57 if (cms == NULL) in main() 65 if (!CMS_verify(cms, NULL, st, cont, out, 0)) { in main() 82 CMS_ContentInfo_free(cms); in main()
|
| /freebsd-14.2/crypto/openssl/apps/ |
| H A D | cms.c | 904 if (cms == NULL) in cms_main() 965 if (cms == NULL) in cms_main() 1044 sis = CMS_get0_SignerInfos(cms); in cms_main() 1051 CMS_ContentInfo_free(cms); in cms_main() 1052 cms = srcms; in cms_main() 1067 if (cms == NULL) in cms_main() 1128 if (cms == NULL) { in cms_main() 1166 if (!CMS_data(cms, out, flags)) in cms_main() 1205 receipt_request_print(cms); in cms_main() 1285 CMS_ContentInfo_free(cms); in cms_main() [all …]
|
| /freebsd-14.2/crypto/openssl/fuzz/ |
| H A D | cms.c | 30 CMS_ContentInfo *cms; in FuzzerTestOneInput() local 38 cms = d2i_CMS_bio(in, NULL); in FuzzerTestOneInput() 39 if (cms != NULL) { in FuzzerTestOneInput() 42 i2d_CMS_bio(out, cms); in FuzzerTestOneInput() 44 CMS_ContentInfo_free(cms); in FuzzerTestOneInput()
|
| H A D | build.info | 18 IF[{- !$disabled{"cms"} -}] 19 PROGRAMS{noinst}=cms 54 SOURCE[cms]=cms.c driver.c 55 INCLUDE[cms]=../include {- $ex_inc -} 56 DEPEND[cms]=../libcrypto {- $ex_lib -} 86 IF[{- !$disabled{"cms"} -}] 87 PROGRAMS{noinst}=cms-test 123 SOURCE[cms-test]=cms.c test-corpus.c 124 INCLUDE[cms-test]=../include 125 DEPEND[cms-test]=../libcrypto
|
| /freebsd-14.2/crypto/openssl/test/ |
| H A D | cmsapitest.c | 85 CMS_ContentInfo *cms = NULL; in test_d2i_CMS_bio_NULL() local 284 && TEST_ptr(cms = d2i_CMS_bio(bio, NULL)) in test_d2i_CMS_bio_NULL() 285 && TEST_true(CMS_verify(cms, NULL, NULL, NULL, NULL, in test_d2i_CMS_bio_NULL() 287 CMS_ContentInfo_free(cms); in test_d2i_CMS_bio_NULL() 324 CMS_ContentInfo *cms = NULL; in test_d2i_CMS_decode() local 335 if (!TEST_ptr(cms = d2i_CMS_bio(bio, NULL))) in test_d2i_CMS_decode() 342 if (!TEST_ptr(cms = d2i_CMS_ContentInfo(NULL, &tmp, buf_len))) in test_d2i_CMS_decode() 352 CMS_ContentInfo_free(cms); in test_d2i_CMS_decode()
|