.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.48) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" .\" Required to disable full justification in groff 1.23.0. .if n .ds AD l .\" ======================================================================== .\" .IX Title "CMS_ADD_STANDARD_SMIMECAP_EX 3ssl" .TH CMS_ADD_STANDARD_SMIMECAP_EX 3ssl 2026-10-23 4.1.0 OpenSSL .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME CMS_add_standard_smimecap_ex, CMS_add_standard_smimecap, CMS_add_smimecap, CMS_add_simple_smimecap \&\- CMS SMIMECapabilities attribute utilities .SH SYNOPSIS .IX Header "SYNOPSIS" .Vb 1 \& #include \& \& 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); .Ve .SH DESCRIPTION .IX Header "DESCRIPTION" \&\fBCMS_add_standard_smimecap_ex()\fR populates \fB*smcap\fR with the set of algorithms that should be advertised in an SMIMECapabilities signed attribute. Only algorithms that are available in the providers associated with \fBlibctx\fR and the property query string \fBpropq\fR are included, so the list accurately reflects what the caller can actually use. If \fBlibctx\fR is NULL the default library context is used. If \&\fB*smcap\fR is NULL a new \fBSTACK_OF(X509_ALGOR)\fR is allocated; otherwise entries are appended to the existing stack. .PP The candidate algorithms, listed in preference order, are: AES\-256\-CBC, GOST R 34.11\-2012 (256\-bit), GOST R 34.11\-2012 (512\-bit), GOST R 34.11\-94, GOST 28147\-89, AES\-192\-CBC, AES\-128\-CBC, DES\-EDE3\-CBC, RC2\-CBC (128\-bit key), RC2\-CBC (64\-bit key), DES\-CBC, and RC2\-CBC (40\-bit key). Algorithms not available in the active providers (for example, RC2 and DES when only the default provider is loaded) are silently omitted. .PP \&\fBCMS_add_standard_smimecap()\fR is a wrapper that calls \&\fBCMS_add_standard_smimecap_ex()\fR with a NULL library context and NULL property query string. .PP \&\fBCMS_add_smimecap()\fR adds a pre\-built stack of algorithm identifiers \&\fBalgs\fR as the SMIMECapabilities signed attribute on the \&\fBCMS_SignerInfo\fR \fBsi\fR. .PP \&\fBCMS_add_simple_smimecap()\fR appends a single algorithm entry to \fB*algs\fR. \&\fBalgnid\fR is the NID of the algorithm and \fBkeysize\fR is the key size in bits, or \-1 if the algorithm does not use a variable key size. .SH NOTES .IX Header "NOTES" Applications that need accurate capability advertisements should use \&\fBCMS_add_standard_smimecap_ex()\fR, passing the same \fBlibctx\fR and \fBpropq\fR used for the rest of the CMS operation. This ensures that only algorithms genuinely available to the application are listed. .PP \&\fBCMS_add1_signer()\fR calls \fBCMS_add_standard_smimecap_ex()\fR internally using the library context associated with the CMS_ContentInfo structure, so applications that use \fBCMS_add1_signer()\fR without \fBCMS_NOSMIMECAP\fR do not need to call these functions directly. .SH "RETURN VALUES" .IX Header "RETURN VALUES" All functions return 1 for success or 0 for failure. .SH "SEE ALSO" .IX Header "SEE ALSO" \&\fBCMS_add1_signer\fR\|(3), \fBCMS_sign\fR\|(3), \fBOSSL_LIB_CTX\fR\|(3) .SH HISTORY .IX Header "HISTORY" \&\fBCMS_add_standard_smimecap_ex()\fR was added in OpenSSL 4.1. .SH COPYRIGHT .IX Header "COPYRIGHT" Copyright 2026 The OpenSSL Project Authors. All Rights Reserved. .PP 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 .