Commit Graph

159 Commits

Author SHA1 Message Date
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
djm@openbsd.org 0abf41f99a upstream commit
enable hostkeys unit tests
2015-02-17 09:35:35 +11:00
djm@openbsd.org 68a5d647cc upstream commit
check string/memory compare arguments aren't NULL
2015-02-17 09:34:48 +11:00
djm@openbsd.org ef575ef20d upstream commit
unit tests for hostfile.c code, just hostkeys_foreach so
 far
2015-02-17 09:34:48 +11:00
Damien Miller ade31d7b6f these need active_state defined to link on OSX
temporary measure until active_state goes away entirely
2015-01-27 23:06:23 +11:00
djm@openbsd.org fe8a3a5169 upstream commit
adapt to sshkey API tweaks
2015-01-27 00:03:31 +11:00
miod@openbsd.org 7dd355fb1f upstream commit
Move -lz late in the linker commandline for things to
 build on static arches.
2015-01-27 00:03:30 +11:00
miod@openbsd.org 0dad3b806f upstream commit
-Wpointer-sign is supported by gcc 4 only.
2015-01-27 00:03:30 +11:00
djm@openbsd.org 2b3b1c1e4b upstream commit
use SUBDIR to recuse into unit tests; makes "make obj"
 actually work
2015-01-27 00:03:12 +11:00
Damien Miller 1ca3e2155a fix kex test 2015-01-20 10:11:31 +11:00
markus@openbsd.org c78a578107 upstream commit
finally enable the KEX tests I wrote some years ago...
2015-01-20 09:50:34 +11:00
djm@openbsd.org 3a2b09d147 upstream commit
more and better key tests

test signatures and verification
test certificate generation
flesh out nested cert test

removes most of the XXX todo markers
2015-01-20 00:25:12 +11:00
djm@openbsd.org 589e69fd82 upstream commit
make the signature fuzzing test much more rigorous:
 ensure that the fuzzed input cases do not match the original (using new
 fuzz_matches_original() function) and check that the verification fails in
 each case
2015-01-20 00:24:40 +11:00
djm@openbsd.org 80603c0daa upstream commit
add a fuzz_matches_original() function to the fuzzer to
 detect fuzz cases that are identical to the original data. Hacky
 implementation, but very useful when you need the fuzz to be different, e.g.
 when verifying signature
2015-01-20 00:24:39 +11:00
djm@openbsd.org 87d5495bd3 upstream commit
better dumps from the fuzzer (shown on errors) -
 include the original data as well as the fuzzed copy.
2015-01-20 00:24:39 +11:00
markus@openbsd.org 9e06a0fb23 upstream commit
add kex unit tests
2015-01-20 00:22:50 +11:00
Damien Miller 45c0fd70bb make bitmap test compile 2015-01-15 22:08:23 +11:00
djm@openbsd.org d333f89abf upstream commit
unit tests for KRL bitmap
2015-01-15 21:39:18 +11:00
djm@openbsd.org 771bb47a1d upstream commit
implement a SIGINFO handler so we can discern a stuck
 fuzz test from a merely glacial one; prompted by and ok markus
2015-01-15 21:39:16 +11:00
djm@openbsd.org c4bfafcc2a upstream commit
adjust for sshkey_load_file() API change
2015-01-09 00:46:04 +11:00
djm@openbsd.org 1e30483c8a upstream commit
adjust for new SHA256 key fingerprints and
 slightly-different MD5 hex fingerprint format
2014-12-22 13:21:07 +11:00
krw@openbsd.org a31046cad1 upstream commit
Nuke yet more obvious #include duplications.

ok deraadt@
2014-12-05 09:31:07 +11:00
Damien Miller 1b215c098b - (djm) [regress/unittests/sshbuf/test_sshbuf_getput_crypto.c]
[regress/unittests/sshbuf/test_sshbuf_getput_fuzz.c]
   [regress/unittests/sshkey/common.c]
   [regress/unittests/sshkey/test_file.c]
   [regress/unittests/sshkey/test_fuzz.c]
   [regress/unittests/sshkey/test_sshkey.c] Don't include openssl/ec.h
   on !ECC OpenSSL systems
