Commit Graph

30 Commits

Author SHA1 Message Date
djm@openbsd.org
9d8c80f8a3 upstream: revert previous; it was broken (spotted by Theo)
OpenBSD-Commit-ID: 457c79afaca2f89ec2606405c1059b98b30d8b0d
2022-05-25 16:06:03 +10:00
djm@openbsd.org
9e0d02ef7c upstream: make SSHBUF_DBG/SSHBUF_TELL (off by default and only enabled
via #define) dump to stderr rather than stdout

OpenBSD-Commit-ID: 10298513ee32db8390aecb0397d782d68cb14318
2022-05-25 10:33:16 +10:00
djm@openbsd.org
754e0d5c77 upstream: Add a sshbuf_read() that attempts to read(2) directly in
to a sshbuf; ok markus@

OpenBSD-Commit-ID: 2d8f249040a4279f3bc23c018947384de8d4a45b
2022-01-25 10:45:47 +11:00
jsg@openbsd.org
c45a752f0d upstream: spelling
OpenBSD-Commit-ID: c63e43087a64d0727af13409c708938e05147b62
2022-01-04 18:22:46 +11:00
djm@openbsd.org
12848191f8 upstream: support for RFC4648 base64url encoding; ok markus
OpenBSD-Commit-ID: 0ef22c55e772dda05c112c88412c0797fec66eb4
2020-06-22 16:11:14 +10:00
djm@openbsd.org
69796297c8 upstream: make sshbuf_dump() args const
OpenBSD-Commit-ID: b4a5accae750875d665b862504169769bcf663bd
2020-06-05 13:28:29 +10:00
dtucker@openbsd.org
c9d10dbc0c upstream: Fix comment typo. Patch from mforney at mforney.org.
OpenBSD-Commit-ID: 3565f056003707a5e678e60e03f7a3efd0464a2b
2020-05-01 13:13:28 +10:00
djm@openbsd.org
d081f017c2 upstream: spelling errors in comments; no code change from
OpenBSD-Commit-ID: 166ea64f6d84f7bac5636dbd38968592cb5eb924
2020-03-14 19:39:09 +11:00
djm@openbsd.org
99aa803555 upstream: factor out reading/writing sshbufs to dedicated
functions; feedback and ok markus@

OpenBSD-Commit-ID: dc09e5f1950b7acc91b8fdf8015347782d2ecd3d
2020-01-26 10:18:42 +11:00
djm@openbsd.org
670104b923 upstream: fixes for !WITH_OPENSSL compilation; ok dtucker@
OpenBSD-Commit-ID: 7fd68eaa9e0f7482b5d4c7e8d740aed4770a839f
2019-09-06 17:54:21 +10:00
djm@openbsd.org
49fa065a1b upstream: let sshbuf_find/cmp take a void* for the
search/comparison argument, instead of a u_char*. Saves callers needing to
cast.

OpenBSD-Commit-ID: d63b69b7c5dd570963e682f758f5a47b825605ed
2019-07-30 15:06:27 +10:00
djm@openbsd.org
16dd8b2c78 upstream: remove mostly vestigal uuencode.[ch]; moving the only unique
functionality there (wrapping of base64-encoded data) to sshbuf functions;
feedback and ok markus@

OpenBSD-Commit-ID: 4dba6735d88c57232f6fccec8a08bdcfea44ac4c
2019-07-16 23:23:05 +10:00
djm@openbsd.org
e18a27eedc upstream: two more bounds-checking sshbuf counterparts to common
string operations: sshbuf_cmp() (bcmp-like) and sshbuf_find() (memmem like)

feedback and ok markus@

OpenBSD-Commit-ID: fd071ec2485c7198074a168ff363a0d6052a706a
2019-07-15 23:21:18 +10:00
djm@openbsd.org
101d164723 upstream: add some functions to perform random-access read/write
operations inside buffers with bounds checking. Intended to replace manual
pointer arithmetic wherever possible.

feedback and ok markus@

OpenBSD-Commit-ID: 91771fde7732738f1ffed078aa5d3bee6d198409
2019-07-15 09:39:34 +10:00
djm@openbsd.org
7be8572b32 upstream: Make sshpkt_get_bignum2() allocate the bignum it is
parsing rather than make the caller do it. Saves a lot of boilerplate code.

from markus@ ok djm@

OpenBSD-Commit-ID: 576bf784f9a240f5a1401f7005364e59aed3bce9
2019-01-21 21:47:28 +11:00
djm@openbsd.org
803178bd5d upstream: remove obsolete (SSH v.1) sshbuf_get/put_bignum1
functions

from markus@ ok djm@

OpenBSD-Commit-ID: 0380b1b2d9de063de3c5a097481a622e6a04943e
2019-01-21 21:46:57 +11:00
markus@openbsd.org
cb30cd4704 upstream: remove legacy buffer API emulation layer; ok djm@
OpenBSD-Commit-ID: 2dd5dc17cbc23195be4299fa93be2707a0e08ad9
2018-07-10 16:44:17 +10:00
djm@openbsd.org
001aa55484 upstream: lots of typos in comments/docs. Patch from Karsten Weiss
after checking with codespell tool
(https://github.com/lucasdemarchi/codespell)

OpenBSD-Commit-ID: 373222f12d7ab606598a2d36840c60be93568528
2018-04-10 10:17:15 +10:00
djm@openbsd.org
dbee4119b5 upstream commit
refactor channels.c

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@

Upstream-ID: 11828f161656b965cc306576422613614bea2d8f
2017-09-12 17:37:02 +10:00
djm@openbsd.org
a9c7460887 upstream commit
split allocation out of sshbuf_reserve() into a separate
sshbuf_allocate() function; ok markus@

Upstream-ID: 11b8a2795afeeb1418d508a2c8095b3355577ec2
2016-11-29 16:48:02 +11:00
djm@openbsd.org
1a31d02b24 upstream commit
fix signed/unsigned errors reported by clang-3.7; add
 sshbuf_dup_string() to replace a common idiom of strdup(sshbuf_ptr()) with
 better safety checking; feedback and ok markus@

Upstream-ID: 71f926d9bb3f1efed51319a6daf37e93d57c8820
2016-05-02 20:35:04 +10:00
mmcc@openbsd.org
8e56dd46cb upstream commit
Fix a couple "the the" typos. ok dtucker@

Upstream-ID: ec364c5af32031f013001fd28d1bd3dfacfe9a72
2015-12-11 13:23:13 +11:00
djm@openbsd.org
a7994b3f5a upstream commit
improve PEEK/POKE macros: better casts, don't multiply
 evaluate arguments; ok deraadt@

Upstream-ID: 9a1889e19647615ededbbabab89064843ba92d3e
2015-11-16 11:31:35 +11:00
Damien Miller
b03ebe2c22 more --without-openssl
fix some regressions caused by upstream merges

enable KRLs now that they no longer require BIGNUMs
2015-01-15 03:08:58 +11:00
djm@openbsd.org
a165bab605 upstream commit
avoid BIGNUM in KRL code by using a simple bitmap;
 feedback and ok markus
2015-01-15 02:22:18 +11:00
Damien Miller
8813790263 - (djm) [sshbuf.h] Fix compilation on systems without OPENSSL_HAS_ECC. 2014-08-19 11:28:11 +10:00
Damien Miller
8668706d0f - djm@cvs.openbsd.org 2014/06/24 01:13:21
[Makefile.in auth-bsdauth.c auth-chall.c auth-options.c auth-rsa.c
     [auth2-none.c auth2-pubkey.c authfile.c authfile.h cipher-3des1.c
     [cipher-chachapoly.c cipher-chachapoly.h cipher.c cipher.h
     [digest-libc.c digest-openssl.c digest.h dns.c entropy.c hmac.h
     [hostfile.c key.c key.h krl.c monitor.c packet.c rsa.c rsa.h
     [ssh-add.c ssh-agent.c ssh-dss.c ssh-ecdsa.c ssh-ed25519.c
     [ssh-keygen.c ssh-pkcs11-client.c ssh-pkcs11-helper.c ssh-pkcs11.c
     [ssh-rsa.c sshbuf-misc.c sshbuf.h sshconnect.c sshconnect1.c
     [sshconnect2.c sshd.c sshkey.c sshkey.h
     [openbsd-compat/openssl-compat.c openbsd-compat/openssl-compat.h]
     New key API: refactor key-related functions to be more library-like,
     existing API is offered as a set of wrappers.

     with and ok markus@

     Thanks also to Ben Hawkes, David Tomaschik, Ivan Fratric, Matthew
     Dempsky and Ron Bowes for a detailed review a few months ago.

     NB. This commit also removes portable OpenSSH support for OpenSSL
     <0.9.8e.
2014-07-02 15:28:02 +10:00
Darren Tucker
b9609fd86c - (dtucker) [sshbuf.h] Only declare ECC functions if building without
OpenSSL or if OpenSSL has ECC.
2014-06-11 08:04:02 +10:00
Darren Tucker
a54a040f66 - dtucker@cvs.openbsd.org 2014/06/10 21:46:11
[sshbuf.h]
     Group ECC functions together to make things a little easier in -portable.
     "doesn't bother me" deraadt@
2014-06-11 07:58:35 +10:00
Damien Miller
05e82c3b96 - djm@cvs.openbsd.org 2014/04/30 05:29:56
[bufaux.c bufbn.c bufec.c buffer.c buffer.h sshbuf-getput-basic.c]
     [sshbuf-getput-crypto.c sshbuf-misc.c sshbuf.c sshbuf.h ssherr.c]
     [ssherr.h]
     New buffer API; the first installment of the conversion/replacement
     of OpenSSH's internals to make them usable as a standalone library.

     This includes a set of wrappers to make it compatible with the
     existing buffer API so replacement can occur incrementally.

     With and ok markus@

     Thanks also to Ben Hawkes, David Tomaschik, Ivan Fratric, Matthew
     Dempsky and Ron Bowes for a detailed review.
2014-05-15 14:33:43 +10:00