Commit Graph

9721 Commits

Author SHA1 Message Date
dtucker@openbsd.org 483b3b6385 upstream: Save connection timeout and restore for 2nd and
subsequent attempts, preventing them from having no timeout.  bz#2918, ok
djm@

OpenBSD-Commit-ID: 4977f1d0521d9b6bba0c9a20d3d226cefac48292
2019-02-01 18:55:11 +11:00
markus@openbsd.org 5f004620fd upstream: Add authors for public domain sntrup4591761 code;
confirmed by Daniel J. Bernstein

OpenBSD-Commit-ID: b4621f22b8b8ef13e063c852af5e54dbbfa413c1
2019-02-01 18:55:11 +11:00
jmc@openbsd.org 2c21b75a7b upstream: add -T to usage();
OpenBSD-Commit-ID: a7ae14d9436c64e1bd05022329187ea3a0ce1899
2019-02-01 18:55:11 +11:00
dtucker@openbsd.org 19a0f0529d upstream: The test sshd_config in in $OBJ.
OpenBSD-Regress-ID: 1e5d908a286d8e7de3a15a0020c8857f3a7c9172
2019-01-28 19:01:01 +11:00
dtucker@openbsd.org 8fe2544020 upstream: Remove leftover debugging.
OpenBSD-Regress-ID: 3d86c3d4867e46b35af3fd2ac8c96df0ffdcfeb9
2019-01-28 14:41:11 +11:00
dtucker@openbsd.org e30d32364d upstream: Enable ssh-dss for the agent test. Disable it for the
certificate test.

OpenBSD-Regress-ID: 388c1e03e1def539d350f139b37d69f12334668d
2019-01-28 11:34:22 +11:00
dtucker@openbsd.org ffdde469ed upstream: Count the number of key types instead of assuming there
are only two.

OpenBSD-Regress-ID: 0998702c41235782cf0beee396ec49b5056eaed9
2019-01-28 11:34:22 +11:00
Corinna Vinschen 1d05b4adcb Cygwin: only tweak sshd_config file if it's new, drop creating sshd user
The sshd_config tweaks were executed even if the old file was
still in place.  Fix that.  Also disable sshd user creation.
It's not used on Cygwin.
2019-01-28 09:57:58 +11:00
Corinna Vinschen 89843de0c4 Cygwin: Change service name to cygsshd
Microsoft hijacked the sshd service name without asking.
2019-01-28 09:57:58 +11:00
dtucker@openbsd.org 2a9b3a2ce4 upstream: Generate all key supported key types and enable for keyscan
test.

OpenBSD-Regress-ID: 72f72ff49946c61bc949e1692dd9e3d71370891b
2019-01-27 17:40:42 +11:00
djm@openbsd.org 391ffc4b9d upstream: check in scp client that filenames sent during
remote->local directory copies satisfy the wildcard specified by the user.

This checking provides some protection against a malicious server
sending unexpected filenames, but it comes at a risk of rejecting wanted
files due to differences between client and server wildcard expansion rules.

For this reason, this also adds a new -T flag to disable the check.

reported by Harry Sintonen
fix approach suggested by markus@;
has been in snaps for ~1wk courtesy deraadt@

OpenBSD-Commit-ID: 00f44b50d2be8e321973f3c6d014260f8f7a8eda
2019-01-27 09:42:39 +11:00
djm@openbsd.org c2c18a3968 upstream: make ssh-keyscan return a non-zero exit status if it
finds no keys. bz#2903

OpenBSD-Commit-ID: 89f1081fb81d950ebb48e6e73d21807b2723d488
2019-01-27 09:42:19 +11:00
dtucker@openbsd.org 05b9a46670 upstream: Accept the host key fingerprint as a synonym for "yes"
when accepting an unknown host key.  This allows you to paste a fingerprint
obtained out of band into the yes/no prompt and have the client do the
comparison for you.  ok markus@ djm@

OpenBSD-Commit-ID: 3c47d10b9f43d3d345e044fd9ec09709583a2767
2019-01-25 06:32:14 +11:00
dtucker@openbsd.org bdc6c63c80 upstream: Have progressmeter force an update at the beginning and
end of each transfer.  Fixes the problem recently introduces where very quick
transfers do not display the progressmeter at all.  Spotted by naddy@

OpenBSD-Commit-ID: 68dc46c259e8fdd4f5db3ec2a130f8e4590a7a9a
2019-01-25 06:32:14 +11:00
dtucker@openbsd.org 258e6ca003 upstream: Check for both EAGAIN and EWOULDBLOCK. This is a no-op
in OpenBSD (they are the same value) but makes things easier in -portable
where they may be distinct values.  "sigh ok" deraadt@

(ID sync only, portable already had this change).

OpenBSD-Commit-ID: 91f2bc7c0ecec905915ed59fa37feb9cc90e17d7
2019-01-24 14:40:03 +11:00
dtucker@openbsd.org 281ce04257 upstream: Always initialize 2nd arg to hpdelim2. It populates that
*ONLY IF* there's a delimiter.  If there's not (the common case) it checked
uninitialized memory, which usually passed, but if not would cause spurious
failures when the uninitialized memory happens to contain "/".  ok deraadt.

OpenBSD-Commit-ID: 4291611eaf2a53d4c92f4a57c7f267c9f944e0d3
2019-01-24 14:36:44 +11:00
dtucker@openbsd.org d05ea25567 upstream: Remove support for obsolete host/port syntax.
host/port was added in 2001 as an alternative to host:port syntax for
the benefit of IPv6 users.  These days there are establised standards
for this like [::1]:22 and the slash syntax is easily mistaken for CIDR
notation, which OpenSSH now supports for some things.  Remove the slash
notation from ListenAddress and PermitOpen.  bz#2335, patch from jjelen
at redhat.com, ok markus@

OpenBSD-Commit-ID: fae5f4e23c51a368d6b2d98376069ac2b10ad4b7
2019-01-24 12:30:30 +11:00
dtucker@openbsd.org 177d6c80c5 upstream: Remove duplicate word. bz#2958, patch from jjelen at
redhat.com

OpenBSD-Commit-ID: cca3965a8333f2b6aae48b79ec1d72f7a830dd2c
2019-01-24 12:30:30 +11:00
dtucker@openbsd.org be3e6cba95 upstream: Remove 3 as a guess for possible generator during moduli
generation. It's not mentioned in RFC4419 and it's not possible for
Sophie-Germain primes greater than 5.  bz#2330, from Christian Wittenhorst ,
ok djm@ tb@

OpenBSD-Commit-ID: 1467652e6802ad3333b0959282d8d49dfe22c8cd
2019-01-24 12:30:30 +11:00
dtucker@openbsd.org 8976f1c4b2 upstream: Sanitize scp filenames via snmprintf. To do this we move
the progressmeter formatting outside of signal handler context and have the
atomicio callback called for EINTR too.  bz#2434 with contributions from djm
and jjelen at redhat.com, ok djm@

OpenBSD-Commit-ID: 1af61c1f70e4f3bd8ab140b9f1fa699481db57d8
2019-01-24 12:30:30 +11:00
Darren Tucker 6249451f38 For broken read/readv comparisons, poll(RW).
In the cases where we can't compare to read or readv function pointers
for some reason we currently ifdef out the poll() used to block while
waiting for reads or writes, falling back to busy waiting.  This restores
the poll() in this case, but has it always check for read or write,
removing an inline ifdef in the process.
2019-01-24 10:07:03 +11:00
Darren Tucker 5cb503dff4 Include unistd.h for strmode(). 2019-01-24 10:07:03 +11:00
Darren Tucker f236ca2741 Also undef SIMPLEQ_FOREACH_SAFE.
Prevents macro redefinition warning on at least NetBSD 6.1.
2019-01-24 10:07:03 +11:00
djm@openbsd.org be063945e4 upstream: allow auto-incrementing certificate serial number for certs
signed in a single commandline.

OpenBSD-Commit-ID: 39881087641efb8cd83c7ec13b9c98280633f45b
2019-01-23 19:03:05 +11:00
djm@openbsd.org 851f803289 upstream: move a bunch of global flag variables to main(); make the
rest static

OpenBSD-Commit-ID: fa431d92584e81fe99f95882f4c56b43fe3242dc
2019-01-23 15:33:04 +11:00
Damien Miller 2265402dc7 depend 2019-01-23 13:03:16 +11:00
djm@openbsd.org 2c223878e5 upstream: switch mainloop from select(2) to poll(2); ok deraadt@
OpenBSD-Commit-ID: 37645419a330037d297f6f0adc3b3663e7ae7b2e
2019-01-23 13:02:50 +11:00
djm@openbsd.org bb956eaa94 upstream: pass most arguments to the KEX hash functions as sshbuf
rather than pointer+length; ok markus@

OpenBSD-Commit-ID: ef0c89c52ccc89817a13a5205725148a28492bf7
2019-01-23 13:02:02 +11:00
djm@openbsd.org d691588b8e upstream: backoff reading messages from active connections when the
input buffer is too full to read one, or if the output buffer is too full to
enqueue a response; feedback & ok dtucker@

OpenBSD-Commit-ID: df3c5b6d57c968975875de40d8955cbfed05a6c8
2019-01-23 10:44:34 +11:00
djm@openbsd.org f99ef8de96 upstream: add -m to usage(); reminded by jmc@
OpenBSD-Commit-ID: bca476a5236e8f94210290b3e6a507af0434613e
2019-01-23 10:44:34 +11:00
djm@openbsd.org 41923ce06a upstream: Correct some bugs in PKCS#11 token PIN handling at
initial login, the attempt at reading the PIN could be skipped in some cases
especially on devices with integrated PIN readers.

based on patch from Daniel Kucera in bz#2652; ok markus@

