Home | History | Annotate | Download | only in apps

Lines Matching refs:cms

1 /* apps/cms.c */
54 /* CMS utility function */
67 #include <openssl/cms.h>
73 static void receipt_request_print(BIO *out, CMS_ContentInfo *cms);
112 CMS_ContentInfo *cms = NULL, *rcms = NULL;
576 BIO_printf (bio_err, "Usage cms [options] cert.pem ...\n");
582 BIO_printf (bio_err, "-cmsout output CMS structure\n");
782 cms = SMIME_read_CMS(in, &indata);
784 cms = PEM_read_bio_CMS(in, NULL, NULL, NULL);
786 cms = d2i_CMS_bio(in, NULL);
789 BIO_printf(bio_err, "Bad input format for CMS file\n");
793 if (!cms)
810 allcerts = CMS_get1_certs(cms);
886 cms = CMS_data_create(in, flags);
890 cms = CMS_digest_create(in, sign_md, flags);
894 cms = CMS_compress(in, -1, flags);
899 cms = CMS_encrypt(encerts, in, cipher, flags);
900 if (!cms)
904 if (!CMS_add0_recipient_key(cms, NID_undef,
915 if (!CMS_final(cms, in, NULL, flags))
921 cms = CMS_EncryptedData_encrypt(in, cipher,
931 sis = CMS_get0_SignerInfos(cms);
938 CMS_ContentInfo_free(cms);
939 cms = srcms;
956 cms = CMS_sign(NULL, NULL, other, in, flags);
957 if (!cms)
960 CMS_set1_eContentType(cms, econtent_type);
989 si = CMS_add1_signer(cms, signer, key, sign_md, flags);
1002 if (!CMS_final(cms, in, NULL, flags))
1007 if (!cms)
1009 BIO_printf(bio_err, "Error creating CMS structure\n");
1019 if (!CMS_decrypt_set1_key(cms,
1024 "Error decrypting CMS using secret key\n");
1031 if (!CMS_decrypt_set1_pkey(cms, key, recip))
1034 "Error decrypting CMS using private key\n");
1039 if (!CMS_decrypt(cms, NULL, NULL, indata, out, flags))
1041 BIO_printf(bio_err, "Error decrypting CMS structure\n");
1047 if (!CMS_data(cms, out, flags))
1052 if (!CMS_uncompress(cms, indata, out, flags))
1057 if (CMS_digest_verify(cms, indata, out, flags) > 0)
1067 if (!CMS_EncryptedData_decrypt(cms, secret_key, secret_keylen,
1073 if (CMS_verify(cms, other, store, indata, out, flags) > 0)
1083 signers = CMS_get0_signers(cms);
1095 receipt_request_print(bio_err, cms);
1100 if (CMS_verify_receipt(rcms, cms, other, store, flags) > 0)
1119 ret = SMIME_write_CMS(out, cms, indata, flags);
1121 ret = SMIME_write_CMS(out, cms, in, flags);
1124 ret = PEM_write_bio_CMS(out, cms);
1126 ret = i2d_CMS_bio(out,cms);
1129 BIO_printf(bio_err, "Bad output format for CMS file\n");
1169 CMS_ContentInfo_free(cms);
1231 static void receipt_request_print(BIO *out, CMS_ContentInfo *cms)
1240 sis = CMS_get0_SignerInfos(cms);