summaryrefslogtreecommitdiff
path: root/src/usr.bin/openssl/s_time.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Mark the initialized struct options arrays as both static and const.guenther2019-07-141-2/+2
| | | | | | This moves them from .data to .data.rel.ro ok deraadt@ inoguchi@
* snprintf/vsnprintf return < 0 on error, rather than -1.deraadt2019-07-031-2/+2
|
* Move tally mark printing out of the main benchmark loop; ok tb@cheloha2018-09-171-14/+21
|
* Drop SSLv2, SSLv3 support.cheloha2018-08-281-6/+2
| | | | | | | No need to check for SSLv2/3 sessions when printing the tally mark. Also do SSLv23_client_method -> TLS_client_method. ok jsing@
* Check for SSL_write(3) error.cheloha2018-08-281-3/+4
| | | | | | | | | | jsing@ notes that this is not a complete solution, as we don't account for retries or partial writes, but that this is a step in a right direction. May want to revisit this later to provide a complete solution. ok jsing@
* Use a monotonic clock for the benchmark timeout.cheloha2018-08-221-24/+9
| | | | | | | | While here, we don't need the app_timer_* wrapper function, it only obfuscates things, so delete it. Also while here, totalTime only needs to be assigned once. ok tb@
* Merge duplicate benchmark() GET/SSL_shutdown blocks into doConnection().cheloha2018-08-211-41/+25
| | | | | | | | | | | | We need to then remove the shadow i from the GET block. While there, move retval's declaration to the beginning of the function. As doConnection() now executes the body of the benchmark's test, rename it to "run_test". Shadow variable spotted by tb@. ok tb@
* Plug SSL object leaks in doConnection().cheloha2018-08-181-32/+22
| | | | | | | | | | | | | Move SSL_new/SSL_free up into benchmark() to restrict the responsibility for the SSL object to a single scope. Make doConnection() return an int, openssl-style. Some miscellaneous cleanup, too. Discussed with tb, jsing, and jca. Basic idea from jsing, lots of patch input from tb. ok deraadt on an earlier version ok tb jsing
* Don't fail by default in the -new case; ok tb jcacheloha2018-08-141-19/+12
|
* Refactor the nearly identical benchmark loops into a single loop.cheloha2018-08-111-139/+108
| | | | | | | | | | Move all of the benchmark code -- loop initialization, the loops, and the report printing -- into a new function, benchmark(). Eliminates lots of duplicate code. Regressions to 1.20 caught by tb@ and inoguchi@. Tweaked by tb@. ok tb@, jsing@
* openssl app timers: TM_START -> TM_RESET, TM_STOP -> TM_GETcheloha2018-07-131-3/+3
| | | | | | | | Much more apt than the current operation names. Names suggested by jca@ ages ago. ok jca, jsing
* Indent labels with a single space so that diff prototypes are more useful.jsing2018-02-071-3/+3
|
* Remove guards around *_free() calls since these functions handle NULL.jsing2018-02-071-3/+2
|
* Remove manual shutdown and close of the socket since in this casetb2018-02-061-7/+1
| | | | | | SSL_free will do this a second time. ok jsing
* Remove unused extern variable in openssl(1) s_timeinoguchi2018-01-071-2/+1
| | | | | | | | | This extern variable appears not to be used. And it is overridden by local variable in doConnection(). This causes MSVC warning C4459 "declaration of 'verify_error' hides global declaration". OK millert@
* Seperate real and user timer interfacesjca2017-12-051-3/+3
| | | | | | | | | Use more descriptive names, and make it clearer that real and user timers work on different static storage. The end goal is to be able to reuse those timer functions, instead of inlining other timer implementations subject to clock jumps. Discussed with Scott Cheloha
* openssl s_time -connect host:port needs dns promise for pledge(2) otherwise itmestre2017-11-021-2/+2
| | | | | | | | will SIGABRT Bug found by Scott Cheloha <scottcheloha at gmail.com> OK deraadt@
* rearrange pledge promises into the canonical order; easier to eyeballderaadt2017-01-201-2/+2
|
* Add OPTION_ARG_TIME for parsing a (64 bit if needed) time_tderaadt2016-08-301-2/+2
| | | | prodding & ok jsing
* Fix 32-bit time handling, using time_t and make it work on systemsderaadt2016-08-301-23/+23
| | | | | where that is long long. ok beck guenther
* Exit if a pledge call fails in non-interactive mode.doug2015-10-171-2/+4
| | | | ok semarie@
* 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.
* "Shutdown" should be "Shut down" in the usage for s_time's -no_shutdownlteo2015-09-111-2/+2
| | | | flag. Pointed out by jmc@'s commit to the openssl(1) man page.
* *** empty log message ***lteo2015-09-111-19/+24
|
* Fix shadowed verify_error in s_server by removing the unused global.bcook2015-09-101-2/+5
| | | | | | 's_time -verify 1' will now actually verify the peer certificate. ok beck@
* 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 SSLv3 support from openssl(1) s_time.doug2015-07-171-13/+3
| | | | ok miod@ bcook@ beck@
* Only set the cipher list if one was specified and actually check the returnjsing2015-04-151-7/+12
| | | | | | | value from SSL_CTX_set_cipher_list(). Also remove pointless getenv() handling. ok bcook@ doug@
* Move verify externs into the header file.jsing2015-04-141-3/+1
|
* Convert openssl(1) s_time to new option handling.jsing2015-04-141-201/+178
| | | | ok doug@
* Delete commented out code from openssl(1) apps.doug2015-02-081-17/+1
| | | | | | | | | | From OpenSSL commits: 6f91b017bbb7140f816721141ac156d1b828a6b3 75d0ebef2aef7a2c77b27575b8da898e22f3ccd5 a2b18e657ea1a932d125154f4e13ab2258796d90 ok miod@, jsing@
* simple select() to poll() conversion; reviewed by millert and dougderaadt2014-11-041-9/+9
|
* Enable -Wshadow in openssl(1) and fix a few shadow warnings.doug2014-09-011-9/+7
| | | | ok jsing@
* Move openssl(1) from /usr/sbin/openssl to /usr/bin/openssl, since it is notjsing2014-08-261-0/+587
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@