CMS_DIGEST_CREATE(3ossl)
β¨ CMS_DIGEST_CREATE π
okay bestie, welcome to CMS_digest_create(3ossl) β yes that's the manual page name, section 3, OpenSSL vibes only. sit down, grab a boba, we're making CMS DigestedData objects π
πΈ NAME πΈ
CMS_digest_create_ex, CMS_digest_create β Create a CMS DigestedData object π§
π SYNOPSIS π
#include <openssl/cms.h>
CMS_ContentInfo *CMS_digest_create_ex(BIO *in, const EVP_MD *md,
unsigned int flags, OSSL_LIB_CTX *ctx,
const char *propq);
CMS_ContentInfo *CMS_digest_create(BIO *in, const EVP_MD *md,
unsigned int flags);
π¦ DESCRIPTION π¦
so CMS_digest_create_ex() builds you a CMS_ContentInfo structure with a type of NID_pkcs7_digest. literally that's its whole thing π
The data you hand over via the in BIO gets digested using md. The library context libctx and the property query propq come into play when it's retrieving algorithms from providers β iykyk, that's the provider era β¨
The flags field supports the CMS_DETACHED and CMS_STREAM flags. Internally CMS_final() is called β unless CMS_STREAM is specified. no cap, that's the rule.
π«Ά when you're done with theCMS_ContentInfostructure, free it withCMS_ContentInfo_free(3). clean up after yourself, queen.
CMS_digest_create() is basically the same energy as CMS_digest_create_ex(), except it uses the default values of NULL for the library context libctx and the property query propq. simple. lowkey the easy mode version π
β RETURN VALUES β
If the allocation fails π, CMS_digest_create_ex() and CMS_digest_create() return NULL and set an error code that you can obtain with ERR_get_error(3).
Otherwise? they return a pointer to the newly allocated structure. slay π
π SEE ALSO π
ERR_get_error(3), CMS_final(3)
π HISTORY π
The CMS_digest_create_ex() method was added in OpenSSL 3.0. so it's a newer-era icon, we respect her π
π COPYRIGHT π
Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved.
Licensed under the Apache License 2.0 (the "License"). You may not use this file except in compliance with the License. You can obtain a copy in the file LICENSE in the source distribution or at <https://www.openssl.org/source/license.html>.
aaand that's the whole page bestie π this was the 3ossl manual, version 3.5.9, dated 2026-09-29 β go digest something iconic, ily, periodt π
β¨
π¦ where this page comes from
- fedora 43: openssl-devel 1:3.5.9-1.fc43 Β· Apache-2.0
- fedora 43: openssl-devel 1:3.5.9-1.fc43 Β· Apache-2.0
- fedora 44: openssl-devel 1:3.5.9-1.fc44 Β· Apache-2.0
- fedora 44: openssl-devel 1:3.5.9-1.fc44 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms