[openssh-commits] [openssh] 02/02: upstream commit

git+noreply at mindrot.org git+noreply at mindrot.org
Mon May 8 16:11:36 AEST 2017


This is an automated email from the git hooks/post-receive script.

djm pushed a commit to branch master
in repository openssh.

commit d757a4b633e8874629a1442c7c2e7b1b55d28c19
Author: djm at openbsd.org <djm at openbsd.org>
Date:   Mon May 8 06:08:42 2017 +0000

    upstream commit
    
    fix for new SSH_ERR_KEY_LENGTH error value
    
    Upstream-Regress-ID: c38a6e6174d4c3feca3518df150d4fbae0dca8dc
---
 regress/unittests/sshkey/test_sshkey.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/regress/unittests/sshkey/test_sshkey.c b/regress/unittests/sshkey/test_sshkey.c
index 32f8cb63..0a73322a 100644
--- a/regress/unittests/sshkey/test_sshkey.c
+++ b/regress/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
  *
@@ -253,19 +253,19 @@ 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();
@@ -273,7 +273,7 @@ sshkey_tests(void)
 #ifdef OPENSSL_HAS_ECC
 	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();
@@ -281,7 +281,7 @@ sshkey_tests(void)
 
 	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);

-- 
To stop receiving notification emails like this one, please contact
djm at mindrot.org.


More information about the openssh-commits mailing list