summaryrefslogtreecommitdiff
path: root/src/usr.bin/openssl/openssl.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Merge s_apps.h into apps.htb2025-01-021-3/+1
| | | | discussed with jsing
* openssl(1) doesn't need 6 .h files: fold progs.h into apps.htb2025-01-021-2/+1
| | | | discussed with jsing
* Remove spkac subcommandtb2024-07-081-2/+1
| | | | | | | | | | | | | | Google killed efforts to have SPKAC in html5 by zapping it from chrome a decade ago. This effort doesn't look like it's going anywhere: https://datatracker.ietf.org/doc/draft-leggett-spkac/ Unfortunately, PHP and Ruby still support NETSCAPE_SPKI, so we can't kill that code, but I see no real reason we need to support this in our openssl command. If the need should arise we can write a somewhat less poor version of this. ok jsing
* Remove GOST and STREEBOG support from libssl.beck2024-02-031-7/+1
| | | | | | | | | | | | | | | | | | This version of GOST is old and not anywhere close to compliant with modern GOST standards. It is also very intrusive in libssl and makes a mess everywhere. Efforts to entice a suitably minded anyone to care about it have been unsuccessful. At this point it is probably best to remove this, and if someone ever showed up who truly needed a working version, it should be a clean implementation from scratch, and have it use something closer to the typical API in libcrypto so it would integrate less painfully here. This removes it from libssl in preparation for it's removal from libcrypto with a future major bump ok tb@
* remove unused args_st structjsg2023-06-111-6/+1
| | | | ok tb@
* Unifdef ZLIBtb2023-06-111-5/+1
| | | | | This is very dead code: the openssl app was never compiled with -DZLIB after January 1, 2015.
* Remove the nseq commandtb2023-04-251-2/+1
|
* Clean up openssl(1) command execution.joshua2022-11-111-20/+26
| | | | | | | | | This cleans up the code that handles command execution for openssl(1), displays the help message when 'openssl help' is executed, and exits with code 1 when an invalid command is executed, matching the behaviour of OpenSSL version 1.1+ and above. ok tb@
* Remove the legacy interactive mode from openssl(1).joshua2022-11-111-106/+51
| | | | | | | | 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@
* Hook openssl(1) cms back up.jsing2019-11-041-1/+4
|
* Add the SM4 block cipher from the Chinese standard GB/T 32907-2016.tb2019-03-171-1/+8
| | | | | Patch from Daniel Wyatt ok inoguchi, jsing
* Add sm3 to the 'openssl dgst' command.tb2018-11-111-1/+5
| | | | ok beck inoguchi
* Add automatic threading initialization for libcrypto.bcook2018-11-111-53/+1
| | | | | | | | | | | | | | This implements automatic thread support initialization in libcrypto. This does not remove any functions from the ABI, but does turn them into no-ops. Stub implementations of pthread_mutex_(init|lock|unlock) are provided for ramdisks. This does not implement the new OpenSSL 1.1 thread API internally, keeping the original CRYTPO_lock / CRYPTO_add_lock functions for library locking. For -portable, crypto_lock.c can be reimplemented with OS-specific primitives as needed. ok beck@, tb@, looks sane guenther@
* Indent labels with a single space so that diff prototypes are more useful.jsing2018-02-071-4/+4
|
* rearrange pledge promises into the canonical order; easier to eyeballderaadt2017-01-201-2/+2
|
* Nuke one more cms tendrilbeck2016-09-041-4/+1
| | | | ok jsing@
* Undo previous, pledge("dns") was already present. The problem was in s_server.jca2015-12-011-2/+2
|
* pledge dns so openssl can use dns.. noticed and fix by todd@beck2015-12-011-2/+2
| | | | ok jcs@ deraadt@ theo@
* In pledge(), put "dns" right after "inet".jca2015-11-211-2/+2
|
* Unbreak s_client, which should be allowed by pledge(2) to do DNS requests.jca2015-11-211-2/+2
| | | | From todd@
* 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@
* Implement real "flock" request and add it to userland programs thatmillert2015-10-161-2/+2
| | | | use pledge and file locking. OK deraadt@
* Initial support for pledges in openssl(1) commands.doug2015-10-101-1/+7
| | | | | | | | | | | | | | | | 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.
* normalize the ordering of tame requests (particularily, "rpath wpath cpath",deraadt2015-10-101-2/+2
| | | | | | | which i have put in that order). this is not important, but helps look for outliers which might be strange. it hints that "ioctl" should be reassessed in a few places, to see if "tty" is better; that "unix" may be used in some places where "route" could now work.
* Change all tame callers to namechange to pledge(2).deraadt2015-10-091-3/+3
|
* tame "stdio inet rpath cpath wpath proc" seems to be sufficient forderaadt2015-10-071-1/+7
| | | | | all the wading in here. "proc" is for the speed command, which fork()'s. ok doug
* remove vestigial bits of sha-0 and md2 from openssl(1)bcook2015-09-211-4/+1
| | | | | | | | Noted by kinichiro on github. We probably need a better way to indicate the list of message digests that are allowed, as the current ones are nowhere near exhaustive (sigh - guenther@) OK guenther@ jmc@
* Temporarily revive MD4 for MS CHAP support.doug2015-09-141-1/+4
|
* Remove MD4 support from LibreSSL.doug2015-09-131-4/+1
| | | | | | | | 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@
* Factor out setup_up / destroy_ui functions.bcook2015-09-131-3/+3
| | | | | | | | | This pulls out and renames setup_ui/destroy_ui so we have something that can be replaced as-needed, moving the the console setup code for Windows to app_win.c in -portable, instead of needing a local patch to enable binary console mode ui_read/write are also simplified.
* Nuke SSLEAY_CONF -- a backwards compatibility environment variable thatlteo2015-09-121-3/+1
| | | | | | | | | | has been superseded by OPENSSL_CONF and discouraged from use for almost 16 years. "Definately ok" jsing@ "burn it" deraadt@ "Kill it with fire" miod@ "KILL IT WITH FIRE!!! BURN!!!!" beck@
* unifdef -DOPENSSL_NO_RC5jsing2015-09-111-8/+1
|
* Remove engine command and parameters from openssl(1).bcook2015-09-111-17/+1
| | | | | | | 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 call to CRYPTO_malloc_init(), which does nothing.jsing2015-09-101-2/+1
|
* Remove all duplicate prototypes for *_main functions (these are alreadyjsing2015-08-221-1/+16
| | | | | | | | | 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@
* bring prototypes into scope, requires movement of a large global objectderaadt2015-08-191-1/+195
| | | | | out of .h file ok jsing
* Since Windows needs BIO_sock_init() before you can call any networkingbcook2015-03-221-1/+6
| | | | | | | | | functions, and ocsp and s_time need networking enabled too, this just moves BIO_sock_init() up into main() as a catch-all for all of the commands. Of course, it is a no-op on any other platform. ok @guenther
* Use arc4random_buf() instead of RAND(_pseudo)?_bytes().jsing2014-10-221-3/+1
| | | | ok bcook@
* Move openssl(1) from /usr/sbin/openssl to /usr/bin/openssl, since it is notjsing2014-08-261-0/+639
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@