summaryrefslogtreecommitdiffstats
path: root/usr.bin/ssh/monitor_wrap.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* clean up passing of struct passwd from monitor to preauth privsepdjm2020-11-271-8/+14
| | | | | | | process. No longer copy entire struct w/ pointer addresses, but pass remaining scalar fields explicitly, Prompted by Yuichiro NAITO, feedback Thorsten Glaser; ok dtucker@
* use the new variant log macros instead of prepending __func__ anddjm2020-10-181-116/+107
| | | | appending ssh_err(r) manually; ok markus@
* LogVerbose keyword for ssh and sshddjm2020-10-161-1/+4
| | | | | | | Allows forcing maximum debug logging by file/function/line pattern- lists. ok markus@
* revised log infrastructure for OpenSSHdjm2020-10-161-2/+6
| | | | | | | log functions receive function, filename and line number of caller. We can use this to selectively enable logging via pattern-lists. ok markus@
* support for user-verified FIDO keysdjm2020-08-271-2/+2
| | | | | | | | | | | | | | | FIDO2 supports a notion of "user verification" where the user is required to demonstrate their identity to the token before particular operations (e.g. signing). Typically this is done by authenticating themselves using a PIN that has been set on the token. This adds support for generating and using user verified keys where the verification happens via PIN (other options might be added in the future, but none are in common use now). Practically, this adds another key generation option "verify-required" that yields a key that requires a PIN before each authentication. feedback markus@ and Pedro Martelletto; ok markus@
* allow security keys to act as host keys as well as user keys.djm2019-12-151-3/+1
| | | | | | | | | Previously we didn't do this because we didn't want to expose the attack surface presented by USB and FIDO protocol handling, but now that this is insulated behind ssh-sk-helper there is less risk. ok markus@
* Add new structure for signature optionsdjm2019-11-251-4/+19
| | | | | | | | | This is populated during signature verification with additional fields that are present in and covered by the signature. At the moment, it is only used to record security key-specific options, especially the flags field. with and ok markus@
* additional missing stdarg.h includes when built without WITH_OPENSSL; ok djm@naddy2019-11-181-1/+2
|
* Refactor signing - use sshkey_sign for everything, including the newdjm2019-10-311-3/+5
| | | | | | | | | | | U2F signatures. Don't use sshsk_ecdsa_sign() directly, instead make it reachable via sshkey_sign() like all other signature operations. This means that we need to add a provider argument to sshkey_sign(), so most of this change is mechanically adding that. Suggested by / ok markus@
* When system calls indicate an error they return -1, not some arbitraryderaadt2019-06-281-2/+2
| | | | | | value < 0. errno is only updated in this case. Change all (most?) callers of syscalls to follow this better, and let's see if this strictness helps us in the future.
* Make sshpkt_get_bignum2() allocate the bignum it is parsing ratherdjm2019-01-211-7/+3
| | | | | | than make the caller do it. Saves a lot of boilerplate code. from markus@ ok djm@
* remove last references to active_statedjm2019-01-191-9/+6
| | | | with & ok markus@
* convert monitor.c to new packet APIdjm2019-01-191-2/+1
| | | | with & ok markus@
* convert auth.c to new packet APIdjm2019-01-191-3/+2
| | | | with & ok markus@
* begin landing remaining refactoring of packet parsing API, starteddjm2019-01-191-1/+4
| | | | | | | | | | | almost exactly six years ago. This change stops including the old packet_* API by default and makes each file that requires the old API include it explicitly. We will commit file-by-file refactoring to remove the old API in consistent steps. with & ok markus@
* remove unused zlib.hdjm2018-07-201-2/+1
|
* remove legacy key emulation layer; ok djm@markus2018-07-111-10/+7
|
* re-remove some pre-auth compression bitssf2018-07-101-3/+1
| | | | | | | | This time, make sure to not remove things that are necessary for pre-auth compression on the client. Add a comment that pre-auth compression is still supported in the client. ok markus@
* kerberos/gssapi fixes for buffer removaldjm2018-07-101-2/+2
|
* sshd: switch monitor to sshbuf API; lots of help & ok djm@markus2018-07-091-200/+281
|
* sshd: switch loginmsg to sshbuf API; ok djm@markus2018-07-091-4/+5
|
* Revert previous two commitssf2018-07-091-1/+3
| | | | | | | | | | | | | | | | | | | | It turns out we still support pre-auth compression on the client. Therefore revert the previous two commits: date: 2018/07/06 09:06:14; author: sf; commitid: yZVYKIRtUZWD9CmE; Rename COMP_DELAYED to COMP_ZLIB Only delayed compression is supported nowadays. ok markus@ date: 2018/07/06 09:05:01; author: sf; commitid: rEGuT5UgI9f6kddP; Remove leftovers from pre-authentication compression Support for this has been removed in 2016. COMP_DELAYED will be renamed in a later commit. ok markus@
* Remove leftovers from pre-authentication compressionsf2018-07-061-3/+1
| | | | | | | Support for this has been removed in 2016. COMP_DELAYED will be renamed in a later commit. ok markus@
* switch over to the new authorized_keys options API and remove thedjm2018-03-031-17/+27
| | | | | | | | | legacy one. Includes a fairly big refactor of auth2-pubkey.c to retain less state between key file lines. feedback and ok markus@
* uuencode.h is not usedmarkus2018-01-081-2/+1
|
* revert stricter key type / signature type checking in userauth path;djm2017-12-211-2/+2
| | | | | too much software generates inconsistent messages, so we need a better plan.
* pass negotiated signing algorithm though to sshkey_verify() anddjm2017-12-181-2/+3
| | | | | check that the negotiated algorithm matches the type in the signature (only matters for RSA SHA1/SHA2 sigs). ok markus@
* replace statically-sized arrays in ServerOptions with dynamic onesdjm2017-10-051-7/+3
| | | | | managed by xrecallocarray, removing some arbitrary (though large) limits and saving a bit of memory; "much nicer" markus@
* Fix PermitOpen crash; spotted by benno@, ok dtucker@ deraadt@djm2017-10-021-1/+7
|
* refactor channels.cdjm2017-09-121-1/+3
| | | | | | | | | | | | | | | | | | Move static state to a "struct ssh_channels" that is allocated at runtime and tracked as a member of struct ssh. Explicitly pass "struct ssh" to all channels functions. Replace use of the legacy packet APIs in channels.c. Rework sshd_config PermitOpen handling: previously the configuration parser would call directly into the channels layer. After the refactor this is not possible, as the channels structures are allocated at connection time and aren't available when the configuration is parsed. The server config parser now tracks PermitOpen itself and explicitly configures the channels code later. ok markus@
* switch auth2-pubkey.c to modern APIs; with & ok djm@markus2017-05-301-6/+8
|
* switch from Key typedef with struct sshkey; ok djm@markus2017-05-301-6/+8
|
* allow LogLevel in sshd_config Match blocks; ok dtucker bz#2717djm2017-05-171-1/+2
|
* remove ssh1 server code; ok djm@markus2016-08-131-151/+1
|
* refactor canohost.c: move functions that cache results closer to thedjm2016-03-071-6/+6
| | | | | | | places that use them (authn and session code). After this, no state is cached in canohost.c feedback and ok markus@
* remove roaming support; ok djm@markus2016-01-141-2/+1
|
* implement SHA2-{256,512} for RSASSA-PKCS1-v1_5 signatures (user and host auth)markus2015-12-041-2/+3
| | | | | based on draft-rsa-dsa-sha2-256-03.txt and draft-ssh-ext-info-04.txt; with & ok djm@
* prevent authorized_keys options picked up on public key tests withoutdjm2015-05-011-6/+9
| | | | | a corresponding private key authentication being applied to other authentication methods. Reported by halex@, ok markus@
* Revise hostkeys@openssh.com hostkey learning extension.djm2015-02-161-3/+4
| | | | | | | | | | The client will not ask the server to prove ownership of the private halves of any hitherto-unseen hostkeys it offers to the client. Allow UpdateHostKeys option to take an 'ask' argument to let the user manually review keys offered. ok markus@
* adapt kex to sshbuf and struct ssh; ok djm@markus2015-01-191-3/+3
|
* update packet.c & isolate, introduce struct sshmarkus2015-01-191-229/+13
| | | | | | | | a) switch packet.c to buffer api and isolate per-connection info into struct ssh b) (de)serialization of the state is moved from monitor to packet.c c) the old packet.c API is implemented in opacket.[ch] d) compress.c/h is removed and integrated into packet.c with and ok djm@
* adapt mac.c to ssherr.h return codes (de-fatal) and simplify dependenciesmarkus2015-01-131-2/+2
| | | | ok djm@
* make compiling against OpenSSL optional (make OPENSSL=no);markus2014-04-291-2/+11
| | | | | reduces algorithms to curve25519, aes-ctr, chacha, ed25519; allows us to explore further options; with and ok djm
* convert memset of potentially-private data to explicit_bzero()djm2014-02-021-3/+3
|
* remove experimental, never-enabled JPAKE code; ok markus@djm2014-01-291-164/+1
|
* fix rekeying for AES-GCM modes; ok deraadtmarkus2013-11-061-2/+2
|
* bye, bye xfree(); ok markus@djm2013-05-171-15/+15
|
* support AES-GCM as defined in RFC 5647 (but with simpler KEX handling)markus2013-01-081-19/+20
| | | | ok and feedback djm@
* pasto; ok djm@naddy2012-10-011-2/+2
|
* make the pre-auth privsep slave log via a socketpair shared with thedjm2011-06-171-1/+27
| | | | monitor rather than /var/empty/dev/log; ok dtucker@ deraadt@ markus@