1*b077aed3SPierre Pronchery=pod 2*b077aed3SPierre Pronchery 3*b077aed3SPierre Pronchery=head1 NAME 4*b077aed3SPierre Pronchery 5*b077aed3SPierre ProncheryCMS_digest_create_ex, CMS_digest_create 6*b077aed3SPierre Pronchery- Create CMS DigestedData object 7*b077aed3SPierre Pronchery 8*b077aed3SPierre Pronchery=head1 SYNOPSIS 9*b077aed3SPierre Pronchery 10*b077aed3SPierre Pronchery #include <openssl/cms.h> 11*b077aed3SPierre Pronchery 12*b077aed3SPierre Pronchery CMS_ContentInfo *CMS_digest_create_ex(BIO *in, const EVP_MD *md, 13*b077aed3SPierre Pronchery unsigned int flags, OSSL_LIB_CTX *ctx, 14*b077aed3SPierre Pronchery const char *propq); 15*b077aed3SPierre Pronchery 16*b077aed3SPierre Pronchery CMS_ContentInfo *CMS_digest_create(BIO *in, const EVP_MD *md, 17*b077aed3SPierre Pronchery unsigned int flags); 18*b077aed3SPierre Pronchery 19*b077aed3SPierre Pronchery=head1 DESCRIPTION 20*b077aed3SPierre Pronchery 21*b077aed3SPierre ProncheryCMS_digest_create_ex() creates a B<CMS_ContentInfo> structure 22*b077aed3SPierre Proncherywith a type B<NID_pkcs7_digest>. The data supplied via the I<in> BIO is digested 23*b077aed3SPierre Proncheryusing I<md>. The library context I<libctx> and the property query I<propq> are 24*b077aed3SPierre Proncheryused when retrieving algorithms from providers. 25*b077aed3SPierre ProncheryThe I<flags> field supports the B<CMS_DETACHED> and B<CMS_STREAM> flags, 26*b077aed3SPierre ProncheryInternally CMS_final() is called unless B<CMS_STREAM> is specified. 27*b077aed3SPierre Pronchery 28*b077aed3SPierre ProncheryThe B<CMS_ContentInfo> structure can be freed using L<CMS_ContentInfo_free(3)>. 29*b077aed3SPierre Pronchery 30*b077aed3SPierre ProncheryCMS_digest_create() is similar to CMS_digest_create_ex() 31*b077aed3SPierre Proncherybut uses default values of NULL for the library context I<libctx> and the 32*b077aed3SPierre Proncheryproperty query I<propq>. 33*b077aed3SPierre Pronchery 34*b077aed3SPierre Pronchery 35*b077aed3SPierre Pronchery=head1 RETURN VALUES 36*b077aed3SPierre Pronchery 37*b077aed3SPierre ProncheryIf the allocation fails, CMS_digest_create_ex() and CMS_digest_create() 38*b077aed3SPierre Proncheryreturn NULL and set an error code that can be obtained by L<ERR_get_error(3)>. 39*b077aed3SPierre ProncheryOtherwise they return a pointer to the newly allocated structure. 40*b077aed3SPierre Pronchery 41*b077aed3SPierre Pronchery=head1 SEE ALSO 42*b077aed3SPierre Pronchery 43*b077aed3SPierre ProncheryL<ERR_get_error(3)>, L<CMS_final(3)>> 44*b077aed3SPierre Pronchery 45*b077aed3SPierre Pronchery=head1 HISTORY 46*b077aed3SPierre Pronchery 47*b077aed3SPierre ProncheryThe CMS_digest_create_ex() method was added in OpenSSL 3.0. 48*b077aed3SPierre Pronchery 49*b077aed3SPierre Pronchery=head1 COPYRIGHT 50*b077aed3SPierre Pronchery 51*b077aed3SPierre ProncheryCopyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved. 52*b077aed3SPierre Pronchery 53*b077aed3SPierre ProncheryLicensed under the Apache License 2.0 (the "License"). You may not use 54*b077aed3SPierre Proncherythis file except in compliance with the License. You can obtain a copy 55*b077aed3SPierre Proncheryin the file LICENSE in the source distribution or at 56*b077aed3SPierre ProncheryL<https://www.openssl.org/source/license.html>. 57*b077aed3SPierre Pronchery 58*b077aed3SPierre Pronchery=cut 59