summaryrefslogtreecommitdiff
path: root/src/usr.bin/openssl/speed.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Merge testdsa.h and tesrsa.h into speed.ctb2025-01-021-6/+712
| | | | | | | | | | | | Having constant arrays in a header is just stupid (whether the constants are static or not), and most of the contents of these two headers clearly belongs into a C file. Since the garbage pile that is speed.c was not ugly enough, merge all of it there, since it is the only consumer. discussed with jsing PS: still waiting for that elusive volunteer who reworks libdes's speed.c into something resembling C code.
* openssl speed: stop trying to use small curvestb2024-11-301-25/+11
| | | | | | | secp160r1 and nistp192 are no longer available in libcrypto. Should have been committed along with disabling these curves, but was missed. ok jsing
* Move the sigaction next to multitb2024-07-131-2/+2
| | | | Reduces diff in -portable
* use sigaction() to setup SIGARLM so we can set SA_RESTART, andderaadt2024-07-121-6/+8
| | | | | | remove the re-arming in the handler. Better than using siginterrupt(), and avoids the errno saving requirement in the handler also. ok guenther millert
* do not need to force bss values to 0deraadt2024-07-091-2/+2
|
* KNF a pile of else if blocks; ok tbderaadt2024-07-091-19/+9
|
* signal handler must use the save_errno dance, and massage a variablederaadt2024-07-011-2/+5
| | | | | of type 'volatile sig_atomic_t' ok tb
* Remove antiquated options outputtb2023-07-271-19/+2
| | | | | | | | This is uninteresting and rather meaningless except for the implementer. No need to have several hundred lines of code backing half a dozen symbols in the public API for this. ok jsing
* openssl speed: add an '-unaligned n' optiontb2023-05-201-5/+27
| | | | | | | | | | | | | | | | All hashes and ciphers covered by speed should be able to handle unaligned input and output. The buffers used in openssl speed are well aligned since they are large, so will never exercise the more problematic unaligned case. I wished something like this was available on various occasions. It would have been useful to point more easily at OpenSSL's broken T4 assembly. Yesterday there were two independent reasons for wanting it, so I sat down and did it. It's trivial: make the allocations a bit larger and use buffers starting at an offset inside these allocations. Despite the trivality, I managed to have a stupid bug. Thanks miod. discussed with jsing ok miod
* openssl speed: minor style nitstb2023-05-201-8/+6
| | | | | | | This drops a bunch of unnecessary parentheses, makes the strcmp() checks consistent and moves some "}\n\telse" to "} else". Makes an upcoming commit smaller
* openssl speed: remove binary curve remnantstb2023-05-201-88/+5
| | | | | | | | | | | | | | | This wasn't properly hidden under OPENSSL_NO_EC2M, and all it does now is producing ugly errors and useless "statistics". While looking at this, I found that much of speed "has been pilfered from [Eric A. Young's] libdes speed.c program". Apparently this was an precursor and ingredient of SSLeay. Unfortunately, it seems that this piece of the history is lost. ok miod PS: If anyone is bored, a rewrite from scratch of the speed 'app' would be a welcome contribution and may be an instructive rainy day project. The current code was written in about the most stupid way possible so as to maximize fragility and unmaintainability.
* openssl speed: avoid bad pluraltb2023-02-231-5/+5
| | | | | | | Remedy a case of twitching eyes caused by seeing "Doing ... rsa's for 10s". If this breaks someone's script, so be it. ok jsing sthen
* 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@
* Convert openssl(1) speed for opaque EVP_AEAD_CTXtb2022-01-141-13/+31
| | | | ok inoguchi jsing
* Check error returns for HMAC_* to appease coverity.tb2021-12-261-4/+13
| | | | CID 345114
* One more leak similar to previous.tb2021-12-261-2/+2
|
* Plug leakstb2021-12-261-2/+2
| | | | CID 345111
* Make speed.c compile with opaque EVP_CIPHER, EVP_MD and HMAC_CTX.tb2021-12-121-20/+29
| | | | ok inoguchi
* 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-2/+2
|
* Seperate real and user timer interfacesjca2017-12-051-2/+5
| | | | | | | | | 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
* Fix cast-pasto's in commentsguenther2017-10-071-3/+3
|
* Sorry Andrew and Luke, I'm pretty sure we deleted your IRIX and VMS code.deraadt2016-08-221-4/+1
|
* 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.
* Pack the algorithm numbers, to avoid printing a useless (null) 0 0 0 0miod2015-09-201-34/+34
| | | | line in the summary.
* Temporarily revive MD4 for MS CHAP support.doug2015-09-141-4/+31
|
* Remove MD4 support from LibreSSL.doug2015-09-131-31/+4
| | | | | | | | 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@
* Add openssl(1) speed support for AEAD algorithms.bcook2015-09-121-17/+96
| | | | | | | This adds aes-128-gcm aes-256-gcm chacha20-poly1305 from Adam Langley's original patch for OpenSSL ok beck@ jsing@
* unifdef -DOPENSSL_NO_RC5jsing2015-09-111-34/+1
|
* Remove engine command and parameters from openssl(1).bcook2015-09-111-22/+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 stupid castsderaadt2015-09-111-4/+4
|
* Remove all duplicate prototypes for *_main functions (these are alreadyjsing2015-08-221-4/+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@
* Don't try to run ECDH if ecdh_checks fails in openssl(1) speed.doug2015-07-201-17/+23
| | | | | | | Coverity 72744 noticed that rsa_count was overwitten. The underlying issue is that this code is supposed to be in an else block. ok bcook@
* Repair algorithm name array after 1.6.miod2015-07-031-4/+4
|
* Remove obsolete MDC-2DES from libcrypto.doug2015-06-201-31/+3
| | | | ok deraadt@ jsing@ miod@
* Delete commented out code from openssl(1) apps.doug2015-02-081-20/+2
| | | | | | | | | | From OpenSSL commits: 6f91b017bbb7140f816721141ac156d1b828a6b3 75d0ebef2aef7a2c77b27575b8da898e22f3ccd5 a2b18e657ea1a932d125154f4e13ab2258796d90 ok miod@, jsing@
* Check the return values of several reallocarray() calls. While here,lteo2015-01-031-1/+5
| | | | | | also check the return value of an adjacent malloc() call. ok jsing@
* Remove ifdef statements for TIMES and USE_TOD; they don't do anything,lteo2015-01-021-5/+1
| | | | | | | apart from introducing a bug where the -elapsed option is not listed in the usage output when it should be. feedback/ok bcook@ jsing@
* Use arc4random_buf() instead of RAND(_pseudo)?_bytes().jsing2014-10-221-4/+3
| | | | ok bcook@
* Move openssl(1) from /usr/sbin/openssl to /usr/bin/openssl, since it is notjsing2014-08-261-0/+2170
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@