CMS_DIGEST_CREATE(3ossl)
π CMS_DIGEST_CREATE
ok so this page is from the 3ossl manual β that's the OpenSSL section 3 club, bestie, we're in library-function territory π
β¨ NAME β¨
CMS_digest_create_ex, CMS_digest_create β these two girlies 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);
like, copy that exactly, no cap π«Ά
π¦ DESCRIPTION π¦
Okay so CMS_digest_create_ex() builds you a CMS_ContentInfo structure with a type of NID_pkcs7_digest β that's the whole vibe β¨
The data you hand over via the in BIO gets digested using md, periodt. And when it comes to pulling algorithms out of providers, the library context libctx and the property query propq are the two that get used π₯
The flags field supports the CMS_DETACHED and CMS_STREAM flags. Internally, CMS_final() gets called β unless CMS_STREAM is specified, so like... watch out for that one π
When you're done with the CMS_ContentInfo structure, you can free it with CMS_ContentInfo_free(3), iconic π
CMS_digest_create() is literally similar to CMS_digest_create_ex() BUT it just uses default values of NULL for the library context libctx and the property query propq. lowkey the chill 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 grab with ERR_get_error(3) π
Otherwise? They return a pointer to the newly allocated structure. slay π
β SEE ALSO β
go read those next, iykyk π§
π HISTORY π
The CMS_digest_create_ex() method was added in OpenSSL 3.0 β so she's a 3.0 baby, not that old fr fr πΈ
π 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>.
bestie pls actually read the license before you go wild, it's giving "legal but make it cute" π
and that's the whole page!! this one's living in version 3.5.0, dated 2026-09-25 β mwah, go digest something π
β¨π
π¦ where this page comes from
- opensuse-leap 16.0: openssl-3-doc 3.5.0-160000.11.1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms