summaryrefslogtreecommitdiffstats
path: root/usr.bin/ssh/auth2-hostbased.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* make ssh->kex->session_id a sshbuf instead of u_char*/size_t anddjm2021-01-271-4/+3
| | | | | use that instead of global variables containing copies of it. feedback/ok markus@
* Rename HostbasedKeyTypes (ssh) and HostbasedAcceptedKeyTypes (sshd) todtucker2021-01-261-3/+3
| | | | | | HostbasedAcceptedAlgorithms, which more accurately reflects its effect. This matches a previous change to PubkeyAcceptedAlgorithms. The previous names are retained as aliases. ok djm@
* move check_host_cert() from sshconnect,c to sshkey.c and refactordjm2021-01-261-2/+2
| | | | | | it to make it more generally usable and testable. ok markus@
* use the new variant log macros instead of prepending __func__ anddjm2020-10-181-26/+25
| | | | appending ssh_err(r) manually; ok markus@
* Add new structure for signature optionsdjm2019-11-251-2/+2
| | | | | | | | | 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@
* lots of things were relying on libcrypto headers to transitivelydjm2019-09-061-1/+2
| | | | | include various system headers (mostly stdlib.h); include them explicitly
* remove last references to active_statedjm2019-01-191-7/+5
| | | | with & ok markus@
* begin landing remaining refactoring of packet parsing API, starteddjm2019-01-191-1/+3
| | | | | | | | | | | 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@
* Add sshd_config CASignatureAlgorithms option to allow control overdjm2018-09-201-1/+8
| | | | | | | | which signature algorithms a CA may use when signing certificates. In particular, this allows a sshd to ban certificates signed with RSA/SHA1. ok markus@
* fix build with DEBUG_PK enabledmestre2018-08-281-2/+2
| | | | OK dtucker@
* delay bailout for invalid authenticating user until after the packetdjm2018-07-311-5/+6
| | | | | containing the request has been fully parsed. Reported by Dariusz Tytko and MichaƂ Sajdak; ok deraadt
* sshd: switch authentication to sshbuf API; ok djm@markus2018-07-091-2/+2
|
* Improve strictness and control over RSA-SHA2 signature types:djm2018-07-031-3/+2
| | | | | | | | | | | | | | | | | | | | | In ssh, when an agent fails to return a RSA-SHA2 signature when requested and falls back to RSA-SHA1 instead, retry the signature to ensure that the public key algorithm sent in the SSH_MSG_USERAUTH matches the one in the signature itself. In sshd, strictly enforce that the public key algorithm sent in the SSH_MSG_USERAUTH message matches what appears in the signature. Make the sshd_config PubkeyAcceptedKeyTypes and HostbasedAcceptedKeyTypes options control accepted signature algorithms (previously they selected supported key types). This allows these options to ban RSA-SHA1 in favour of RSA-SHA2. Add new signature algorithms "rsa-sha2-256-cert-v01@openssh.com" and "rsa-sha2-512-cert-v01@openssh.com" to force use of RSA-SHA2 signatures with certificate keys. feedback and ok markus@
* Drop compatibility hacks for some ancient SSH implementations, includingdjm2018-01-231-5/+3
| | | | | | | | | | ssh.com <=2.* and OpenSSH <= 3.*. These versions were all released in or before 2001 and predate the final SSH RFCs. The hacks in question aren't necessary for RFC- compliant SSH implementations. ok markus@
* pass negotiated signing algorithm though to sshkey_verify() anddjm2017-12-181-2/+2
| | | | | check that the negotiated algorithm matches the type in the signature (only matters for RSA SHA1/SHA2 sigs). ok markus@
* refactor authentication loggingdjm2017-06-241-4/+4
| | | | | | | optionally record successful auth methods and public credentials used in a file accessible to user sessions feedback and ok markus@
* switch auth2 to ssh_dispatch API; ok djm@markus2017-05-301-3/+3
|
* switch auth2-hostbased.c to modern APIs; ok djm@markus2017-05-301-49/+54
|
* switch auth2-pubkey.c to modern APIs; with & ok djm@markus2017-05-301-3/+3
|
* switch from Key typedef with struct sshkey; ok djm@markus2017-05-301-3/+3
|
* refactor canohost.c: move functions that cache results closer to thedjm2016-03-071-3/+4
| | | | | | | places that use them (authn and session code). After this, no state is cached in canohost.c feedback and ok markus@
* Remove pattern length argument from match_pattern_list(),djm2015-05-041-3/+2
| | | | | | | | | | we only ever use it for strlen(pattern). Prompted by hanno AT hboeck.de pointing an out-of-bound read error caused by an incorrect pattern length found using AFL and his own tools. ok markus@
* update to new API (key_fingerprint => sshkey_fingerprint)djm2015-01-281-5/+7
| | | | | check sshkey_fingerprint return values; ok markus
* remove obsolete commentdjm2015-01-281-2/+1
|
* add sshd_config HostbasedAcceptedKeyTypes and PubkeyAcceptedKeyTypesdjm2015-01-131-1/+10
| | | | | options to allow sshd to control what public key types will be accepted. Currently defaults to all. Feedback & ok markus@
* deprecate key_load_private_pem() and sshkey_load_private_pem()djm2015-01-081-1/+2
| | | | | | | | | | | | | | | interfaces. Refactor the generic key loading API to not require pathnames to be specified (they weren't really used). Fixes a few other things en passant: Makes ed25519 keys work for hostbased authentication (ssh-keysign previously used the PEM-only routines). Fixes key comment regression bz#2306: key pathnames were being lost as comment fields. ok markus@
* KNF and add a little more debug()djm2014-12-231-5/+13
|
* Add FingerprintHash option to control algorithm used for keydjm2014-12-211-3/+4
| | | | | | | fingerprints. Default changes from MD5 to SHA256 and format from hex to base64. Feedback and ok naddy@ markus@
* Add support for Unix domain socket forwarding. A remote TCP portmillert2014-07-151-1/+2
| | | | | | | | may be forwarded to a local Unix domain socket and vice versa or both ends may be a Unix domain socket. This is a reimplementation of the streamlocal patches by William Ahern from: http://www.25thandclement.com/~william/projects/streamlocal.html OK djm@ markus@
* refuse RSA keys from old proprietary clients/servers that use thedjm2013-12-301-1/+7
| | | | | | obsolete RSA+MD5 signature scheme. it will still be possible to connect with these clients/servers but only DSA keys will be accepted, and we'll deprecate them entirely in a future release. ok markus@
* for hostbased authentication, print the client host and user ondjm2013-06-211-1/+5
| | | | the auth success/failure line; bz#2064, ok dtucker@
* bye, bye xfree(); ok markus@djm2013-05-171-7/+7
|
* enable certificates for hostbased authentication, from Iain Morgan;djm2010-08-041-3/+28
| | | | "looks ok" markus@
* Add a TrustedUserCAKeys option to sshd_config to specify CA keys thatdjm2010-03-041-1/+4
| | | | | | | | | | | are trusted to authenticate users (in addition than doing it per-user in authorized_keys). Add a RevokedKeys option to sshd_config and a @revoked marker to known_hosts to allow keys to me revoked and banned for user or host authentication. feedback and ok markus@
* strip trailing '.' from hostname when HostbasedUsesNameFromPacketOnly=yesdjm2008-07-171-5/+6
| | | | report and patch from res AT qoxp.net (bz#1200); ok markus@
* almost entirely get rid of the culture of ".h files that include .h files"deraadt2006-08-031-5/+8
| | | | | ok djm, sort of ok stevesk makes the pain stop in one easy step
* move #include <string.h> out of includes.hstevesk2006-07-221-1/+2
|
* move #include <pwd.h> out of includes.h; ok markus@stevesk2006-07-061-1/+5
|
* Put $OpenBSD$ tags back (as comments) to replace the RCSID()s thatdjm2006-03-251-0/+1
| | | | Theo nuked - our scripts to sync -portable need them in the files
* RCSID() can diederaadt2006-03-191-1/+0
|
* fix mem leaks; some fixes from Pete Flugstad; tested dtucker@markus2004-01-191-2/+2
|
* int -> u_int; ok djm@, deraadt@, mouring@markus2003-06-241-2/+2
|
* deprecate VerifyReverseMapping since it's dangerous if combinedmarkus2003-06-021-2/+2
| | | | | | | with IP based access control as noted by Mike Harding; replace with a UseDNS option, UseDNS is on by default and includes the VerifyReverseMapping check; with itojun@, provos@, jakob@ and deraadt@ ok deraadt@, djm@
* rename log() into logit() to avoid name conflict. markus ok, from netbsditojun2003-04-081-3/+3
|
* move Authmethod definitons to per-method file.markus2002-05-311-2/+8
|
* split auth2.c into one file per method; ok provos@/deraadt@markus2002-05-251-0/+176