summaryrefslogtreecommitdiff
path: root/src/usr.bin (follow)
Commit message (Collapse)AuthorAgeFilesLines
* openssl(1) asn1parse: avoid crash with ASN.1 BOOLEANStb2023-03-101-3/+4
| | | | | | | | | | | | | When pointing openssl asn1parse -strparse at DER octets 01 01, it crashes: $ printf '<\x01\x01>' | openssl asn1parse -inform der -strparse 1 Refuse to parse BOOLEAN types instead, which avoids a crash in hensonian /* hmm... this is a little evil, but it works */ code. Found while poking at CMS timestamps to understand one of job's diffs. with/ok jsing
* Basic cleanup in asn1pars.ctb2023-03-071-26/+16
| | | | Drop extra parentheses, unwrap some lines, compare pointers against NULL.
* Rename struct ${app}_config to plain cfgtb2023-03-0644-3260/+3260
| | | | | | | | | 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-0511-22/+22
| | | | | These are per-app, so per-file. Most of them already are static, adjust the rest of them.
* openssl/cms: zap some trailing whitespacetb2023-03-051-3/+3
|
* openssl enc doesn't really support AEAD ciphers and XTS modetb2023-03-041-2/+30
| | | | | | | | | | Do not display such ciphers in the usage display and error out if they are given. As pointed out by Pauli Dale, the current situation is confusing. Fixes GH issues #786 and #819 ok jsing
* 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
* 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
* openssl(1) pkcs7 avoid crash on malformed filestb2023-02-081-5/+9
| | | | | | | | When printing certificates or CRLs, check signed and signedAndEnveloped before dereferencing them. Prevents crash on inspecting malformed PKCS7 files. ok jsing
* ugly white spacederaadt2023-01-041-2/+2
|
* spelling fix; from paul tagliamontejmc2022-12-261-2/+2
| | | | ok tb
* Denote multiple arguments with 'arg ...' not 'args'kn2022-12-221-4/+4
| | | | | | | | | | | | | | | | | | | | A few programs used the plural in their synopsis which doesn't read as clear as the obvious triple-dot notation. mdoc(7) .Ar defaults to "file ..." if no arguments are given and consistent use of 'arg ...' matches that behaviour. Cleanup a few markups of the same argument so the text keeps reading naturally; omit unhelpful parts like 'if optional arguments are given, they are passed along' for tools like time(1) and timeout(1) that obviously execute commands with whatever arguments where given -- just like doas(1) which doesn't mention arguments in its DESCRIPTION in the first place. For expr(1) the difference between 'expressions' and 'expression ...' is crucial, as arguments must be passed as individual words. Feedback millert jmc schwarze deraadt OK jmc
* nc: skip connection info on failed or skipped udptest()tb2022-12-181-5/+8
| | | | | | | In udp mode, nc would always print that the connected succeeded independently of whether that was actually the case. Don't do that. idea/ok mpf
* nc: do not test the connection in non-interactive modetb2022-12-181-1/+5
| | | | | | | | The connection test writes four X to the socket, which corrupts data that we may want to pipe into nc. So don't do that if stdin is not a tty but still do it in scan mode, this is needed according to chris. based on a diff by and ok mpf
* nc: clean up and simplify connection_infO()tb2022-12-181-7/+7
| | | | ok mpf as part of a larger diff
* nc: pass protocol name to connection_info()tb2022-12-181-7/+9
| | | | Avoids repeated use of ternary operator on globals.
* nc: factor printing of connection info into a functiontb2022-12-181-25/+28
| | | | | | | This simply moves a chunk of code in this spaghetti mess into its own function with minimal changes. idea from a diff by mpf
* 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-1146-376/+231
| | | | | | | | 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@
* fix an obvious thinko without serious consequences in the display of eespie2022-10-041-2/+2
| | | | | | for rsa and friends. okay tb@
* remove an extraneous empty linetb2022-09-141-2/+1
|
* Adjust for opaque structs in ts.htb2022-09-111-14/+24
| | | | ok jsing
* Adjust for opaque structs in pkcs12.htb2022-09-111-25/+38
| | | | ok jsing
* Replace archaic \*(Lt and \*(Gt by plain < and >, respectively,schwarze2022-09-111-7/+7
| | | | | because these inspire devotion to cargo cult in developers. Cleanup suggested by kn@.
* Avoid division by zero if no connection was made.tb2022-08-311-4/+2
| | | | CID 184043
* Check return values in ssl_print_tmp_key()tb2022-08-311-4/+9
| | | | | | | | | | Use EVP_PKEY_get0_EC_KEY() instead of the get1 version to avoid an EVP_PKEY_free(). Check return values: if either EVP_PKEY_get0_EC_KEY() or EC_KEY_get0_group() fail, a NULL dereference occurs. CID 43289 ok jsing
* Check HMAC() return value to avoid a later use of uninitializedtb2022-08-301-3/+7
| | | | CID 25421
* Add workarounds for some symbols that are hidden under !LIBRESSL_INTERNALtb2022-08-031-1/+7
| | | | until the next bump exposes new symbols that we can use.
* fix indenttb2022-07-191-2/+2
|
* Document -tls1_{1,2,3} in openssl cipherstb2022-07-191-2/+11
| | | | ok jsing
* Allow displaying ciphers according to protocol versiontb2022-07-191-4/+39
| | | | | | | | | Instead of only using the default client method, allow selecting a specific protocol version and display the supported ciphers accordingly. This removes the noop status of -tls1 and adds -tls1_{1,2,3} as in other commands. ok jsing
* Suppress output of the deprecated -tls1 option in usage() and helptb2022-07-141-3/+2
| | | | | | output. The option wasn't documented in the manpage. pointed out by jsing
* Switch to using TLS_client_method()tb2022-07-141-2/+2
| | | | | | | | | Apparently, TLSv1_client_method() is used for historical reasons. This behavior is no longer helpful if we want to know what ciphers a TLS connection could use. This could change again after further investigation of what the behavior should be... ok beck jsing
* Document openssl ciphers -stb2022-07-141-3/+5
| | | | ok beck jsing
* Add -s option to openssl cipherstb2022-07-141-4/+20
| | | | | | | With this option, the command only shows the ciphers supported by the SSL method. ok beck jsing
* do not refuse valid IPv6 addresses in -X connect (HTTP CONNECT proxy)djm2022-06-081-2/+2
| | | | support. Identified by Wilmer van der Gaast, ok millert@
* KNF, mostly whitespace - no binary change on amd64tb2022-06-081-22/+19
|
* Fix comparison in openssl(1) pkcs12inoguchi2022-04-281-3/+3
| | | | comment from tb@
* Compare pointer value with NULL in openssl(1) pkcs12inoguchi2022-04-281-31/+31
| | | | ok tb@
* man pages: add missing commas between subordinate and main clausesnaddy2022-03-311-22/+22
| | | | | | | jmc@ dislikes a comma before "then" in a conditional, so leave those untouched. ok jmc@
* Change internal functions to static in openssl(1) pkcs12inoguchi2022-03-281-24/+30
| | | | ok tb@
* Remove unused function cert_load in openssl(1) pkcs12inoguchi2022-03-281-19/+1
| | | | ok tb@
* Check EVP_Digest* functions return value in openssl(1) tsinoguchi2022-03-271-5/+16
| | | | | | | Move up md_ctx and add EVP_MD_CTX_free under the 'err:' label. CID 149810 comment and ok jsing@
* Check function return valueinoguchi2022-03-241-2/+3
|
* Compare pointer value with NULLinoguchi2022-03-241-63/+63
|
* Wrap long linesinoguchi2022-03-241-39/+44
|
* Remove space between asterisk and variable nameinoguchi2022-03-241-22/+22
|
* Convert openssl(1) ts option handlinginoguchi2022-03-241-153/+285
| | | | | | | | Apply new option handling to openssl(1) ts, and there is no functional changes here. usage strings are comes from manual page. comments and ok jsing@
* openssl cms: avoid NULL derefs on option parsingtb2022-03-231-1/+3
| | | | | | | Two missing initializations in the new option handling cause a segfault when -nodetach or -noindef is passed to openssl cms. ok inoguchi jsing miod
* prefer https links in man pagesjsg2022-02-181-3/+3
| | | | ok gnezdo@ miod@ jmc@