selftests:password_hash: Raise SHA256 rounds to 5000
authorSamuel Cabrero <scabrero@suse.de>
Thu, 14 Mar 2019 18:14:25 +0000 (19:14 +0100)
committerAndreas Schneider <asn@cryptomilk.org>
Fri, 22 Mar 2019 14:03:19 +0000 (14:03 +0000)
Some crypt_r implementations like libxcrypt require a higher value.

Signed-off-by: Samuel Cabrero <scabrero@suse.de>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
python/samba/tests/password_hash_fl2008.py

index 917e973cdbcd8d14f82d3f7a00096949a481b3c2..685c73edaf294a37a6348215f7b1b670b54116fb 100644 (file)
@@ -158,7 +158,7 @@ class PassWordHashFl2008Tests(PassWordHashTests):
     def test_userPassword_cleartext_sha256(self):
         self.add_user(clear_text=True,
                       options=[("password hash userPassword schemes",
-                                "CryptSHA256:rounds=100")])
+                                "CryptSHA256:rounds=5000")])
 
         sc = self.get_supplemental_creds()
 
@@ -206,5 +206,5 @@ class PassWordHashFl2008Tests(PassWordHashTests):
         #
         up = ndr_unpack(drsblobs.package_PrimaryUserPasswordBlob,
                         binascii.a2b_hex(up_package.data))
-        self.checkUserPassword(up, [("{CRYPT}", "5", 100)])
+        self.checkUserPassword(up, [("{CRYPT}", "5", 5000)])
         self.checkNtHash(USER_PASS, up.current_nt_hash.hash)