OpenBSD-Commit-ID: fad70a61c60610afe8bb0db538c90e343e75e58e
2019-01-22 23:04:54 +11:00
djm@openbsd.org 2162171ad5 upstream: Support keys that set the CKA_ALWAYS_AUTHENTICATE by
requring a fresh login after the C_SignInit operation.

based on patch from Jakub Jelen in bz#2638; ok markus

OpenBSD-Commit-ID: a76e66996ba7c0923b46b74d46d499b811786661
2019-01-22 23:04:54 +11:00
djm@openbsd.org 7a2cb18a21 upstream: Mention that configuration for the destination host is
not applied to any ProxyJump/-J hosts. This has confused a few people...

OpenBSD-Commit-ID: 03f4f641df6ca236c1bfc69836a256b873db868b
2019-01-22 23:04:54 +11:00
djm@openbsd.org ecd2f33cb7 upstream: Include -m in the synopsis for a few more commands that
support it

Be more explicit in the description of -m about where it may be used

Prompted by Jakub Jelen in bz2904

OpenBSD-Commit-ID: 3b398ac5e05d8a6356710d0ff114536c9d71046c
2019-01-22 22:42:02 +11:00
djm@openbsd.org ff5d2cf4ca upstream: print the full pubkey being attempted at loglevel >=
debug2; bz2939

OpenBSD-Commit-ID: ac0fe5ca1429ebf4d460bad602adc96de0d7e290
2019-01-22 22:42:01 +11:00
djm@openbsd.org 180b520e2b upstream: clarify: ssh-keygen -e only writes public keys, never
private

OpenBSD-Commit-ID: 7de7ff6d274d82febf9feb641e2415ffd6a30bfb
2019-01-22 22:42:01 +11:00
djm@openbsd.org c45616a199 upstream: mention the new vs. old key formats in the introduction
and give some hints on how keys may be converted or written in the old
format.

OpenBSD-Commit-ID: 9c90a9f92eddc249e07fad1204d0e15c8aa13823
2019-01-22 22:42:01 +11:00
jmc@openbsd.org fd8eb1383a upstream: tweak previous;
OpenBSD-Commit-ID: d2a80e389da8e7ed71978643d8cbaa8605b597a8
2019-01-22 22:42:01 +11:00
tb@openbsd.org 68e924d547 upstream: Forgot to add -J to the synopsis.
OpenBSD-Commit-ID: 26d95e409a0b72526526fc56ca1caca5cc3d3c5e
2019-01-22 22:42:01 +11:00
tb@openbsd.org 622dedf1a8 upstream: Add a -J option as a shortcut for -o Proxyjump= to scp(1)
and sftp(1) to match ssh(1)'s interface.

ok djm

OpenBSD-Commit-ID: a75bc2d5f329caa7229a7e9fe346c4f41c2663fc
2019-01-22 22:42:01 +11:00
Darren Tucker c882d74652 Allow building against OpenSSL dev (3.x) version. 2019-01-22 20:38:40 +11:00
Damien Miller d552039357 typo 2019-01-22 10:50:40 +11:00
Damien Miller 2de9cec542 add missing header 2019-01-22 10:49:52 +11:00
djm@openbsd.org 533cfb01e4 upstream: switch sntrup implementation source from supercop to
libpqcrypto; the latter is almost identical but doesn't rely on signed
underflow to implement an optimised integer sort; from markus@

OpenBSD-Commit-ID: cd09bbf0e0fcef1bedca69fdf7990dc360567cf8
2019-01-22 09:20:14 +11:00
Damien Miller d50ab3cd6f new files need includes.h 2019-01-22 00:02:23 +11:00
djm@openbsd.org c7670b091a upstream: add "-v" flags to ssh-add and ssh-pkcs11-helper to turn up
debug verbosity.

Make ssh-agent turn on ssh-pkcs11-helper's verbosity when it is run
in debug mode ("ssh-agent -d"), so we get to see errors from the
PKCS#11 code.

ok markus@

OpenBSD-Commit-ID: 0a798643c6a92a508df6bd121253ba1c8bee659d
2019-01-21 23:56:52 +11:00
djm@openbsd.org 49d8c8e214 upstream: adapt to changes in KEX APIs and file removals
OpenBSD-Regress-ID: 54d6857e7c58999c7a6d40942ab0fed3529f43ca
2019-01-21 23:51:29 +11:00
djm@openbsd.org 35ecc53a83 upstream: adapt to changes in KEX API and file removals
OpenBSD-Regress-ID: 92cad022d3b0d11e08f3e0055d6a14b8f994c0d7
2019-01-21 23:41:21 +11:00
djm@openbsd.org 7d69aae64c upstream: adapt to bignum1 API removal and bignum2 API change
OpenBSD-Regress-ID: cea6ff270f3d560de86b355a87a2c95b55a5ca63
2019-01-21 23:38:30 +11:00
djm@openbsd.org beab553f0a upstream: remove hack to use non-system libcrypto
OpenBSD-Regress-ID: ce72487327eee4dfae1ab0212a1f33871fe0809f
2019-01-21 23:38:10 +11:00