summaryrefslogtreecommitdiff
path: root/src/usr.bin/openssl/cms.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Add -CRLfile option to 'cms' sub commandjob2024-08-121-5/+32
| | | | | | | | | This option allows to verify certs in a CMS object against additional CRLs. Ported from work by Tom Harrison from APNIC OK tb@
* Make a few purpose things consttb2023-11-211-2/+2
| | | | | This should allow us to constify a sizable table in libcrypto in an upcoming bump.
* Drop policy printing from openssltb2023-04-141-23/+1
| | | | | | | | | | | | Nothing really uses the policy tree. It's desgined with built-in DoS capabilities directly from the RFC. It will be removed from the attack surface and replaced with something equivalent that doesn't grow exponentially with the depth. This removes the only reason the policy tree itself ever leaked out of the library. ok jsing
* Rename struct ${app}_config to plain cfgtb2023-03-061-351/+351
| | | | | | | | | All the structs are static and we need to reach into them many times. Having a shorter name is more concise and results in less visual clutter. It also avoids many overlong lines and we will be able to get rid of some unfortunate line wrapping down the road. Discussed with jsing
* openssl/cms: zap some trailing whitespacetb2023-03-051-3/+3
|
* Remove the legacy interactive mode from openssl(1).joshua2022-11-111-6/+4
| | | | | | | | This removes the legacy interactive mode from openssl(1) since it is rarely used, complicates the code, and has also been removed from OpenSSL in version 3.x.x. ok tb@ jsing@
* openssl cms: avoid NULL derefs on option parsingtb2022-03-231-1/+3
| | | | | | | Two missing initializations in the new option handling cause a segfault when -nodetach or -noindef is passed to openssl cms. ok inoguchi jsing miod
* Avoid memory leak in error path with openssl(1) cmsinoguchi2022-01-161-1/+3
| | | | | | CID 345314 345320 ok tb@
* Indicate current default cipherinoguchi2022-01-081-3/+3
|
* Free memory before assign to avoid leakinoguchi2022-01-061-1/+7
| | | | CID 313263 313301 313322
* Free memory if error occurredinoguchi2022-01-061-2/+4
|
* Remove NULL check before freeinoguchi2022-01-061-3/+2
|
* Wrap long lines and add some bracesinoguchi2022-01-051-74/+129
|
* Check function return valueinoguchi2022-01-051-8/+18
|
* Checking pointer variable with NULLinoguchi2022-01-051-74/+75
|
* Use calloc instead of mallocinoguchi2022-01-051-2/+2
| | | | suggested by tb@
* Check NULL first and unindent the rest of the codeinoguchi2022-01-051-41/+45
| | | | suggested by tb@
* Convert openssl(1) cms option handlinginoguchi2022-01-051-620/+1240
| | | | | | | Just applying new option handling and no functional changes. Referred to verify.c and using 'verify_shared_options'. ok and comments from jsing@ and tb@
* Plug memleaktb2021-12-261-2/+4
| | | | CID 345119
* Check CMS API return value in openssl(1) cmsinoguchi2020-01-041-11/+21
| | | | ok jsing@
* More return value check in openssl(1) cmsinoguchi2019-11-191-23/+29
| | | | | | Checking return value of sk_.*_new_null(). ok beck@ jsing@
* Remove typedef and check sk_push return value in openssl(1) cmsinoguchi2019-11-181-23/+33
| | | | | | | | - Remove typedef and use 'struct cms_key_param' instead - Check return value of sk_X509_push and sk_OPENSSL_STRING_push - Add a blank line to separate variable declarations from code comments from jsing@
* Add -keyopt opiton to openssl(1) cms subcommandinoguchi2019-11-181-8/+128
| | | | | | | This provides rsa_padding_mode:oaep for cms -encrypt, and rsa_padding_mode:pss for cms -sign. ok jsing@
* Indent labels for diffability.jsing2019-11-041-5/+5
|
* Remove spaces between * and variable names.jsing2019-11-041-25/+25
|
* Remove explicit NULL checks before *_free() calls.jsing2019-11-041-21/+14
|
* Currently we need to include pem.h before cms.h...jsing2019-11-041-2/+3
|
* Remove engine argument from load_cert() calls.jsing2019-11-041-8/+8
| | | | This was cleaned up after cms went to the attic.
* Bring openssl(1) cms back from the attic.jsing2019-11-041-0/+1142
|
* bye bye cms. send it to the atticbeck2016-09-041-1142/+0
| | | | ok jsing@
* Exit if a pledge call fails in non-interactive mode.doug2015-10-171-2/+4
| | | | ok semarie@
* add "tty" for several subcommands of opensslsemarie2015-10-171-2/+2
| | | | | | | | | | | it is needed in order to let libssl UI_* function plays with echo on/off when asking for password on terminal. passwd subcommand needs additionnal "wpath cpath" in order to let it calls fopen("/dev/tty", "w") (O_WRONLY with O_CREAT | O_TRUNC). problem reported by several with and ok doug@
* Initial support for pledges in openssl(1) commands.doug2015-10-101-1/+6
| | | | | | | | | | | | | | | | openssl(1) has two mechanisms for operating: either a single execution of one command (looking at argv[0] or argv[1]) or as an interactive session than may execute any number of commands. We already have a top level pledge that should cover all commands and that's what interactive mode must continue using. However, we can tighten up the pledges when only executing one command. This is an initial stab at support and may contain regressions. Most commands only need "stdio rpath wpath cpath". The pledges could be further restricted by evaluating the situation after parsing options. deraadt@ and beck@ are roughly fine with this approach.
* Remove engine command and parameters from openssl(1).bcook2015-09-111-19/+2
| | | | | | | We do not have any builtin or dynamic engines, meaning openssl(1) has no way to use the engine command or parameters at all. ok jsing@
* Remove all duplicate prototypes for *_main functions (these are alreadyjsing2015-08-221-3/+1
| | | | | | | | | provided by progs.h). Also, move the FUNCTION type (and flags) into openssl.c since that is the only place of use. Lastly, remove pointless 'extern' from the prototypes and use char **argv instead of char *argv[] (the former is used elsewhere). ok deraadt@ doug@
* Move openssl(1) from /usr/sbin/openssl to /usr/bin/openssl, since it is notjsing2014-08-261-0/+1154
a system/superuser binary. At the same time, move the source code from its current lib/libssl/src/apps location to a more appropriate home under usr.bin/openssl. ok deraadt@ miod@