logo

skeud

Simple and portable utilities to deal with user accounts (su, login)
commit: 798faf0af328622e6979a856a7ac8c2a46b2984d
parent 4ebf9696aef6ae1de706ee706d536fd0b12a70b7
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Sun, 10 Sep 2023 15:47:27 +0200

common_test: Put SHA512 hash in variable (style)

Diffstat:

Mcommon_test.c7+++----
1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/common_test.c b/common_test.c @@ -49,11 +49,10 @@ ATF_TC_BODY(skeud_crypt_check_tc, tc) // SHA256: openssl passwd -5 -noverify ATF_CHECK(skeud_crypt_check("$5$8VryLuwDTzZ8MSZX$2UIaWB5LcMlhXv7UQIBcFeq8/Dr6PswXZP/SJ09L01B", "foobar")); - // SHA512: openssl passwd -6 -noverify - ATF_CHECK(skeud_crypt_check("$6$QUEEGuX9dkGlNkTP$IJwcvb6tpm63hoOfm9QJjEgjte/" - "OpcQS3S43zDN95G3diJ5Xc/OlhhbCkUyV/A0ARhgQj2D/4m/DWhwvvs3A91", - "foobar")); + char *hash = "$6$QUEEGuX9dkGlNkTP$IJwcvb6tpm63hoOfm9QJjEgjte/OpcQS3S43zDN95G3diJ5Xc/OlhhbCkUyV/" + "A0ARhgQj2D/4m/DWhwvvs3A91"; + ATF_CHECK(skeud_crypt_check(hash, "foobar")); } ATF_TP_ADD_TCS(tp)