Home
last modified time | relevance | path

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

123

/openssl/crypto/cms/
H A Dcms_lib.c74 if (cms != NULL) { in CMS_ContentInfo_free()
82 return cms != NULL ? &cms->ctx : NULL; in ossl_cms_get0_cmsctx()
119 return cms->contentType; in CMS_get0_type()
126 if (cms != NULL) { in ossl_cms_Data_create()
129 CMS_set_detached(cms, 0); in ossl_cms_Data_create()
131 return cms; in ossl_cms_Data_create()
275 return &cms->d.data; in CMS_get0_content()
375 pos = CMS_get0_content(cms); in CMS_is_detached()
387 pos = CMS_get0_content(cms); in CMS_set_detached()
555 r = CMS_add0_cert(cms, cert); in CMS_add1_cert()
[all …]
H A Dcms_smime.c126 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()
513 if (cms == NULL || !CMS_SignedData_init(cms)) in CMS_sign_ex()
537 return cms; in CMS_sign_ex()
621 return cms; in CMS_sign_receipt()
654 return cms; in CMS_encrypt_ex()
[all …]
H A Dcms_io.c21 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 Dcms_env.c52 return cms->d.envelopedData; in ossl_cms_get0_enveloped()
66 if (cms->d.other == NULL) { in cms_enveloped_data_init()
85 if (cms->d.other == NULL) { in cms_auth_enveloped_data_init()
220 CMS_ContentInfo *cms; in CMS_EnvelopedData_create_ex() local
224 if (cms == NULL) in CMS_EnvelopedData_create_ex()
233 return cms; in CMS_EnvelopedData_create_ex()
235 CMS_ContentInfo_free(cms); in CMS_EnvelopedData_create_ex()
286 CMS_ContentInfo *cms; in CMS_AuthEnvelopedData_create_ex() local
290 if (cms == NULL) in CMS_AuthEnvelopedData_create_ex()
299 return cms; in CMS_AuthEnvelopedData_create_ex()
[all …]
H A Dcms_dd.c24 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 Dcms_cd.c28 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()
59 return cms; in ossl_cms_CompressedData_create()
62 CMS_ContentInfo_free(cms); in ossl_cms_CompressedData_create()
66 BIO *ossl_cms_CompressedData_init_bio(const CMS_ContentInfo *cms) in ossl_cms_CompressedData_init_bio() argument
71 if (OBJ_obj2nid(cms->contentType) != NID_id_smime_ct_compressedData) { in ossl_cms_CompressedData_init_bio()
75 cd = cms->d.compressedData; in ossl_cms_CompressedData_init_bio()
H A Dcms_local.h389 BIO *ossl_cms_content_bio(CMS_ContentInfo *cms);
390 const CMS_CTX *ossl_cms_get0_cmsctx(const CMS_ContentInfo *cms);
396 int ossl_cms_DataFinal(CMS_ContentInfo *cms, BIO *cmsbio,
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,
446 BIO *ossl_cms_EnvelopedData_init_bio(CMS_ContentInfo *cms);
448 BIO *ossl_cms_AuthEnvelopedData_init_bio(CMS_ContentInfo *cms);
459 void ossl_cms_RecipientInfos_set_cmsctx(CMS_ContentInfo *cms);
[all …]
H A Dcms_sd.c33 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()
58 if (cms_signed_data_init(cms)) in CMS_SignedData_init()
143 sinfos = CMS_get0_SignerInfos(cms); in cms_copy_messageDigest()
348 sd = cms_signed_data_init(cms); in CMS_add1_signer()
640 sd = cms_get0_signed(cms); in CMS_set1_signers_certs()
[all …]
H A Dcms_enc.c221 int CMS_EncryptedData_set1_key(CMS_ContentInfo *cms, const EVP_CIPHER *ciph, in CMS_EncryptedData_set1_key() argument
231 cms->d.encryptedData = M_ASN1_new_of(CMS_EncryptedData); in CMS_EncryptedData_set1_key()
232 if (!cms->d.encryptedData) { in CMS_EncryptedData_set1_key()
236 cms->contentType = OBJ_nid2obj(NID_pkcs7_encrypted); in CMS_EncryptedData_set1_key()
237 cms->d.encryptedData->version = 0; in CMS_EncryptedData_set1_key()
238 } else if (OBJ_obj2nid(cms->contentType) != NID_pkcs7_encrypted) { in CMS_EncryptedData_set1_key()
242 ec = cms->d.encryptedData->encryptedContentInfo; in CMS_EncryptedData_set1_key()
244 ossl_cms_get0_cmsctx(cms)); in CMS_EncryptedData_set1_key()
247 BIO *ossl_cms_EncryptedData_init_bio(const CMS_ContentInfo *cms) in ossl_cms_EncryptedData_init_bio() argument
249 CMS_EncryptedData *enc = cms->d.encryptedData; in ossl_cms_EncryptedData_init_bio()
[all …]
/openssl/doc/man3/
H A DCMS_add0_cert.pod11 #include <openssl/cms.h>
13 int CMS_add0_cert(CMS_ContentInfo *cms, X509 *cert);
14 int CMS_add1_cert(CMS_ContentInfo *cms, X509 *cert);
15 STACK_OF(X509) *CMS_get1_certs(CMS_ContentInfo *cms);
17 int CMS_add0_crl(CMS_ContentInfo *cms, X509_CRL *crl);
18 int CMS_add1_crl(CMS_ContentInfo *cms, X509_CRL *crl);
19 STACK_OF(X509_CRL) *CMS_get1_crls(CMS_ContentInfo *cms);
28 CMS_get1_certs() returns all certificates in I<cms>.
30 CMS_add0_crl() and CMS_add1_crl() add CRL I<crl> to I<cms>.
34 CMS_get1_crls() returns all CRLs in I<cms>.
[all …]
H A DCMS_final.pod9 #include <openssl/cms.h>
11 int CMS_final(CMS_ContentInfo *cms, BIO *data, BIO *dcont, unsigned int flags);
12 int CMS_final_digest(CMS_ContentInfo *cms, const unsigned char *md,
17 CMS_final() finalises the structure B<cms>. Its purpose is to perform any
18 operations necessary on B<cms> (digest computation for example) and set the
24 CMS_final_digest() finalises the structure B<cms> using a pre-computed digest,
/openssl/include/openssl/
H A Dcms.h.in102 BIO *CMS_dataInit(CMS_ContentInfo *cms, BIO *icont);
103 int CMS_dataFinal(CMS_ContentInfo *cms, BIO *bio);
106 int CMS_is_detached(CMS_ContentInfo *cms);
114 int i2d_CMS_bio(BIO *bp, CMS_ContentInfo *cms);
116 BIO *BIO_new_CMS(BIO *out, CMS_ContentInfo *cms);
126 int CMS_final_digest(CMS_ContentInfo *cms,
155 int CMS_EncryptedData_decrypt(CMS_ContentInfo *cms,
191 int CMS_decrypt_set1_key(CMS_ContentInfo *cms,
194 int CMS_decrypt_set1_password(CMS_ContentInfo *cms,
269 int CMS_add0_cert(CMS_ContentInfo *cms, X509 *cert);
[all …]
/openssl/demos/cms/
H A Dcms_sign2.c20 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 Dcms_uncomp.c18 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 Dcms_denc.c23 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 Dcms_comp.c18 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 Dcms_dec.c20 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 Dcms_enc.c20 CMS_ContentInfo *cms = NULL; in main() local
63 cms = CMS_encrypt(recips, in, EVP_des_ede3_cbc(), flags); in main()
65 if (!cms) in main()
73 if (!SMIME_write_CMS(out, cms, in, flags)) in main()
85 CMS_ContentInfo_free(cms); in main()
H A Dcms_ddec.c23 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 Dcms_sign.c20 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 Dcms_ver.c20 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()
/openssl/fuzz/
H A Dcms.c30 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 Dbuild.info18 IF[{- !$disabled{"cms"} -}]
19 PROGRAMS{noinst}=cms
50 SOURCE[cms]=cms.c driver.c
51 INCLUDE[cms]=../include {- $ex_inc -}
52 DEPEND[cms]=../libcrypto {- $ex_lib -}
82 IF[{- !$disabled{"cms"} -}]
83 PROGRAMS{noinst}=cms-test
115 SOURCE[cms-test]=cms.c test-corpus.c
116 INCLUDE[cms-test]=../include
117 DEPEND[cms-test]=../libcrypto
/openssl/apps/
H A Dcms.c923 if (cms == NULL) in cms_main()
984 if (cms == NULL) in cms_main()
1056 sis = CMS_get0_SignerInfos(cms); in cms_main()
1063 CMS_ContentInfo_free(cms); in cms_main()
1064 cms = srcms; in cms_main()
1079 if (cms == NULL) in cms_main()
1145 if (cms == NULL) { in cms_main()
1183 if (!CMS_data(cms, out, flags)) in cms_main()
1222 receipt_request_print(cms); in cms_main()
1301 CMS_ContentInfo_free(cms); in cms_main()
[all …]
/openssl/test/
H A Dcmsapitest.c94 CMS_ContentInfo *cms = NULL; in test_d2i_CMS_bio_NULL() local
294 && TEST_ptr(cms = d2i_CMS_bio(bio, NULL)) in test_d2i_CMS_bio_NULL()
295 && TEST_true(CMS_verify(cms, NULL, NULL, NULL, NULL, flags)) in test_d2i_CMS_bio_NULL()
297 CMS_SignedData_verify(cms->d.signedData, NULL, NULL, NULL, in test_d2i_CMS_bio_NULL()
300 CMS_ContentInfo_free(cms); in test_d2i_CMS_bio_NULL()
308 CMS_ContentInfo *cms = NULL; in test_d2i_CMS_bio_file_encrypted_data() local
314 || !TEST_ptr(cms = d2i_CMS_bio(bio, NULL))) in test_d2i_CMS_bio_file_encrypted_data()
322 CMS_ContentInfo_free(cms); in test_d2i_CMS_bio_file_encrypted_data()

Completed in 73 milliseconds

123