Thanks to visit codestin.com
Credit goes to cvsweb.openbsd.org

OpenBSD CVS

CVS log for src/usr.bin/ssh/sshbuf-misc.c


[BACK] Up to [local] / src / usr.bin / ssh

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.22 / (download) - annotate - [select for diffs], Thu Sep 4 00:32:31 2025 UTC (9 days, 15 hours ago) by djm
Branch: MAIN
CVS Tags: HEAD
Changes since 1.21: +4 -1 lines
Diff to previous 1.21 (colored)

fix sshbuf_dtourlb64() to not choke on empty buffers; previously
it incorrectly returned an error in this situation; ok deraadt

Revision 1.21 / (download) - annotate - [select for diffs], Thu Jul 24 05:44:55 2025 UTC (7 weeks, 2 days ago) by djm
Branch: MAIN
Changes since 1.20: +15 -1 lines
Diff to previous 1.20 (colored)

Help OpenSSH's PKCS#11 support kick its meth habit.

The PKCS#11 code in OpenSSH used the libcrypto public key method API
(e.g. the delightfully named RSA_meth_free()) to delegate signing
operations to external keys. This had one advantage - that it was
basically transparent to callers, but also had a big disadvantage -
that we'd manually have to track the method implementations, their
state and their relationships to the underlying PKCS#11 objects.

This rips this out and replaces it with explicit delegation to
PKCS#11 code for externally hosted keys via the ssh-pkcs11-helper
subprocess. This is very similar to how we handle FIDO keys in
OpenSSH (i.e. via ssh-sk-helper). All we need to track now is a
much simpler mapping of public key -> helper subprocess.

Kicking our libcrypto meth dependency also makes it much easier
to support Ed25519 keys in PKCS#11, which will happen in a subsequent
commit.

feedback / ok tb@

Revision 1.20 / (download) - annotate - [select for diffs], Mon Jun 16 09:02:19 2025 UTC (2 months, 4 weeks ago) by dtucker
Branch: MAIN
Changes since 1.19: +2 -2 lines
Diff to previous 1.19 (colored)

Fix overflow check in sshbuf_dup_string.  It's already constrained by
SSHBUF_SIZE_MAX, but still worth fixing the check.  Patch from afonot
via github PR#573, with & ok djm@

Revision 1.19 / (download) - annotate - [select for diffs], Wed May 21 06:43:48 2025 UTC (3 months, 3 weeks ago) by djm
Branch: MAIN
Changes since 1.18: +38 -2 lines
Diff to previous 1.18 (colored)

function to make a sshbuf from a hex string; useful in tests

also constify some arguments

Revision 1.18 / (download) - annotate - [select for diffs], Sat Jan 22 00:43:43 2022 UTC (3 years, 7 months ago) by djm
Branch: MAIN
CVS Tags: OPENBSD_7_7_BASE, OPENBSD_7_7, OPENBSD_7_6_BASE, OPENBSD_7_6, OPENBSD_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4, OPENBSD_7_3_BASE, OPENBSD_7_3, OPENBSD_7_2_BASE, OPENBSD_7_2, OPENBSD_7_1_BASE, OPENBSD_7_1
Changes since 1.17: +38 -1 lines
Diff to previous 1.17 (colored)

Add a sshbuf_read() that attempts to read(2) directly in to a
sshbuf; ok markus@

Revision 1.17 / (download) - annotate - [select for diffs], Wed Aug 11 05:21:32 2021 UTC (4 years, 1 month ago) by djm
Branch: MAIN
CVS Tags: OPENBSD_7_0_BASE, OPENBSD_7_0
Changes since 1.16: +2 -2 lines
Diff to previous 1.16 (colored)

oops, missed one more %p

Revision 1.16 / (download) - annotate - [select for diffs], Mon Jun 22 05:54:10 2020 UTC (5 years, 2 months ago) by djm
Branch: MAIN
CVS Tags: OPENBSD_6_9_BASE, OPENBSD_6_9, OPENBSD_6_8_BASE, OPENBSD_6_8
Changes since 1.15: +44 -1 lines
Diff to previous 1.15 (colored)

support for RFC4648 base64url encoding; ok markus

Revision 1.15 / (download) - annotate - [select for diffs], Fri Jun 5 03:24:36 2020 UTC (5 years, 3 months ago) by djm
Branch: MAIN
Changes since 1.14: +2 -2 lines
Diff to previous 1.14 (colored)

make sshbuf_dump() args const

Revision 1.14 / (download) - annotate - [select for diffs], Wed Feb 26 13:40:09 2020 UTC (5 years, 6 months ago) by jsg
Branch: MAIN
CVS Tags: OPENBSD_6_7_BASE, OPENBSD_6_7
Changes since 1.13: +4 -7 lines
Diff to previous 1.13 (colored)

change explicit_bzero();free() to freezero()

While freezero() returns early if the pointer is NULL the tests for
NULL in callers are left to avoid warnings about passing an
uninitialised size argument across a function boundry.

ok deraadt@ djm@

Revision 1.13 / (download) - annotate - [select for diffs], Sat Jan 25 23:28:06 2020 UTC (5 years, 7 months ago) by djm
Branch: MAIN
Changes since 1.12: +5 -10 lines
Diff to previous 1.12 (colored)

tidy headers; some junk snuck into sshbuf-misc.c and sshbuf-io.c
doesn't need SSHBUF_INTERNAL set

Revision 1.12 / (download) - annotate - [select for diffs], Sat Jan 25 23:02:14 2020 UTC (5 years, 7 months ago) by djm
Branch: MAIN
Changes since 1.11: +10 -5 lines
Diff to previous 1.11 (colored)

factor out reading/writing sshbufs to dedicated functions;
feedback and ok markus@

Revision 1.11 / (download) - annotate - [select for diffs], Tue Jul 30 05:04:49 2019 UTC (6 years, 1 month ago) by djm
Branch: MAIN
CVS Tags: OPENBSD_6_6_BASE, OPENBSD_6_6
Changes since 1.10: +3 -4 lines
Diff to previous 1.10 (colored)

let sshbuf_find/cmp take a void* for the search/comparison
argument, instead of a u_char*. Saves callers needing to cast.

Revision 1.10 / (download) - annotate - [select for diffs], Thu Jul 18 13:26:00 2019 UTC (6 years, 1 month ago) by djm
Branch: MAIN
Changes since 1.9: +2 -2 lines
Diff to previous 1.9 (colored)

fix off-by-one in sshbuf_dtob64() base64 wrapping that could cause
extra newlines to be appended at the end of the base64 text (ugly,
but harmless). Found and fixed by Sebastian Kinne

Revision 1.9 / (download) - annotate - [select for diffs], Tue Jul 16 13:18:39 2019 UTC (6 years, 2 months ago) by djm
Branch: MAIN
Changes since 1.8: +46 -11 lines
Diff to previous 1.8 (colored)

remove mostly vestigal uuencode.[ch]; moving the only unique
functionality there (wrapping of base64-encoded data) to sshbuf
functions; feedback and ok markus@

Revision 1.8 / (download) - annotate - [select for diffs], Mon Jul 15 13:11:38 2019 UTC (6 years, 2 months ago) by djm
Branch: MAIN
Changes since 1.7: +38 -1 lines
Diff to previous 1.7 (colored)

two more bounds-checking sshbuf counterparts to common string
operations: sshbuf_cmp() (bcmp-like) and sshbuf_find() (memmem like)

feedback and ok markus@

Revision 1.7 / (download) - annotate - [select for diffs], Sun Jul 7 01:05:00 2019 UTC (6 years, 2 months ago) by dtucker
Branch: MAIN
Changes since 1.6: +2 -3 lines
Diff to previous 1.6 (colored)

Remove some set but never used variables. ok daraadt@

Revision 1.6 / (download) - annotate - [select for diffs], Mon May 2 08:49:03 2016 UTC (9 years, 4 months ago) by djm
Branch: MAIN
CVS Tags: OPENBSD_6_5_BASE, OPENBSD_6_5, OPENBSD_6_4_BASE, OPENBSD_6_4, OPENBSD_6_3_BASE, OPENBSD_6_3, OPENBSD_6_2_BASE, OPENBSD_6_2, OPENBSD_6_1_BASE, OPENBSD_6_1, OPENBSD_6_0_BASE, OPENBSD_6_0
Changes since 1.5: +24 -1 lines
Diff to previous 1.5 (colored)

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@

Revision 1.5 / (download) - annotate - [select for diffs], Mon Oct 5 17:11:21 2015 UTC (9 years, 11 months ago) by djm
Branch: MAIN
CVS Tags: OPENBSD_5_9_BASE, OPENBSD_5_9
Changes since 1.4: +5 -5 lines
Diff to previous 1.4 (colored)

some more bzero->explicit_bzero, from Michael McConville

Revision 1.4 / (download) - annotate - [select for diffs], Tue Mar 24 20:03:44 2015 UTC (10 years, 5 months ago) by markus
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE, OPENBSD_5_8
Changes since 1.3: +2 -2 lines
Diff to previous 1.3 (colored)

correct fmt-string for size_t as noted by Nicholas Lemonias; ok djm@

Revision 1.3 / (download) - annotate - [select for diffs], Thu Feb 5 12:59:57 2015 UTC (10 years, 7 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.2: +2 -1 lines
Diff to previous 1.2 (colored)

Include stdint.h, not limits.h to get SIZE_MAX.  OK guenther@

Revision 1.2 / (download) - annotate - [select for diffs], Tue Jun 24 01:13:21 2014 UTC (11 years, 2 months ago) by djm
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE, OPENBSD_5_6
Changes since 1.1: +11 -5 lines
Diff to previous 1.1 (colored)

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.

Revision 1.1 / (download) - annotate - [select for diffs], Wed Apr 30 05:29:56 2014 UTC (11 years, 4 months ago) by djm
Branch: MAIN

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.

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.