summaryrefslogtreecommitdiff
path: root/src/usr.bin/openssl/apps.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Options that take a time argument....take an argumentguenther2016-09-041-2/+3
| | | | diff from Kinichiro Inoguchi (kinichiro.inoguchi (at) gmail.com)
* Add OPTION_ARG_TIME for parsing a (64 bit if needed) time_tderaadt2016-08-301-1/+11
| | | | prodding & ok jsing
* Repeated occurances of the idiom buf[5][BUFSIZ] -- ridiculous. Give eachderaadt2016-08-261-86/+87
| | | | | | buf a special name, recognize that most are PATH_MAX, and remove a few that are not needed at all. ok jsing beck
* mutli -> multimiod2015-11-141-2/+2
|
* Factor out setup_up / destroy_ui functions.bcook2015-09-131-52/+25
| | | | | | | | | 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.
* Remove engine command and parameters from openssl(1).bcook2015-09-111-92/+11
| | | | | | | 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@
* Correct spelling of OPENSSL_cleanse.jsing2015-09-101-4/+4
|
* remove superfluous strings.hbcook2015-07-211-2/+1
|
* app_tminterval moved to apps_posix.c, we don't need sys/times.hbcook2015-07-201-2/+1
|
* Check return value for ENGINE_ctrl and ENGINE_ctrl_cmd.doug2015-07-201-4/+15
| | | | | | Fixes Coverity issue 21645. ok bcook@
* Warn when rename() fails in openssl(1) apps.doug2015-07-201-8/+36
| | | | | | Fixes Coverity issues 78795 and 78803. ok bcook@
* kill leak, found by coverity, ID 105348beck2015-07-161-2/+5
| | | | ok miod@
* Add OPTION_ARG_LONG for handling of options with a long type.jsing2015-07-151-2/+13
| | | | ok doug@
* Remove fallback dynamic engine loading support.bcook2015-06-191-18/+2
| | | | | | | | | | | | | | | | | | | | | | | Since we no longer have dynamic engines, don't bother falling back to them if a builtin engine is not found first. Before: $ openssl dgst -engine unknown invalid engine "unknown" 27256010481532:error:2606A074:engine routines:ENGINE_by_id:no such engine:/usr/src/lib/libcrypto/crypto/../../libssl/src/crypto/engine/eng_list.c:384:id=unknown 27256010481532:error:2606A074:engine routines:ENGINE_by_id:no such engine:/usr/src/lib/libcrypto/crypto/../../libssl/src/crypto/engine/eng_list.c:384:id=dynamic After: $ openssl dgst -engine unknown invalid engine "unknown" 27256010481532:error:2606A074:engine routines:ENGINE_by_id:no such engine:/usr/src/lib/libcrypto/crypto/../../libssl/src/crypto/engine/eng_list.c:384:id=unknown ok doug@
* Add support for OPTION_DISCARD.doug2015-06-161-1/+4
| | | | ok jsing@
* Modify BSIZE to BUFLEN to avoid redefinition on HP-UX.bcook2015-02-071-12/+12
| | | | | | | | | | HP-UX defines BSIZE in its <sys/param.h>, and there is a route where its getting included as a side-effect. I tracked back to at least from HP-UX 9.0 ca. 1993, up to the latest, so the user namespace is polluted. from kinichiro <kinichiro.inoguchi@gmail.com> ok miod@, jsing@
* Check the return values of several reallocarray() calls. While here,lteo2015-01-031-1/+3
| | | | | | also check the return value of an adjacent malloc() call. ok jsing@
* Provide option types for binary AND, binary OR and silently discarding anjsing2015-01-011-1/+9
| | | | option.
* Fix subtle typo.jsing2014-12-281-2/+2
|
* Allow a default option to be specified by having a NULL name, but a validjsing2014-12-281-4/+4
| | | | option type. In this case process the option as per normal.
* Provide an option type that allows for a callback function to consume anjsing2014-12-281-2/+9
| | | | | arbitrary number of arguments. This will allow for more complex option handling as required by some of the openssl(1) applications.
* Teach option parsing that a single hyphen denotes the end of named optionsjsing2014-12-281-2/+14
| | | | (as currently only implemented by some of the openssl(1) applications).
* Provide a mechanism for option parsing to return the number of argumentsjsing2014-12-281-2/+9
| | | | | that it has consumed. This allows for the handling of multiple unnamed arguments, including lists of filenames.
* Only accept a single unnamed argument - the existing behaviour is tojsing2014-12-281-1/+12
| | | | | | | silently accept multiple unnamed arguments, ignoring all except the last. This behaviour was already inconsistent between openssl(1) applications; apply the principal of least surprise. This will also simplify the addition of upcoming functionality.
* Slightly simplify options parsing logic.jsing2014-12-281-65/+58
|
* Provide two different function pointers for option function callbacks. Thisjsing2014-12-281-3/+3
| | | | | allows for simpler code in the common cases and will allow for further extension to support the complex cases.
* unifdef OPENSSL_NO_NEXTPROTONEGjsing2014-12-141-4/+1
|
* Move Windows OS-specific functions to make porting easier.bcook2014-12-031-23/+2
| | | | | | | | | | | | Several functions that need to be redefined for a Windows port are right in the middle of other code that is relatively portable. This patch isolates the functions that need Windows-specific implementations so they can be built conditionally in the portable tree. Add calls to BIO_sock_init() as-needed to openssl(1) so that socket IO works on Windows. Sorry, these are no-op on other platforms. ok jsing@ deraadt@
* More OPENSSL_NO_TLSEXT clean up.jsing2014-11-071-3/+3
|
* Repair BUF_strdup() breakage.jsing2014-10-161-2/+4
|
* Improve option usage output.jsing2014-09-011-7/+20
| | | | | | | If the option/argument string exceeds the given width, add a hanging indent prior to displaying the description. Also, if the description includes newlines, wrap and indent for each newline so that the indentation is correctly maintained.
* Move the callback function pointer outside the opt union so that the optionjsing2014-08-301-2/+7
| | | | | values are useable by the function. Also provide an option type that calls a function without consuming/passing an argument.
* Add option handling with a callback function for argument processing.jsing2014-08-281-1/+7
|
* Given the usage option name/argument name width a few more characters.jsing2014-08-281-2/+2
|
* Ensure that a format option argument is a known specifier.jsing2014-08-281-2/+10
|
* Add option handling for ordered flags.jsing2014-08-281-1/+6
|
* Add option handling for input/output formats.jsing2014-08-281-1/+6
|
* Add an option type that handles argument to integer conversion.jsing2014-08-271-3/+20
|
* Implement table-driven option parsing that allows an application tojsing2014-08-271-1/+96
| | | | | | | | | | | | | | | | | specify what its valid options are and where it wants them to be stored. This also allows for usage to be generated, almost for free, ensuring that the options and usage are automatically kept in sync. This will allow for a single option parsing implementation, rather than the current one-hand-rolled-option-parsing-and-random-usage-implementation per application. As a starting point, port the openssl(1) rand application to the new option parsing and usage (along with associated code clean up). With input from doug@. ok bcook@ doug@
* Move openssl(1) from /usr/sbin/openssl to /usr/bin/openssl, since it is notjsing2014-08-261-0/+2220
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@