CMS_ADD_STANDARD_SMIMECAP_EX(3ssl)
π CMS_ADD_STANDARD_SMIMECAP_EX π
okay bestie so this is the OpenSSL manual page for CMS_ADD_STANDARD_SMIMECAP_EX(3ssl) β aka the SMIMECapabilities attribute utilities, aka the little squad of functions that tell everyone what crypto you can actually do π
β¨ NAME β¨
CMS_add_standard_smimecap_ex, CMS_add_standard_smimecap, CMS_add_smimecap, CMS_add_simple_smimecap β the CMS SMIMECapabilities attribute utilities, slay π
π¦ SYNOPSIS π¦
#include <openssl/cms.h>
int CMS_add_standard_smimecap_ex(STACK_OF(X509_ALGOR) **smcap,
OSSL_LIB_CTX *libctx, const char *propq);
int CMS_add_standard_smimecap(STACK_OF(X509_ALGOR) **smcap);
int CMS_add_smimecap(CMS_SignerInfo *si, STACK_OF(X509_ALGOR) *algs);
int CMS_add_simple_smimecap(STACK_OF(X509_ALGOR) **algs,
int algnid, int keysize);
π DESCRIPTION π
πΈ CMS_add_standard_smimecap_ex()
So this one populates *smcap with the whole set of algorithms that should be advertised in an SMIMECapabilities signed attribute. Iconic behaviour, honestly.
Here's the vibe check though: only algorithms that are available in the providers associated with libctx and the property query string propq get included, so the list accurately reflects what the caller can actually use. No catfishing the capabilities list, periodt π«Ά
- If
libctxisNULLβ the default library context is used. - If
*smcapisNULLβ a brand newSTACK_OF(X509_ALGOR)gets allocated for you β¨ - otherwise β entries are appended to the existing stack.
The candidate algorithms, listed in preference order, are literally:
AES-256-CBCGOST R 34.11-2012 (256-bit)GOST R 34.11-2012 (512-bit)GOST R 34.11-94GOST 28147-89AES-192-CBCAES-128-CBCDES-EDE3-CBCRC2-CBC (128-bit key)RC2-CBC (64-bit key)DES-CBCRC2-CBC (40-bit key)
Algorithms that are not available in the active providers β for example, RC2 and DES when only the default provider is loaded β are silently omitted. No drama, they just ghost the list π
π CMS_add_standard_smimecap()
A wrapper bestie. It calls CMS_add_standard_smimecap_ex() with a NULL library context and NULL property query string. That's it, that's the whole personality.
π
CMS_add_smimecap()
This one adds a pre-built stack of algorithm identifiers algs as the SMIMECapabilities signed attribute on the CMS_SignerInfo si. Plug and play, no cap.
π CMS_add_simple_smimecap()
Appends a single algorithm entry to *algs, main character energy only.
algnidis the NID of the algorithmkeysizeis the key size in bits, or-1if the algorithm does not use a variable key size.
β NOTES β
Applications that need accurate capability advertisements should use CMS_add_standard_smimecap_ex(), passing the same libctx and propq used for the rest of the CMS operation. This ensures that only algorithms genuinely available to the application are listed. fr fr, don't skip this part π
Also lowkey important: CMS_add1_signer() calls CMS_add_standard_smimecap_ex() internally using the library context associated with the CMS_ContentInfo structure. So if you use CMS_add1_signer() without CMS_NOSMIMECAP, you do not need to call these functions directly. It's already handling it for you, king behaviour π
π₯ RETURN VALUES π₯
All functions return 1 for success or 0 for failure. Simple. Clean. Obsessed.
π§ SEE ALSO π§
π HISTORY π
CMS_add_standard_smimecap_ex() was added in OpenSSL 4.1. New drop, fresh off the release π«
π COPYRIGHT π
Copyright 2026 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>.
and that's the whole page bestie!! go forth and advertise your capabilities accurately π β¨
πΈ version 4.1.0, dated 2026-10-23 β catch you on the next manpage, mwah π«Άπ
π¦ where this page comes from
- nixos 26.05: openssl 4.1.0
- nixpkgs unstable: openssl 4.1.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms