djm@openbsd.org
354535ff79
upstream: add support for verification of webauthn sshsig signature,
...
and example HTML/JS to generate webauthn signatures in SSH formats (also used
to generate the testdata/* for the test).
OpenBSD-Regress-ID: dc575be5bb1796fdf4b8aaee0ef52a6671a0f6fb
2020-06-22 16:33:33 +10:00
Darren Tucker
9e06572959
Add includes.h to new test.
...
Fixes warnings eg "´bounded´ attribute directive ignor" from gcc.
2020-06-19 18:47:56 +10:00
Darren Tucker
e684b1ea36
Skip OpenSSL specific tests w/out OpenSSL.
...
Allows unit tests to pass when configure'ed --without-openssl.
2020-06-19 18:38:39 +10:00
Darren Tucker
80610e97a7
Hook sshsig tests up to Portable Makefiles.
2020-06-19 17:15:27 +10:00
djm@openbsd.org
68e8294f6b
upstream: run sshsig unit tests
...
OpenBSD-Regress-ID: 706ef17e2b545b64873626e0e35553da7c06052a
2020-06-19 16:06:06 +10:00
djm@openbsd.org
5edfa1690e
upstream: basic unit test for sshsig.[ch], including FIDO keys
...
verification only so far
OpenBSD-Regress-ID: fb1f946c8fc59206bc6a6666e577b5d5d7e45896
2020-06-19 16:06:06 +10:00
djm@openbsd.org
e95c0a0e96
upstream: basic unit test for FIDO kep parsing
...
OpenBSD-Regress-ID: 8089b88393dd916d7c95422b442a6fd4cfe00c82
2020-06-19 15:58:10 +10:00
dtucker@openbsd.org
058674a62f
upstream: Add regression and unit tests for ${ENV} style
...
environment variable expansion in various keywords (bz#3140). ok djm@
OpenBSD-Regress-ID: 4d9ceb95d89365b7b674bc26cf064c15a5bbb197
2020-05-29 15:48:15 +10:00
dtucker@openbsd.org
0b15892fc4
upstream: Unit test for convtime. ok djm@
...
OpenBSD-Regress-ID: cec4239efa2fc4c7062064f07a847e1cbdbcd5dd
2020-05-29 15:48:10 +10:00
djm@openbsd.org
4da393f87c
upstream: sure enough, some of the test data that we though were in
...
new format were actually in the old format; fix from Michael Forney
OpenBSD-Regress-ID: a41a5c43a61b0f0b1691994dbf16dfb88e8af933
2020-05-04 18:42:13 +10:00
djm@openbsd.org
15bfafc1db
upstream: make mktestdata.sh generate old/new format keys that we
...
expect. This script was written before OpenSSH switched to new-format private
keys by default and was never updated to the change (until now) From Michael
Forney
OpenBSD-Regress-ID: 38cf354715c96852e5b71c2393fb6e7ad28b7ca7
2020-05-04 18:42:13 +10:00
djm@openbsd.org
7882d2eda6
upstream: portability fix for sed that always emil a newline even
...
if the input does not contain one; from Michael Forney
OpenBSD-Regress-ID: 9190c3ddf0d2562ccc02c4a95fce0e392196bfc7
2020-05-04 18:42:13 +10:00
djm@openbsd.org
8074f9499e
upstream: remove obsolete RSA1 test keys; spotted by Michael Forney
...
OpenBSD-Regress-ID: 6384ba889594e217d166908ed8253718ab0866da
2020-05-04 18:42:13 +10:00
dtucker@openbsd.org
abc3e0a517
upstream: Add utf8.c for asmprintf used by krl.c
...
OpenBSD-Regress-ID: 433708d11165afdb189fe635151d21659dd37a37
2020-04-10 11:47:40 +10:00
djm@openbsd.org
1e1db0544f
upstream: unbreak unittests for recent API / source file changes
...
OpenBSD-Regress-ID: 075a899a01bbf7781d38bf0b33d8366faaf6d3c0
2020-01-28 12:50:38 +11:00
djm@openbsd.org
f73ab8a811
upstream: unbreak unittests for recent API / source file changes
...
OpenBSD-Regress-ID: 075a899a01bbf7781d38bf0b33d8366faaf6d3c0
2020-01-26 14:19:43 +11:00
djm@openbsd.org
c5f1cc9935
upstream: unbreak tests for recent security key changes
...
OpenBSD-Regress-ID: 2cdf2fcae9962ca4d711338f3ceec3c1391bdf95
2019-11-25 21:34:20 +11:00
djm@openbsd.org
db8d13f792
upstream: more additional source files
...
OpenBSD-Regress-ID: 8eaa25fb901594aee23b76eda99dca5b8db94c6f
2019-11-01 13:10:52 +11:00
djm@openbsd.org
f89c5df65d
upstream: additional source files here too
...
OpenBSD-Regress-ID: 8809f8e1c8f7459e7096ab6b58d8e56cb2f483fd
2019-11-01 13:10:09 +11:00
djm@openbsd.org
02275afa1e
upstream: additional source files here too
...
OpenBSD-Regress-ID: 09297e484327f911fd353489518cceaa0c1b95ce
2019-11-01 13:10:09 +11:00
djm@openbsd.org
dfc8f01b98
upstream: adapt to extra sshkey_sign() argument and additional
...
dependencies
OpenBSD-Regress-ID: 7a25604968486c4d6f81d06e8fbc7d17519de50e
2019-11-01 13:10:09 +11:00
Damien Miller
f4fdcd2b7a
Missing unit test files
2019-11-01 08:36:16 +11:00
Damien Miller
f61f29afda
make unittests pass for no-openssl case
2019-09-08 10:37:17 +10:00
djm@openbsd.org
c4ffb72593
upstream: fix some memleaks in test_helper code
...
bz#3037 from Jitendra Sharma
OpenBSD-Regress-ID: 71440fa9186f5842a65ce9a27159385c6cb6f751
2019-08-02 11:42:26 +10:00
djm@openbsd.org
f8829fe57f
upstream: adapt to sshbuf_dtob64() change
...
OpenBSD-Regress-ID: 82374a83edf0955fd1477169eee3f5d6467405a6
2019-07-17 11:04:25 +10:00
djm@openbsd.org
477e2a3be8
upstream: unit tests for sshbuf_cmp() and sshbuf_find(); ok markus
...
OpenBSD-Regress-ID: b52d36bc3ab6dc158c1e59a9a4735f821cf9e1fd
2019-07-15 23:21:18 +10:00
djm@openbsd.org
121e48fa53
upstream: unit tests for sshbuf_peek/poke bounds-checked random access
...
functions. ok markus@
OpenBSD-Regress-ID: 034c4284b1da6b12e25c762a6b958efacdafbaef
2019-07-15 09:39:42 +10:00
djm@openbsd.org
1dfadb9b57
upstream: adapt for key shielding API changes (const removal)
...
OpenBSD-Regress-ID: 298890bc52f0cd09dba76dc1022fabe89bc0ded6
2019-06-21 14:24:44 +10:00
djm@openbsd.org
99bcbbc77f
upstream: check for convtime() refusing to accept times that
...
resolve to LONG_MAX Reported by Kirk Wolf bz2977; ok dtucker
OpenBSD-Regress-ID: 15c9fe87be1ec241d24707006a31123d3a3117e0
2019-06-19 12:21:40 +10:00
dtucker@openbsd.org
e5cccb2410
upstream: Add unit tests for user@host and URI parsing.
...
OpenBSD-Regress-ID: 69d5b6f278e04ed32377046f7692c714c2d07a68
2019-06-19 12:21:40 +10: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
Damien Miller
9b655dc9c9
last bits of old packet API / active_state global
2019-01-20 14:55:27 +11:00
djm@openbsd.org
eb347d086c
upstream: ssh_packet_set_state() now frees ssh->kex implicitly, so
...
don't do explicit kex_free() beforehand
OpenBSD-Regress-ID: f2f73bad47f62a2040ccba0a72cadcb12eda49cf
2018-12-27 14:39:53 +11:00
dtucker@openbsd.org
4da58d5873
upstream: Remove now-unneeded ifdef SIGINFO around handler since it is
...
now always used for SIGUSR1 even when SIGINFO is not defined. This will make
things simpler in -portable.
OpenBSD-Regress-ID: 4ff0265b335820b0646d37beb93f036ded0dc43f
2018-11-23 14:42:07 +11:00
Darren Tucker
deb51552c3
Resync with OpenBSD by pulling in an ifdef SIGINFO.
2018-11-23 11:34:21 +11:00
Damien Miller
42c5ec4b97
refactor libcrypto initialisation
...
Don't call OpenSSL_add_all_algorithms() unless OpenSSL actually
supports it.
Move all libcrypto initialisation to a single function, and call that
from seed_rng() that is called early in each tool's main().
Prompted by patch from Rosen Penev
2018-11-23 10:42:05 +11:00
dtucker@openbsd.org
5b60b6c020
upstream: Output info on SIGUSR1 as well as
...
SIGINFO to resync with portable. (ID sync only).
OpenBSD-Regress-ID: 699d153e2de22dce51a1b270c40a98472d1a1b16
2018-11-22 21:01:01 +11:00
djm@openbsd.org
35d0e5fefc
upstream: add some knobs:
...
UNITTEST_FAST?= no # Skip slow tests (e.g. less intensive fuzzing).
UNITTEST_SLOW?= no # Include slower tests (e.g. more intensive fuzzing).
UNITTEST_VERBOSE?= no # Verbose test output (inc. per-test names).
useful if you want to run the tests as a smoke test to exercise the
functionality without waiting for all the fuzzers to run.
OpenBSD-Regress-ID: e04d82ebec86068198cd903acf1c67563c57315e
2018-11-22 16:14:31 +11:00
Darren Tucker
c1941293d9
Resync Makefile.inc with upstream.
...
It's unused in -portable, but having it out of sync makes other syncs
fail to apply.
2018-11-22 16:02:46 +11:00
Damien Miller
0aa1f23084
allow SIGUSR1 as synonym for SIGINFO
...
Lets users on those unfortunate operating systems that lack SIGINFO
still be able to obtain progress information from unit tests :)
2018-09-14 10:31:47 +10:00
Damien Miller
d64e785265
add compat header
2018-09-13 19:05:48 +10:00
djm@openbsd.org
a3fd8074e2
upstream: missed a bit of openssl-1.0.x API in this unittest
...
OpenBSD-Regress-ID: a73a54d7f7381856a3f3a2d25947bee7a9a5dbc9
2018-09-13 19:04:10 +10:00
djm@openbsd.org
86e0a9f3d2
upstream: use only openssl-1.1.x API here too
...
OpenBSD-Regress-ID: ae877064597c349954b1b443769723563cecbc8f
2018-09-13 15:08:27 +10:00
Damien Miller
86112951d6
forgot to stage these test files in commit d70d061
2018-09-13 12:12:42 +10:00
djm@openbsd.org
d70d061828
upstream: Include certs with multiple RSA signature variants in
...
test data Ensure that cert->signature_key is populated correctly
OpenBSD-Regress-ID: 56e68f70fe46cb3a193ca207385bdb301fd6603a
2018-09-12 16:51:36 +10:00
djm@openbsd.org
2de78bc7da
upstream: s/sshkey_demote/sshkey_from_private/g
...
OpenBSD-Regress-ID: 782bde7407d94a87aa8d1db7c23750e09d4443c4
2018-09-12 16:51:14 +10:00
djm@openbsd.org
2f131e1b34
upstream: memleak in unittest; found by valgrind
...
OpenBSD-Regress-ID: 168c23b0fb09fc3d0b438628990d3fd9260a8a5e
2018-07-16 13:12:28 +10:00
djm@openbsd.org
dbab02f920
upstream: fix leaks in unit test; with this, all unit tests are
...
leak free (as far as valgrind can spot anyway)
OpenBSD-Regress-ID: b824d8b27998365379963440e5d18b95ca03aa17
2018-07-13 12:14:38 +10:00
djm@openbsd.org
314908f451
upstream: deal with API rename: match_filter_list() =>
...
match_filter_blacklist()
OpenBSD-Regress-ID: 2da342be913efeb51806351af906fab01ba4367f
2018-07-04 23:52:50 +10:00
djm@openbsd.org
de1920d743
upstream: unit tests for new authorized_keys options API
...
OpenBSD-Regress-ID: 820f9ec9c6301f6ca330ad4052d85f0e67d0bdc1
2018-03-03 14:39:25 +11:00
djm@openbsd.org
3b252c20b1
upstream: some helpers to check verbose/quiet mode
...
OpenBSD-Regress-ID: e736aac39e563f5360a0935080a71d5fdcb976de
2018-02-23 14:05:07 +11:00
djm@openbsd.org
5fb4fb5a01
upstream commit
...
missed one (unbreak after ssh/lib removal)
OpenBSD-Regress-ID: cfdd132143131769e2d2455e7892b5d55854c322
2018-01-03 16:46:49 +11:00
djm@openbsd.org
e6c4134165
upstream commit
...
unbreak unit tests after removal of src/usr.bin/ssh/lib
OpenBSD-Regress-ID: 3a79760494147b20761cbd2bd5c20e86c63dc8f9
2018-01-03 16:46:49 +11:00
djm@openbsd.org
d757a4b633
upstream commit
...
fix for new SSH_ERR_KEY_LENGTH error value
Upstream-Regress-ID: c38a6e6174d4c3feca3518df150d4fbae0dca8dc
2017-05-08 16:11:26 +10:00
djm@openbsd.org
557f921aad
upstream commit
...
remove SSHv1 support from unit tests
Upstream-Regress-ID: 395ca2aa48f1f7d23eefff6cb849ea733ca8bbfe
2017-05-01 10:07:19 +10:00
jsg@openbsd.org
e0194b471e
upstream commit
...
Change COMPILER_VERSION tests which limited additional
warnings to gcc4 to instead skip them on gcc3 as clang can handle
-Wpointer-sign and -Wold-style-definition.
Upstream-Regress-ID: e48d7dc13e48d9334b8195ef884dfbc51316012f
2017-04-28 13:28:49 +10:00
Darren Tucker
2fbf91684d
Include includes.h for compat bits.
2017-03-16 14:05:46 +11:00
Darren Tucker
b55f634e96
Wrap stdint.h in #ifdef HAVE_STDINT_H
2017-03-16 13:45:17 +11:00
Darren Tucker
b1b22dd0df
Plumb conversion test into makefile.
2017-03-14 14:19:36 +11:00
dtucker@openbsd.org
f57783f1dd
upstream commit
...
Add unit test for convtime().
Upstream-Regress-ID: 8717bc0ca4c21120f6dd3a1d3b7a363f707c31e1
2017-03-14 13:45:14 +11:00
dtucker@openbsd.org
8884b7247d
upstream commit
...
Add ASSERT_LONG_* helpers.
Upstream-Regress-ID: fe15beaea8f5063c7f21b0660c722648e3d76431
2017-03-14 13:45:14 +11:00
djm@openbsd.org
d549919055
upstream commit
...
add test cases for C locale; ok schwarze@
Upstream-Regress-ID: 783d75de35fbc923d46e2a5e6cee30f8f381ba87
2017-02-19 11:19:12 +11:00
djm@openbsd.org
97c31c46ee
upstream commit
...
unit test for match_filter_list() function; still want a
better name for this...
Upstream-Regress-ID: 840ad6118552c35111f0a897af9c8d93ab8de92a
2017-02-04 10:10:07 +11:00
djm@openbsd.org
3a8213ea0e
upstream commit
...
remove testcase that depends on exact output and
behaviour of snprintf(..., "%s", NULL)
Upstream-Regress-ID: cab4288531766bd9593cb556613b91a2eeefb56f
2016-12-19 15:59:40 +11:00
tb@openbsd.org
7da751d8b0
upstream commit
...
Clean up MALLOC_OPTIONS. For the unittests, move
MALLOC_OPTIONS and TEST_ENV to unittets/Makefile.inc.
ok otto
Upstream-Regress-ID: 890d497e0a38eeddfebb11cc429098d76cf29f12
2016-11-29 17:16:29 +11:00
tb@openbsd.org
36f58e6822
upstream commit
...
Remove the obsolete A and P flags from MALLOC_OPTIONS.
ok dtucker
Upstream-Regress-ID: 6cc25024c8174a87e5734a0dc830194be216dd59
2016-11-29 17:14:27 +11:00
Darren Tucker
09e6a7d835
Wrap stdint.h include in ifdef.
2016-10-24 09:06:18 +11:00
bluhm@openbsd.org
ca71c36645
upstream commit
...
Add a makefile rule to create the ssh library when
regress needs it. This allows to run the ssh regression tests without doing
a "make build" before. Discussed with dtucker@ and djm@; OK djm@
Upstream-Regress-ID: ce489bd53afcd471225a125b4b94565d4717c025
2016-10-01 06:44:43 +10:00
djm@openbsd.org
5f63ab474f
upstream commit
...
disable tests for affirmative negated match after backout of
match change
Upstream-Regress-ID: acebb8e5042f03d66d86a50405c46c4de0badcfd
2016-09-22 03:15:25 +10:00
djm@openbsd.org
44e5f756d2
upstream commit
...
add tests for addr_match_list()
Upstream-Regress-ID: fae2d1fef84687ece584738a924c7bf969616c8e
2016-09-14 10:55:22 +10:00
Damien Miller
6ee4f1c01e
hook match and utf8 unittests up to Makefile
2016-08-23 16:33:48 +10:00
djm@openbsd.org
114efe2bc0
upstream commit
...
add tests for matching functions
Upstream-Regress-ID: 0869d4f5c5d627c583c6a929d69c17d5dd65882c
2016-08-23 15:18:57 +10:00
guenther@openbsd.org
18813a32b6
upstream commit
...
DEBUGLIBS has been broken since the gcc4 switch, so delete
it. CFLAGS contains -g by default anyway
problem noted by Edgar Pettijohn (edgar (at) pettijohn-web.com)
ok millert@ kettenis@ deraadt@
Upstream-Regress-ID: 4a0bb72f95c63f2ae9daa8a040ac23914bddb542
2016-07-08 13:51:12 +10:00
schwarze@openbsd.org
a5577c1ed3
upstream commit
...
stricter malloc.conf(5) options for utf8 tests
Upstream-Regress-ID: 111efe20a0fb692fa1a987f6e823310f9b25abf6
2016-06-08 11:45:05 +10:00
schwarze@openbsd.org
75f0844b4f
upstream commit
...
Fix two rare edge cases: 1. If vasprintf() returns < 0,
do not access a NULL pointer in snmprintf(), and do not free() the pointer
returned from vasprintf() because on some systems other than OpenBSD, it
might be a bogus pointer. 2. If vasprintf() returns == 0, return 0 and ""
rather than -1 and NULL.
Besides, free(dst) is pointless after failure (not a bug).
One half OK martijn@, the other half OK deraadt@;
committing quickly before people get hurt.
Upstream-Regress-ID: b164f20923812c9bac69856dbc1385eb1522cba4
2016-06-08 11:45:05 +10:00
schwarze@openbsd.org
016881eb33
upstream commit
...
test the new utf8 module
Upstream-Regress-ID: c923d05a20e84e4ef152cbec947fdc4ce6eabbe3
2016-06-08 11:45:05 +10:00
djm@openbsd.org
01cabf10ad
upstream commit
...
unit tests for sshbuf_dup_string()
Upstream-Regress-ID: 7521ff150dc7f20511d1c2c48fd3318e5850a96d
2016-06-08 11:40:38 +10:00
djm@openbsd.org
67f1459efd
upstream commit
...
unit and regress tests for SHA256/512; ok markus
Upstream-Regress-ID: a0cd1a92dc824067076a5fcef83c18df9b0bf2c6
2016-05-02 20:59:50 +10:00
djm@openbsd.org
da98c11d03
upstream commit
...
basic unit tests for rsa-sha2-* signature types
Upstream-Regress-ID: 7dc4b9db809d578ff104d591b4d86560c3598d3c
2015-12-07 13:21:30 +11:00
djm@openbsd.org
fdd020e864
upstream commit
...
adapt to recent sshkey_parse_private_fileblob() API
change
Upstream-Regress-ID: 5c0d818da511e33e0abf6a92a31bd7163b7ad988
2015-10-06 12:29:03 +11:00
djm@openbsd.org
d85dad8177
upstream commit
...
adjust for RSA minimum modulus switch; ok deraadt@
Upstream-Regress-ID: 5a72c83431b96224d583c573ca281cd3a3ebfdae
2015-08-06 11:13:25 +10:00
djm@openbsd.org
41e38c4d49
upstream commit
...
regen RSA1 test keys; the last batch was missing their
private parts
Upstream-Regress-ID: 7ccf437305dd63ff0b48dd50c5fd0f4d4230c10a
2015-07-15 17:25:10 +10:00
markus@openbsd.org
5bf0933184
upstream commit
...
Adapt tests, now that DSA if off by default; use
PubkeyAcceptedKeyTypes and PubkeyAcceptedKeyTypes to test DSA.
Upstream-Regress-ID: 0ff2a3ff5ac1ce5f92321d27aa07b98656efcc5c
2015-07-15 16:04:27 +10:00
markus@openbsd.org
7a6e3fd7b4
upstream commit
...
regen test data after mktestdata.sh changes
Upstream-Regress-ID: 3495ecb082b9a7c048a2d7c5c845d3bf181d25a4
2015-07-15 16:04:27 +10:00
markus@openbsd.org
7c8c174c69
upstream commit
...
adapt tests to new minimum RSA size and default FP format
Upstream-Regress-ID: a4b30afd174ce82b96df14eb49fb0b81398ffd0e
2015-07-15 16:04:26 +10:00
djm@openbsd.org
6a977a4b68
upstream commit
...
legacy v00 certificates are gone; adapt and don't try to
test them; "sure" markus@ dtucker@
Upstream-Regress-ID: c57321e69b3cd4a3b3396dfcc43f0803d047da12
2015-07-15 16:04:02 +10:00
djm@openbsd.org
0c4123ad5e
upstream commit
...
don't expect SSH v.1 in unittests
Upstream-Regress-ID: f8812b16668ba78e6a698646b2a652b90b653397
2015-07-15 16:04:02 +10:00
djm@openbsd.org
3c09984579
upstream commit
...
turn SSH1 back on to match src/usr.bin/ssh being tested
Upstream-Regress-ID: 6c4f763a2f0cc6893bf33983919e9030ae638333
2015-07-15 16:03:29 +10:00
djm@openbsd.org
368f83c793
upstream commit
...
use correct key for nested certificate test
2015-05-10 11:35:12 +10:00
djm@openbsd.org
7da2be0cb9
upstream commit
...
adapt to recent hostfile.c change: when parsing
known_hosts without fully parsing the keys therein, hostkeys_foreach() will
now correctly identify KEY_RSA1 keys; ok markus@ miod@
2015-04-01 10:03:05 +11:00
Damien Miller
4df590cf8d
make unit tests work for !OPENSSH_HAS_ECC
2015-03-11 10:02:39 +11:00
djm@openbsd.org
307bb40277
upstream commit
...
unbreak for w/SSH1 (default) case; ok markus@ deraadt@
2015-03-09 15:20:55 +11:00
Damien Miller
b44ee0c998
unbreak hostkeys test for w/ SSH1 case
2015-03-05 18:39:20 -08:00
djm@openbsd.org
ac5e8acefa
upstream commit
...
make these work with !SSH1; ok markus@ deraadt@
2015-03-05 10:27:22 +11:00
djm@openbsd.org
3f7f5e6c5d
upstream commit
...
expand __unused to full __attribute__ for better portability
2015-03-04 07:59:13 +11:00
Darren Tucker
5d5ec165c5
Restrict ECDSA and ECDH tests.
...
ifdef out some more ECDSA and ECDH tests when built against an OpenSSL
that does not have eliptic curve functionality.
2015-02-25 15:32:49 +11:00
Damien Miller
cb030ce25f
include includes.h to avoid build failure on AIX
2015-02-24 09:23:30 -08:00
Darren Tucker
4c356308a8
Wrap stdint.h includes in HAVE_STDINT_H.
2015-02-24 13:49:31 +11:00
Damien Miller
e89c780886
hook up hostkeys unittest to portable Makefiles
2015-02-17 10:04:55 +11:00