diff options
author | Damien Miller <djm@cvs.openbsd.org> | 2017-05-08 06:08:43 +0000 |
---|---|---|
committer | Damien Miller <djm@cvs.openbsd.org> | 2017-05-08 06:08:43 +0000 |
commit | 2ea56846e1ee67fc8c1069c6a4f79a85deea099a (patch) | |
tree | d1b08e8a15e9b5146b3656a216f3da80b9247119 /regress/usr.bin/ssh | |
parent | dc06132b8f7e99f1b5c569285aa33ceaa152100d (diff) |
fix for new SSH_ERR_KEY_LENGTH error value
Diffstat (limited to 'regress/usr.bin/ssh')
-rw-r--r-- | regress/usr.bin/ssh/unittests/sshkey/test_sshkey.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/regress/usr.bin/ssh/unittests/sshkey/test_sshkey.c b/regress/usr.bin/ssh/unittests/sshkey/test_sshkey.c index cceb44dba76..3807effdb69 100644 --- a/regress/usr.bin/ssh/unittests/sshkey/test_sshkey.c +++ b/regress/usr.bin/ssh/unittests/sshkey/test_sshkey.c @@ -1,4 +1,4 @@ -/* $OpenBSD: test_sshkey.c,v 1.11 2017/04/30 23:33:48 djm Exp $ */ +/* $OpenBSD: test_sshkey.c,v 1.12 2017/05/08 06:08:42 djm Exp $ */ /* * Regress test for sshkey.h key management API * @@ -242,33 +242,33 @@ sshkey_tests(void) TEST_START("generate KEY_RSA too small modulus"); ASSERT_INT_EQ(sshkey_generate(KEY_RSA, 128, &k1), - SSH_ERR_INVALID_ARGUMENT); + SSH_ERR_KEY_LENGTH); ASSERT_PTR_EQ(k1, NULL); TEST_DONE(); TEST_START("generate KEY_RSA too large modulus"); ASSERT_INT_EQ(sshkey_generate(KEY_RSA, 1 << 20, &k1), - SSH_ERR_INVALID_ARGUMENT); + SSH_ERR_KEY_LENGTH); ASSERT_PTR_EQ(k1, NULL); TEST_DONE(); TEST_START("generate KEY_DSA wrong bits"); ASSERT_INT_EQ(sshkey_generate(KEY_DSA, 2048, &k1), - SSH_ERR_INVALID_ARGUMENT); + SSH_ERR_KEY_LENGTH); ASSERT_PTR_EQ(k1, NULL); sshkey_free(k1); TEST_DONE(); TEST_START("generate KEY_ECDSA wrong bits"); ASSERT_INT_EQ(sshkey_generate(KEY_ECDSA, 42, &k1), - SSH_ERR_INVALID_ARGUMENT); + SSH_ERR_KEY_LENGTH); ASSERT_PTR_EQ(k1, NULL); sshkey_free(k1); TEST_DONE(); TEST_START("generate KEY_RSA"); ASSERT_INT_EQ(sshkey_generate(KEY_RSA, 767, &kr), - SSH_ERR_INVALID_ARGUMENT); + SSH_ERR_KEY_LENGTH); ASSERT_INT_EQ(sshkey_generate(KEY_RSA, 1024, &kr), 0); ASSERT_PTR_NE(kr, NULL); ASSERT_PTR_NE(kr->rsa, NULL); |