aboutsummaryrefslogtreecommitdiffstats
path: root/apps/cms.c
Commit message (Collapse)AuthorAgeFilesLines
* Convert internal use of ASN1_STRING_set and ASN1_STRING_lengthBob Beck2026-07-181-3/+5
| | | | | | | | | | | | | | to use their non-deprecated replacements. For "pretty-printing" applications and test code that use a length and require an int, size_t lengths are simply cast to an int. For writes and protocol level things size_t lengths are checked against INT_MAX and take the error path if the returned value is too large to be used for a funciton that takes an integer length. Reviewed-by: Milan Broz <[email protected]> Reviewed-by: Norbert Pocs <[email protected]> MergeDate: Sat Jul 18 13:01:19 2026 (Merged from https://github.com/openssl/openssl/pull/31194)
* apps/*.c,doc/man1/*.pod.in: fix doc and error output of cert_store vs. ↵Dr. David von Oheimb2026-06-011-3/+3
| | | | | | | | | chain_store/verify_store and PEM format Reviewed-by: Tomas Mraz <[email protected]> Reviewed-by: Eugene Syromiatnikov <[email protected]> MergeDate: Mon Jun 1 04:57:15 2026 (Merged from https://github.com/openssl/openssl/pull/25683)
* Copyright year updatesopenssl-machine2026-03-101-1/+1
| | | | | | | Reviewed-by: Tomas Mraz <[email protected]> Reviewed-by: Eugene Syromiatnikov <[email protected]> MergeDate: Tue Mar 10 14:37:54 2026 Release: yes
* Cleanup of printing in appsPhilip Prindeville2026-02-131-24/+24
| | | | | | | | | | Don't use BIO_printf() where BIO_puts() will do. Reviewed-by: Paul Dale <[email protected]> Reviewed-by: Shane Lontis <[email protected]> Reviewed-by: Tomas Mraz <[email protected]> MergeDate: Fri Feb 13 15:05:38 2026 (Merged from https://github.com/openssl/openssl/pull/29677)
* 4.0-POST-CLANG-FORMAT-WEBKIT4.0-POST-CLANG-FORMAT-WEBKITBob Beck2025-12-091-228/+292
| | | | | | | Reviewed-by: Saša Nedvědický <[email protected]> Reviewed-by: Neil Horman <[email protected]> Reviewed-by: Nikola Pajkovsky <[email protected]> (Merged from https://github.com/openssl/openssl/pull/29242)
* apps/: Remove "-keyform engine"Norbert Pocs2025-12-041-2/+1
| | | | | | | | | | | | | | Resolves: https://github.com/openssl/project/issues/1354 Signed-off-by: Norbert Pocs <[email protected]> Reviewed-by: Matt Caswell <[email protected]> Reviewed-by: Saša Nedvědický <[email protected]> Reviewed-by: Neil Horman <[email protected]> Reviewed-by: Dmitry Belyavskiy <[email protected]> Reviewed-by: Saša Nedvědický <[email protected]> Reviewed-by: Eugene Syromiatnikov <[email protected]> (Merged from https://github.com/openssl/openssl/pull/29305)
* apps/: Remove enginesNorbert Pocs2025-12-041-11/+3
| | | | | | | | | | | | Signed-off-by: Norbert Pocs <[email protected]> Reviewed-by: Matt Caswell <[email protected]> Reviewed-by: Saša Nedvědický <[email protected]> Reviewed-by: Neil Horman <[email protected]> Reviewed-by: Dmitry Belyavskiy <[email protected]> Reviewed-by: Saša Nedvědický <[email protected]> Reviewed-by: Eugene Syromiatnikov <[email protected]> (Merged from https://github.com/openssl/openssl/pull/29305)
* Implement KEMRecipientInfo (RFC9629) in CMSDaniel Van Geest2025-07-301-10/+122
| | | | | | | | | | | | | | | | | Also add support for ML-KEM in CMS (draft-ietf-lamps-cms-kyber). Add the -recip_kdf and -recip_ukm parameters to `openssl cms -encrypt` to allow the user to specify the KDF algorithm and optional user keying material for each recipient. A provider may indicate which RecipientInfo type is supported for a key, otherwise CMS will try to figure it out itself. A provider may also indicate which KDF to use in KEMRecipientInfo if the user hasn't specified one. Reviewed-by: Dmitry Belyavskiy <[email protected]> Reviewed-by: Tomas Mraz <[email protected]> (Merged from https://github.com/openssl/openssl/pull/27681)
* Introduce cms kekcipher option to select cipher for pwriJakub Zelenka2025-07-011-6/+14
| | | | | | | | | | | | This is useful for AEAD ciphers where it is not possible to use AEAD cipher (currently only AES GCM supported) for password recipient info because the same cipher is used for encrypting the password and it is not possible to store tag for this purpose so different cipher (e.g. AES CBC) needs to be selected. Reviewed-by: Shane Lontis <[email protected]> Reviewed-by: Tomas Mraz <[email protected]> (Merged from https://github.com/openssl/openssl/pull/26871)
* apps/cms.c: add failure handling for I/O errors of 'BIO_printf(out, ...)'Dr. David von Oheimb2025-05-141-6/+6
| | | | | | Reviewed-by: Tomas Mraz <[email protected]> Reviewed-by: Dmitry Belyavskiy <[email protected]> (Merged from https://github.com/openssl/openssl/pull/27368)
* apps/cms.c: clarify treatment of 'ret' variable in cms_main()Dr. David von Oheimb2025-05-141-1/+3
| | | | | | Reviewed-by: Tomas Mraz <[email protected]> Reviewed-by: Dmitry Belyavskiy <[email protected]> (Merged from https://github.com/openssl/openssl/pull/27368)
* apps/cms.c: remove needless ERR_print_errors() callsDr. David von Oheimb2025-05-141-29/+16
| | | | | | Reviewed-by: Tomas Mraz <[email protected]> Reviewed-by: Dmitry Belyavskiy <[email protected]> (Merged from https://github.com/openssl/openssl/pull/27368)
* apps/cms.c: add missing error messages in various error casesDr. David von Oheimb2025-05-141-12/+22
| | | | | | Reviewed-by: Tomas Mraz <[email protected]> Reviewed-by: Dmitry Belyavskiy <[email protected]> (Merged from https://github.com/openssl/openssl/pull/27368)
* apps/cms.c: add missing error message on error writing CMS output (ret == 6)Dr. David von Oheimb2025-05-141-0/+1
| | | | | | Reviewed-by: Tomas Mraz <[email protected]> Reviewed-by: Dmitry Belyavskiy <[email protected]> (Merged from https://github.com/openssl/openssl/pull/27368)
* apps/cms.c, apps/ocsp.c: Added NULL pointer checksAnkit Kekre2025-03-201-1/+1
| | | | | | | Reviewed-by: Paul Dale <[email protected]> Reviewed-by: Tim Hudson <[email protected]> Reviewed-by: Tomas Mraz <[email protected]> (Merged from https://github.com/openssl/openssl/pull/27059)
* Copyright year updatesopenssl-machine2025-03-121-1/+1
| | | | | | Reviewed-by: Neil Horman <[email protected]> Reviewed-by: Matt Caswell <[email protected]> Release: yes
* apps/cms.c: Cleanup for dead assignment to argcAlex Prabhat Bara2025-01-231-1/+0
| | | | | | | | CLA: trivial Reviewed-by: Paul Dale <[email protected]> Reviewed-by: Tomas Mraz <[email protected]> (Merged from https://github.com/openssl/openssl/pull/26273)
* Fix memory leaks from missing checks of return value from ↵Frederik Wedel-Heinen2025-01-091-9/+18
| | | | | | | | sk_OPENSSL_STRING_push() Reviewed-by: Saša Nedvědický <[email protected]> Reviewed-by: Tomas Mraz <[email protected]> (Merged from https://github.com/openssl/openssl/pull/26238)
* Fix CMS encryption with key agreement when originator setJakub Zelenka2025-01-061-1/+8
| | | | | | | | | | OpenSSL currently does not support encryption with originator flag so it should fail nicely instead of segfaulting. Reviewed-by: Hugo Landau <[email protected]> Reviewed-by: David von Oheimb <[email protected]> Reviewed-by: Tomas Mraz <[email protected]> (Merged from https://github.com/openssl/openssl/pull/26014)
* Fix originator cert leak in cms appJakub Zelenka2025-01-061-0/+1
| | | | | | | Reviewed-by: Hugo Landau <[email protected]> Reviewed-by: David von Oheimb <[email protected]> Reviewed-by: Tomas Mraz <[email protected]> (Merged from https://github.com/openssl/openssl/pull/26014)
* Add CMS_NO_SIGNING_TIME flag to CMS_sign(), CMS_add1_signer()Peter Juhasz2024-12-261-1/+7
| | | | | | | | | | | | | | | | Previously there was no way to create a CMS SignedData signature without a signing time attribute, because CMS_SignerInfo_sign added it unconditionally. However, there is a use case (PAdES signatures) where this attribute is not allowed, so this commit introduces a new flag to the CMS API that causes this attribute to be omitted at signing time. Also add -no_signing_time option to cms command. Fixes #15777 Reviewed-by: Dmitry Belyavskiy <[email protected]> Reviewed-by: Tomas Mraz <[email protected]> (Merged from https://github.com/openssl/openssl/pull/15783)
* apps: Change default cipher to aes-256-cbc for req, cms and smime appsAditya2024-11-041-9/+2
| | | | | | | | | | | | Update `CHANGES.md` and `NEWS.md`; remove `no-des` guard from req, cms, and smime apps Update MAN pages for default cipher; fix styling by removing braces around single statements Reviewed-by: Matt Caswell <[email protected]> Reviewed-by: Dmitry Belyavskiy <[email protected]> Reviewed-by: Tomas Mraz <[email protected]> (Merged from https://github.com/openssl/openssl/pull/25839)
* Copyright year updatesTomas Mraz2024-09-051-1/+1
| | | | | Reviewed-by: Neil Horman <[email protected]> Release: yes
* apps/cms.c, apps/smime.c: Fix -crlfeol help messagesAndreas Treichel2024-08-151-1/+1
| | | | | | | | | CLA: trivial Reviewed-by: Todd Short <[email protected]> Reviewed-by: Tom Cosgrove <[email protected]> Reviewed-by: Tomas Mraz <[email protected]> (Merged from https://github.com/openssl/openssl/pull/24434)
* {CMS,PKCS7}_verify(): use 'certs' parameter ('-certfile' option) also for ↵Dr. David von Oheimb2024-07-171-1/+4
| | | | | | | | chain building Reviewed-by: Viktor Dukhovni <[email protected]> Reviewed-by: Tomas Mraz <[email protected]> (Merged from https://github.com/openssl/openssl/pull/18916)
* Fix a possible memleak in cms_mainBernd Edlinger2023-12-121-2/+4
| | | | | | Reviewed-by: Shane Lontis <[email protected]> Reviewed-by: Tomas Mraz <[email protected]> (Merged from https://github.com/openssl/openssl/pull/22918)
* Fix a possible memory leak in make_receipt_requestBernd Edlinger2023-12-011-2/+7
| | | | | | | | | | When the CMS_ReceiptRequest cannot be created, the rct_to and rct_from may be leaked. Reviewed-by: Neil Horman <[email protected]> Reviewed-by: Todd Short <[email protected]> Reviewed-by: Tomas Mraz <[email protected]> (Merged from https://github.com/openssl/openssl/pull/22742)
* Copyright year updatesMatt Caswell2023-09-071-1/+1
| | | | | Reviewed-by: Richard Levitte <[email protected]> Release: yes
* apps/cms.c: Fix unreachable code in cms_main()atishkov2023-07-191-13/+10
| | | | | | Reviewed-by: Tom Cosgrove <[email protected]> Reviewed-by: Tomas Mraz <[email protected]> (Merged from https://github.com/openssl/openssl/pull/21474)
* Enable some disabled __owursDmitry Belyavskiy2023-02-071-1/+2
| | | | | | | | | Fixes #15902 Reviewed-by: Tomas Mraz <[email protected]> Reviewed-by: Paul Dale <[email protected]> Reviewed-by: Todd Short <[email protected]> (Merged from https://github.com/openssl/openssl/pull/15905)
* Update copyright yearMatt Caswell2022-05-031-1/+1
| | | | | Reviewed-by: Tomas Mraz <[email protected]> Release: yes
* CMS sign digestViktor Söderqvist2022-04-021-9/+43
| | | | | | | | | | | | | CLI changes: New parameter -digest to CLI command openssl cms, to provide pre-computed digest for use with -sign. API changes: New function CMS_final_digest(), like CMS_final() but uses a pre-computed digest instead of computing it from the data. Reviewed-by: Tomas Mraz <[email protected]> Reviewed-by: David von Oheimb <[email protected]> Reviewed-by: Todd Short <[email protected]> (Merged from https://github.com/openssl/openssl/pull/15348)
* APPS: Add check for multiple 'unknown' optionsDr. David von Oheimb2022-01-111-0/+1
| | | | | Reviewed-by: Dmitry Belyavskiy <[email protected]> (Merged from https://github.com/openssl/openssl/pull/16416)
* add OSSL_STACK_OF_X509_free() for commonly used patternDr. David von Oheimb2021-12-211-3/+3
| | | | | Reviewed-by: Paul Dale <[email protected]> (Merged from https://github.com/openssl/openssl/pull/17307)
* APPS: Improve diagnostics on missing/extra args and unknown cipher/digestDr. David von Oheimb2021-12-071-4/+2
| | | | | Reviewed-by: Paul Dale <[email protected]> (Merged from https://github.com/openssl/openssl/pull/16450)
* CMS app: Fix new -wrap optionDr. David von Oheimb2021-08-251-1/+1
| | | | | | Reviewed-by: Tomas Mraz <[email protected]> Reviewed-by: Dmitry Belyavskiy <[email protected]> (Merged from https://github.com/openssl/openssl/pull/16396)
* Get rid of warn_binaryDmitry Belyavskiy2021-08-201-29/+0
| | | | | | | | | | | | | Current implementation of warn_binary introduces a regression when the content is passed in /dev/stdin as an explicit file name and reads the file to be processed twice otherwise. I suggest to reimplement this functionality after 3.0 if necessary. Fixes #16359 Reviewed-by: David von Oheimb <[email protected]> (Merged from https://github.com/openssl/openssl/pull/16367)
* cms: Fix handling of -rctform optionTomas Mraz2021-08-051-8/+4
| | | | | | Reviewed-by: Paul Dale <[email protected]> Reviewed-by: Dmitry Belyavskiy <[email protected]> (Merged from https://github.com/openssl/openssl/pull/16216)
* cms: Do not try to check binary format on stdinTomas Mraz2021-08-051-0/+2
| | | | | | | | Fixes #16195 Reviewed-by: Paul Dale <[email protected]> Reviewed-by: Dmitry Belyavskiy <[email protected]> (Merged from https://github.com/openssl/openssl/pull/16216)
* apps: use get_cipher_any() instead of get_cipher() for commands that support ↵Pauli2021-06-161-2/+2
| | | | | | | these ciphers/modes Reviewed-by: Tomas Mraz <[email protected]> (Merged from https://github.com/openssl/openssl/pull/15747)
* Rename all getters to use get/get0 in nameTomas Mraz2021-06-011-1/+1
| | | | | | | | | | | | | | For functions that exist in 1.1.1 provide a simple aliases via #define. Fixes #15236 Functions with OSSL_DECODER_, OSSL_ENCODER_, OSSL_STORE_LOADER_, EVP_KEYEXCH_, EVP_KEM_, EVP_ASYM_CIPHER_, EVP_SIGNATURE_, EVP_KEYMGMT_, EVP_RAND_, EVP_MAC_, EVP_KDF_, EVP_PKEY_, EVP_MD_, and EVP_CIPHER_ prefixes are renamed. Reviewed-by: Paul Dale <[email protected]> (Merged from https://github.com/openssl/openssl/pull/15405)
* apps/cms.c: Correct -sign output and -verify input with -binaryDr. David von Oheimb2021-05-221-5/+20
| | | | | | | | | Also add related warnings on irrelevant use of -nodetach and -content options. Fixes #15347 Reviewed-by: Tomas Mraz <[email protected]> (Merged from https://github.com/openssl/openssl/pull/15358)
* apps/cms: Simplify handling of encerts; add warning if they are ignoredDr. David von Oheimb2021-05-221-20/+22
| | | | | Reviewed-by: Tomas Mraz <[email protected]> (Merged from https://github.com/openssl/openssl/pull/14843)
* apps/cms: Clean up order of options in help output and documentationDr. David von Oheimb2021-05-201-143/+156
| | | | | Reviewed-by: Tomas Mraz <[email protected]> (Merged from https://github.com/openssl/openssl/pull/15126)
* apps/cms.c: Simplify make_receipt_request() and load_content_info(()Dr. David von Oheimb2021-05-191-36/+27
| | | | | | | Also improve adherence to code formatting rules. Reviewed-by: Tomas Mraz <[email protected]> (Merged from https://github.com/openssl/openssl/pull/12959)
* apps/cms.c: Make -sign and -verify handle binary inputDr. David von Oheimb2021-05-191-13/+42
| | | | | | | Fixes #8940 Reviewed-by: Tomas Mraz <[email protected]> (Merged from https://github.com/openssl/openssl/pull/12959)
* Make the -inform option to be respected if possibleTomas Mraz2021-05-061-7/+9
| | | | | | | | | | | | | | | | Add OSSL_STORE_PARAM_INPUT_TYPE and make it possible to be set when OSSL_STORE_open_ex() or OSSL_STORE_attach() is called. The input type format is enforced only in case the file type file store is used. By default we use FORMAT_UNDEF meaning the input type is not enforced. Fixes #14569 Reviewed-by: Paul Dale <[email protected]> (Merged from https://github.com/openssl/openssl/pull/15100)
* APPS: Replace 'OPT_ERR = -1, OPT_EOF = 0, OPT_HELP' by OPT_COMMON macroDr. David von Oheimb2021-05-051-1/+1
| | | | | Reviewed-by: Tomas Mraz <[email protected]> (Merged from https://github.com/openssl/openssl/pull/15111)
* Fetch cipher-wrap after loading providers.Rich Salz2021-05-051-14/+7
| | | | | | | | Use official (first) names for wrapping algorithms. Reviewed-by: David von Oheimb <[email protected]> Reviewed-by: Tomas Mraz <[email protected]> (Merged from https://github.com/openssl/openssl/pull/14182)
* Remove an unused parameterRich Salz2021-04-221-1/+1
| | | | | | Reviewed-by: Matthias St. Pierre <[email protected]> Reviewed-by: Tomas Mraz <[email protected]> (Merged from https://github.com/openssl/openssl/pull/14943)