2014-08-27 04:04:40 +10:00
Damien Miller 4f1ff1ed78 - (djm) [regress/unittests/test_helper/test_helper.c] Fix for systems that
don't set __progname. Diagnosed by Tom Christensen.
2014-08-21 15:54:50 +10:00
Darren Tucker dd417b60d5 - dtucker@cvs.openbsd.org 2014/07/22 23:35:38
[regress/unittests/sshkey/testdata/*]
     Regenerate test keys with certs signed with ed25519 instead of ecdsa.
     These can be used in -portable on platforms that don't support ECDSA.
2014-07-23 10:41:21 +10:00
Darren Tucker 40e5021189 - dtucker@cvs.openbsd.org 2014/07/22 23:57:40
[regress/unittests/sshkey/mktestdata.sh]
     Add $OpenBSD tag to make syncs easier
2014-07-23 10:35:45 +10:00
Darren Tucker 07e644251e - dtucker@cvs.openbsd.org 2014/07/22 23:23:22
[regress/unittests/sshkey/mktestdata.sh]
     Sign test certs with ed25519 instead of ecdsa so that they'll work in
     -portable on platforms that don't have ECDSA in their OpenSSL.  ok djm
2014-07-23 10:34:26 +10:00
Darren Tucker c4ee219a66 - (dtucker) [regress/unittests/sshkey/test_{file,fuzz,sshkey}.c] Wrap ecdsa-
specific tests inside OPENSSL_HAS_ECC.
2014-07-23 04:27:50 +10:00
Darren Tucker 93a87ab27e - (dtucker) [regress/unittests/sshkey/
{common,test_file,test_fuzz,test_sshkey}.c] Wrap stdint.h includes in
   ifdefs.
2014-07-21 06:30:25 +10:00
Damien Miller dd8b1dd793 - djm@cvs.openbsd.org 2014/06/24 01:14:17
[Makefile.in regress/Makefile regress/unittests/Makefile]
     [regress/unittests/sshkey/Makefile]
     [regress/unittests/sshkey/common.c]
     [regress/unittests/sshkey/common.h]
     [regress/unittests/sshkey/mktestdata.sh]
     [regress/unittests/sshkey/test_file.c]
     [regress/unittests/sshkey/test_fuzz.c]
     [regress/unittests/sshkey/test_sshkey.c]
     [regress/unittests/sshkey/tests.c]
     [regress/unittests/sshkey/testdata/dsa_1]
     [regress/unittests/sshkey/testdata/dsa_1-cert.fp]
     [regress/unittests/sshkey/testdata/dsa_1-cert.pub]
     [regress/unittests/sshkey/testdata/dsa_1.fp]
     [regress/unittests/sshkey/testdata/dsa_1.fp.bb]
     [regress/unittests/sshkey/testdata/dsa_1.param.g]
     [regress/unittests/sshkey/testdata/dsa_1.param.priv]
     [regress/unittests/sshkey/testdata/dsa_1.param.pub]
     [regress/unittests/sshkey/testdata/dsa_1.pub]
     [regress/unittests/sshkey/testdata/dsa_1_pw]
     [regress/unittests/sshkey/testdata/dsa_2]
     [regress/unittests/sshkey/testdata/dsa_2.fp]
     [regress/unittests/sshkey/testdata/dsa_2.fp.bb]
     [regress/unittests/sshkey/testdata/dsa_2.pub]
     [regress/unittests/sshkey/testdata/dsa_n]
     [regress/unittests/sshkey/testdata/dsa_n_pw]
     [regress/unittests/sshkey/testdata/ecdsa_1]
     [regress/unittests/sshkey/testdata/ecdsa_1-cert.fp]
     [regress/unittests/sshkey/testdata/ecdsa_1-cert.pub]
     [regress/unittests/sshkey/testdata/ecdsa_1.fp]
     [regress/unittests/sshkey/testdata/ecdsa_1.fp.bb]
     [regress/unittests/sshkey/testdata/ecdsa_1.param.curve]
     [regress/unittests/sshkey/testdata/ecdsa_1.param.priv]
     [regress/unittests/sshkey/testdata/ecdsa_1.param.pub]
     [regress/unittests/sshkey/testdata/ecdsa_1.pub]
     [regress/unittests/sshkey/testdata/ecdsa_1_pw]
     [regress/unittests/sshkey/testdata/ecdsa_2]
     [regress/unittests/sshkey/testdata/ecdsa_2.fp]
     [regress/unittests/sshkey/testdata/ecdsa_2.fp.bb]
     [regress/unittests/sshkey/testdata/ecdsa_2.param.curve]
     [regress/unittests/sshkey/testdata/ecdsa_2.param.priv]
     [regress/unittests/sshkey/testdata/ecdsa_2.param.pub]
     [regress/unittests/sshkey/testdata/ecdsa_2.pub]
     [regress/unittests/sshkey/testdata/ecdsa_n]
     [regress/unittests/sshkey/testdata/ecdsa_n_pw]
     [regress/unittests/sshkey/testdata/ed25519_1]
     [regress/unittests/sshkey/testdata/ed25519_1-cert.fp]
     [regress/unittests/sshkey/testdata/ed25519_1-cert.pub]
     [regress/unittests/sshkey/testdata/ed25519_1.fp]
     [regress/unittests/sshkey/testdata/ed25519_1.fp.bb]
     [regress/unittests/sshkey/testdata/ed25519_1.pub]
     [regress/unittests/sshkey/testdata/ed25519_1_pw]
     [regress/unittests/sshkey/testdata/ed25519_2]
     [regress/unittests/sshkey/testdata/ed25519_2.fp]
     [regress/unittests/sshkey/testdata/ed25519_2.fp.bb]
     [regress/unittests/sshkey/testdata/ed25519_2.pub]
     [regress/unittests/sshkey/testdata/pw]
     [regress/unittests/sshkey/testdata/rsa1_1]
     [regress/unittests/sshkey/testdata/rsa1_1.fp]
     [regress/unittests/sshkey/testdata/rsa1_1.fp.bb]
     [regress/unittests/sshkey/testdata/rsa1_1.param.n]
     [regress/unittests/sshkey/testdata/rsa1_1.pub]
     [regress/unittests/sshkey/testdata/rsa1_1_pw]
     [regress/unittests/sshkey/testdata/rsa1_2]
     [regress/unittests/sshkey/testdata/rsa1_2.fp]
     [regress/unittests/sshkey/testdata/rsa1_2.fp.bb]
     [regress/unittests/sshkey/testdata/rsa1_2.param.n]
     [regress/unittests/sshkey/testdata/rsa1_2.pub]
     [regress/unittests/sshkey/testdata/rsa_1]
     [regress/unittests/sshkey/testdata/rsa_1-cert.fp]
     [regress/unittests/sshkey/testdata/rsa_1-cert.pub]
     [regress/unittests/sshkey/testdata/rsa_1.fp]
     [regress/unittests/sshkey/testdata/rsa_1.fp.bb]
     [regress/unittests/sshkey/testdata/rsa_1.param.n]
     [regress/unittests/sshkey/testdata/rsa_1.param.p]
     [regress/unittests/sshkey/testdata/rsa_1.param.q]
     [regress/unittests/sshkey/testdata/rsa_1.pub]
     [regress/unittests/sshkey/testdata/rsa_1_pw]
     [regress/unittests/sshkey/testdata/rsa_2]
     [regress/unittests/sshkey/testdata/rsa_2.fp]
     [regress/unittests/sshkey/testdata/rsa_2.fp.bb]
     [regress/unittests/sshkey/testdata/rsa_2.param.n]
     [regress/unittests/sshkey/testdata/rsa_2.param.p]
     [regress/unittests/sshkey/testdata/rsa_2.param.q]
     [regress/unittests/sshkey/testdata/rsa_2.pub]
     [regress/unittests/sshkey/testdata/rsa_n]
     [regress/unittests/sshkey/testdata/rsa_n_pw]
     unit and fuzz tests for new key API
2014-07-02 17:38:31 +10:00
Tim Rice 5e2b8894b0 - (tim) [regress/unittests/test_helper/test_helper.h] Add includes.h for
u_intXX_t types.
2014-06-11 18:31:10 -07:00
Darren Tucker 985ee2cbc3 - (dtucker) [regress/unittests/sshbuf/*.c regress/unittests/test_helper/*]
Wrap stdlib.h include an ifdef for platforms that don't have it.
2014-06-12 05:32:29 +10:00
Darren Tucker 15c254a253 - (dtucker) [regress/unittests/sshbuf/test_sshbuf_getput_fuzz.c] ifdef
ECC variable too.
2014-06-11 07:38:49 +10:00
Darren Tucker 67508ac256 - (dtucker) [regress/unittests/sshbuf/test_sshbuf_getput_crypto.c
regress/unittests/sshbuf/test_sshbuf_getput_fuzz.c] Only do NISTP256
   curve tests if OpenSSL has them.
2014-06-11 06:27:16 +10:00
Damien Miller e7429f2be8 - (djm) [regress/Makefile Makefile.in]
[regress/unittests/sshbuf/test_sshbuf.c
   [regress/unittests/sshbuf/test_sshbuf_fixed.c]
   [regress/unittests/sshbuf/test_sshbuf_fuzz.c]
   [regress/unittests/sshbuf/test_sshbuf_getput_basic.c]
   [regress/unittests/sshbuf/test_sshbuf_getput_crypto.c]
   [regress/unittests/sshbuf/test_sshbuf_getput_fuzz.c]
   [regress/unittests/sshbuf/test_sshbuf_misc.c]
   [regress/unittests/sshbuf/tests.c]
   [regress/unittests/test_helper/fuzz.c]
   [regress/unittests/test_helper/test_helper.c]
   Hook new unit tests into the build and "make tests"
2014-05-15 18:01:01 +10:00
Damien Miller def1de0867 - (djm) [regress/unittests/Makefile]
[regress/unittests/Makefile.inc]
   [regress/unittests/sshbuf/Makefile]
   [regress/unittests/sshbuf/test_sshbuf.c]
   [regress/unittests/sshbuf/test_sshbuf_fixed.c]
   [regress/unittests/sshbuf/test_sshbuf_fuzz.c]
   [regress/unittests/sshbuf/test_sshbuf_getput_basic.c]
   [regress/unittests/sshbuf/test_sshbuf_getput_crypto.c]
   [regress/unittests/sshbuf/test_sshbuf_getput_fuzz.c]
   [regress/unittests/sshbuf/test_sshbuf_misc.c]
   [regress/unittests/sshbuf/tests.c]
   [regress/unittests/test_helper/Makefile]
   [regress/unittests/test_helper/fuzz.c]
   [regress/unittests/test_helper/test_helper.c]
   [regress/unittests/test_helper/test_helper.h]
   Import new unit tests from OpenBSD; not yet hooked up to build.
2014-05-15 15:17:15 +10:00