Home
last modified time | relevance | path

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

1234

/openssl/crypto/cms/
H A Dcms_lib.c72 return cms != NULL ? &cms->ctx : NULL; in ossl_cms_get0_cmsctx()
109 return cms->contentType; in CMS_get0_type()
116 if (cms != NULL) { in ossl_cms_Data_create()
119 CMS_set_detached(cms, 0); in ossl_cms_Data_create()
121 return cms; in ossl_cms_Data_create()
148 cont = ossl_cms_content_bio(cms); in CMS_dataInit()
265 return &cms->d.data; in CMS_get0_content()
365 pos = CMS_get0_content(cms); in CMS_is_detached()
377 pos = CMS_get0_content(cms); in CMS_set_detached()
546 if (CMS_add0_cert(cms, cert)) in CMS_add1_cert()
[all …]
H A Dcms_smime.c127 if (cms == NULL) in CMS_data_create_ex()
131 return cms; in CMS_data_create_ex()
180 if (cms == NULL) in CMS_digest_create_ex()
187 return cms; in CMS_digest_create_ex()
237 if (cms == NULL) in CMS_EncryptedData_encrypt_ex()
247 return cms; in CMS_EncryptedData_encrypt_ex()
522 if (cms == NULL || !CMS_SignedData_init(cms)) { in CMS_sign_ex()
552 return cms; in CMS_sign_ex()
633 return cms; in CMS_sign_receipt()
669 return cms; in CMS_encrypt_ex()
[all …]
H A Dcms_io.c22 pos = CMS_get0_content(cms); in CMS_stream()
37 CMS_ContentInfo *d2i_CMS_bio(BIO *bp, CMS_ContentInfo **cms) in d2i_CMS_bio() argument
40 const CMS_CTX *ctx = ossl_cms_get0_cmsctx(cms == NULL ? NULL : *cms); in d2i_CMS_bio()
53 int i2d_CMS_bio(BIO *bp, CMS_ContentInfo *cms) in i2d_CMS_bio() argument
60 BIO *BIO_new_CMS(BIO *out, CMS_ContentInfo *cms) in IMPLEMENT_PEM_rw()
62 return BIO_new_NDEF(out, (ASN1_VALUE *)cms, in IMPLEMENT_PEM_rw()
84 int ctype_nid = OBJ_obj2nid(cms->contentType); in SMIME_write_CMS()
86 const CMS_CTX *ctx = ossl_cms_get0_cmsctx(cms); in SMIME_write_CMS()
89 mdalgs = cms->d.signedData->digestAlgorithms; in SMIME_write_CMS()
101 CMS_ContentInfo **cms) in SMIME_read_CMS_ex() argument
[all …]
H A Dcms_env.c60 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()
299 CMS_ContentInfo *cms; in CMS_AuthEnvelopedData_create_ex() local
303 if (cms == NULL) in CMS_AuthEnvelopedData_create_ex()
312 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.h390 BIO *ossl_cms_content_bio(CMS_ContentInfo *cms);
391 const CMS_CTX *ossl_cms_get0_cmsctx(const CMS_ContentInfo *cms);
397 int ossl_cms_DataFinal(CMS_ContentInfo *cms, BIO *cmsbio,
404 BIO *ossl_cms_DigestedData_init_bio(const CMS_ContentInfo *cms);
405 int ossl_cms_DigestedData_do_final(const CMS_ContentInfo *cms,
408 BIO *ossl_cms_SignedData_init_bio(CMS_ContentInfo *cms);
409 int ossl_cms_SignedData_final(CMS_ContentInfo *cms, BIO *chain,
447 BIO *ossl_cms_EnvelopedData_init_bio(CMS_ContentInfo *cms);
449 BIO *ossl_cms_AuthEnvelopedData_init_bio(CMS_ContentInfo *cms);
460 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()
658 sd = cms_get0_signed(cms); in CMS_set1_signers_certs()
[all …]
H A Dcms_enc.c222 int CMS_EncryptedData_set1_key(CMS_ContentInfo *cms, const EVP_CIPHER *ciph, in CMS_EncryptedData_set1_key() argument
232 cms->d.encryptedData = M_ASN1_new_of(CMS_EncryptedData); in CMS_EncryptedData_set1_key()
233 if (!cms->d.encryptedData) { in CMS_EncryptedData_set1_key()
237 cms->contentType = OBJ_nid2obj(NID_pkcs7_encrypted); in CMS_EncryptedData_set1_key()
238 cms->d.encryptedData->version = 0; in CMS_EncryptedData_set1_key()
239 } else if (OBJ_obj2nid(cms->contentType) != NID_pkcs7_encrypted) { in CMS_EncryptedData_set1_key()
243 ec = cms->d.encryptedData->encryptedContentInfo; in CMS_EncryptedData_set1_key()
245 ossl_cms_get0_cmsctx(cms)); in CMS_EncryptedData_set1_key()
248 BIO *ossl_cms_EncryptedData_init_bio(const CMS_ContentInfo *cms) in ossl_cms_EncryptedData_init_bio() argument
250 CMS_EncryptedData *enc = cms->d.encryptedData; in ossl_cms_EncryptedData_init_bio()
[all …]
/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/test/
H A Dcmsapitest.c93 CMS_ContentInfo *cms = NULL; in test_CMS_add1_cert() local
96 ret = TEST_ptr(cms = CMS_ContentInfo_new()) in test_CMS_add1_cert()
97 && TEST_ptr(CMS_add1_signer(cms, cert, privkey, NULL, 0)) in test_CMS_add1_cert()
98 && TEST_true(CMS_add1_cert(cms, cert)); /* add cert again */ in test_CMS_add1_cert()
100 CMS_ContentInfo_free(cms); in test_CMS_add1_cert()
107 CMS_ContentInfo *cms = NULL; in test_d2i_CMS_bio_NULL() local
307 && TEST_ptr(cms = d2i_CMS_bio(bio, NULL)) in test_d2i_CMS_bio_NULL()
313 CMS_ContentInfo_free(cms); in test_d2i_CMS_bio_NULL()
353 CMS_ContentInfo *cms = NULL; in test_d2i_CMS_decode() local
364 if (!TEST_ptr(cms = d2i_CMS_bio(bio, NULL))) in test_d2i_CMS_decode()
[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);
35 CMS_get1_certs() returns all certificates in I<cms>.
37 CMS_add0_crl() and CMS_add1_crl() add CRL I<crl> to I<cms>.
44 CMS_get1_crls() returns all CRLs in I<cms>.
[all …]
H A DCMS_decrypt.pod11 #include <openssl/cms.h>
13 int CMS_decrypt(CMS_ContentInfo *cms, EVP_PKEY *pkey, X509 *cert,
15 int CMS_decrypt_set1_pkey_and_peer(CMS_ContentInfo *cms,
17 int CMS_decrypt_set1_pkey(CMS_ContentInfo *cms, EVP_PKEY *pk, X509 *cert);
18 int CMS_decrypt_set1_password(CMS_ContentInfo *cms,
41 should be followed by C<CMS_decrypt(cms, NULL, NULL, dcont, out, flags)>.
42 This call deallocates any decryption key stored in I<cms>.
47 CMS_decrypt_set1_password() decrypts the CMS_ContentInfo structure I<cms>
49 On success, it also records in I<cms> the decryption key used, and then
50 should be followed by C<CMS_decrypt(cms, NULL, NULL, dcont, out, flags)>.
[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/demos/cms/
H A Dcms_ver.c19 static void print_signingTime(CMS_ContentInfo *cms) in print_signingTime() argument
31 sis = CMS_get0_SignerInfos(cms); in print_signingTime()
63 CMS_ContentInfo *cms = NULL; in main() local
97 cms = SMIME_read_CMS(in, &cont); in main()
99 if (cms == NULL) in main()
102 print_signingTime(cms); in main()
109 if (!CMS_verify(cms, NULL, st, cont, out, 0)) { in main()
125 CMS_ContentInfo_free(cms); in main()
H A Dcms_sign2.c20 CMS_ContentInfo *cms = NULL; in main() local
60 cms = CMS_sign(NULL, NULL, NULL, in, CMS_STREAM | CMS_PARTIAL); in main()
62 if (!cms) in main()
67 if (!CMS_add1_signer(cms, scert, skey, NULL, 0)) in main()
70 if (!CMS_add1_signer(cms, scert2, skey2, NULL, 0)) in main()
79 if (!SMIME_write_CMS(out, cms, in, CMS_STREAM)) in main()
91 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()
87 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()
52 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
50 cms = SMIME_read_CMS(in, NULL); in main()
52 if (!cms) in main()
60 if (!CMS_decrypt(cms, rkey, rcert, NULL, out, 0)) in main()
73 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
53 cms = PEM_read_bio_CMS(in, NULL, 0, NULL); in main()
55 if (!cms) in main()
69 if (!CMS_decrypt(cms, rkey, rcert, dcont, out, 0)) in main()
81 CMS_ContentInfo_free(cms); in main()
H A Dcms_sign.c20 CMS_ContentInfo *cms = NULL; in main() local
57 cms = CMS_sign(scert, skey, NULL, in, flags); in main()
59 if (!cms) in main()
72 if (!SMIME_write_CMS(out, cms, in, flags)) 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()
/openssl/apps/
H A Dcms.c918 if (cms == NULL) in cms_main()
979 if (cms == NULL) in cms_main()
1052 sis = CMS_get0_SignerInfos(cms); in cms_main()
1059 CMS_ContentInfo_free(cms); in cms_main()
1060 cms = srcms; in cms_main()
1075 if (cms == NULL) in cms_main()
1141 if (cms == NULL) { in cms_main()
1179 if (!CMS_data(cms, out, flags)) in cms_main()
1218 receipt_request_print(cms); in cms_main()
1297 CMS_ContentInfo_free(cms); in cms_main()
[all …]

Completed in 48 milliseconds

1234