summaryrefslogtreecommitdiff
path: root/src/usr.bin/openssl/req.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* openssl req: plug obvious leaktb2024-04-171-1/+2
| | | | CID 492603
* Teach openssl req about EdDSA certstb2023-07-021-1/+8
| | | | | | | After a few things in libcrypto were adjusted, this diff makes issuing certificate requests with Ed25519 work. ok beck
* Rename struct ${app}_config to plain cfgtb2023-03-061-179/+179
| | | | | | | | | 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: make all config structs statictb2023-03-051-2/+2
| | | | | These are per-app, so per-file. Most of them already are static, adjust the rest of them.
* openssl/req: garbage collect a pointless EVP_MD_CTX_init()tb2023-03-041-2/+2
| | | | | | | Before do_sign_init(), the ctx is always allocated by EVP_MD_CTX_new() aka calloc(). There is no point in doing EVP_MD_CTX_init(), aka bzero(). ok jsing
* 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@
* Use X509_*get0_pubkey() wherever possible to simplify and clean uptb2022-02-031-19/+13
| | | | | | the code. Also add error checking where possible. ok jsing
* Convert req.c to compile with opaque EVP_MD_CTX.tb2021-12-121-25/+43
| | | | ok inoguchi
* Nuke the asn1-kludge. This was a workaround for CAs with broken PCKS#10tb2021-10-231-25/+3
| | | | | | encoders many moons ago. OpenSSL removed it in 2015. ok beck jsing
* Stop setting enc.modified manually. It's no longer needed.tb2021-10-221-2/+1
|
* Convert openssl req option handling.jsing2020-08-091-378/+572
| | | | | | With input from inoguchi@ ok beck@ inoguchi@
* Check return value and remove unnecessary variableinoguchi2019-11-061-7/+7
| | | | | | | - Check NCONF_new() return value - Remove unnecessary 'i' comments from jsing@
* Add -addext option to openssl(1) req subcommandinoguchi2019-11-061-3/+133
| | | | | | First step of adding -addext option to openssl(1) req from OpenSSL 1.1.1d. ok jsing@
* snprintf/vsnprintf return < 0 on error, rather than -1.deraadt2019-07-031-9/+9
|
* Indent labels with a single space so that diff prototypes are more useful.jsing2018-02-071-10/+10
|
* rearrange pledge promises into the canonical order; easier to eyeballderaadt2017-01-201-2/+2
|
* mutli -> multimiod2015-11-141-2/+2
|
* 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.
* Temporarily revive MD4 for MS CHAP support.doug2015-09-141-2/+2
|
* Remove MD4 support from LibreSSL.doug2015-09-131-2/+2
| | | | | | | | MD4 should have been removed a long time ago. Also, RFC 6150 moved it to historic in 2011. Rides the major crank from removing SHA-0. Discussed with many including beck@, millert@, djm@, sthen@ ok jsing@, input + ok bcook@
* Remove engine command and parameters from openssl(1).bcook2015-09-111-56/+10
| | | | | | | 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@
* Remove obsolete MDC-2DES from libcrypto.doug2015-06-201-2/+2
| | | | ok deraadt@ jsing@ miod@
* Repair BUF_strdup() breakage.jsing2014-10-161-2/+2
|
* Switch "openssl req" to using SHA256 for hashes and AES256 to encrypt on-disksthen2014-10-011-5/+4
| | | | | | | | | | keys by default (instead of SHA1/3DES) and update documentation to match. Another way to do this is s/NID_sha1/NID_sha256/ in src/crypto/rsa/rsa_ameth.c ("case ASN1_PKEY_CTRL_DEFAULT_MD_NID") but going with the more targetted method above that only affects "openssl req" for now. Help/OK jsing@. OKs on earlier diffs changing openssl.cnf from phessler@ aja@
* openssl_setup() calls SSL_load_error_strings(), which happens to calljsing2014-08-281-2/+2
| | | | | ERR_load_crypto_strings() - as such, we do not need to call the same function from most of the applications.
* Move openssl(1) from /usr/sbin/openssl to /usr/bin/openssl, since it is notjsing2014-08-261-0/+1602
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@