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