CVS commit: src/tests/usr.bin/argon2

2019-10-14 Thread Jason High
Module Name:src
Committed By:   jhigh
Date:   Mon Oct 14 14:48:48 UTC 2019

Modified Files:
src/tests/usr.bin/argon2: t_argon2.sh

Log Message:
added test cases
invalid version specification
salt too short


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/usr.bin/argon2/t_argon2.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tests/usr.bin/argon2/t_argon2.sh
diff -u src/tests/usr.bin/argon2/t_argon2.sh:1.2 src/tests/usr.bin/argon2/t_argon2.sh:1.3
--- src/tests/usr.bin/argon2/t_argon2.sh:1.2	Mon Oct 14 14:37:31 2019
+++ src/tests/usr.bin/argon2/t_argon2.sh	Mon Oct 14 14:48:48 2019
@@ -112,6 +112,24 @@ argon2_argon2d_k2096_p1_v13_body() {
 		'echo -n 'password' | argon2 somesalt -e -d -k 2096 -p 1 -v 13'
 }
 
+atf_test_case argon2_argon2id_k2096_p1_v19_inver
+argon2_argon2id_k2096_p1_v19_inver_head() {
+	atf_set "descr" "ATF test for argon2 argon2d,k=2096,p=1 invalid version specification"
+}
+argon2_argon2id_k2096_p1_v19_inver_body() {
+	atf_check -s exit:1 -e match:"Error: invalid Argon2 version" -x \
+		'echo -n 'password' | argon2 somesalt -e -d -k 2096 -p 1 -v 19'
+}
+
+atf_test_case argon2_argon2id_k2096_p1_sts
+argon2_argon2id_k2096_p1_sts_head() {
+	atf_set "descr" "ATF test for argon2 argon2d,k=2096,p=1 salt too short"
+}
+argon2_argon2id_k2096_p1_sts_body() {
+	atf_check -s exit:1 -e match:"Error: Salt is too short" -x \
+		'echo -n 'password' | argon2 tshort -e -d -k 2096 -p 1'
+}
+
 atf_init_test_cases()
 {
 	atf_add_test_case argon2_argon2id
@@ -126,4 +144,6 @@ atf_init_test_cases()
 	atf_add_test_case argon2_argon2i_k2096_p1_v13
 	atf_add_test_case argon2_argon2d_k2096_p1_v10
 	atf_add_test_case argon2_argon2d_k2096_p1_v13
+	atf_add_test_case argon2_argon2id_k2096_p1_v19_inver
+	atf_add_test_case argon2_argon2id_k2096_p1_sts
 }



CVS commit: src/tests/usr.bin/argon2

2019-10-14 Thread Jason High
Module Name:src
Committed By:   jhigh
Date:   Mon Oct 14 14:48:48 UTC 2019

Modified Files:
src/tests/usr.bin/argon2: t_argon2.sh

Log Message:
added test cases
invalid version specification
salt too short


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/usr.bin/argon2/t_argon2.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/usr.bin/argon2

2019-10-14 Thread Jason High
Module Name:src
Committed By:   jhigh
Date:   Mon Oct 14 14:37:31 UTC 2019

Modified Files:
src/tests/usr.bin/argon2: t_argon2.sh

Log Message:
added versioning tests for argon2


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/usr.bin/argon2/t_argon2.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/usr.bin/argon2

2019-10-14 Thread Jason High
Module Name:src
Committed By:   jhigh
Date:   Mon Oct 14 14:37:31 UTC 2019

Modified Files:
src/tests/usr.bin/argon2: t_argon2.sh

Log Message:
added versioning tests for argon2


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/usr.bin/argon2/t_argon2.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tests/usr.bin/argon2/t_argon2.sh
diff -u src/tests/usr.bin/argon2/t_argon2.sh:1.1 src/tests/usr.bin/argon2/t_argon2.sh:1.2
--- src/tests/usr.bin/argon2/t_argon2.sh:1.1	Mon Oct 14 03:47:20 2019
+++ src/tests/usr.bin/argon2/t_argon2.sh	Mon Oct 14 14:37:31 2019
@@ -58,6 +58,59 @@ argon2_argon2d_k2096_p2_t4_body() {
 		'echo -n 'password' | argon2 somesalt -e -d -k 2096 -p 2 -t 4'
 }
 
+atf_test_case argon2_argon2id_k2096_p1_v10
+argon2_argon2id_k2096_p1_v10_head() {
+	atf_set "descr" "ATF test for argon2 argon2id,k=2096,p=1,v=10"
+}
+argon2_argon2id_k2096_p1_v10_body() {
+	atf_check -s exit:0 -o match:"^\\\$argon2id\\\$v=16\\\$m=2096,t=3,p=1" -x \
+		'echo -n 'password' | argon2 somesalt -e -id -k 2096 -p 1 -v 10'
+}
+
+atf_test_case argon2_argon2id_k2096_p1_v13
+argon2_argon2id_k2096_p1_v13_head() {
+	atf_set "descr" "ATF test for argon2 argon2id,k=2096,p=1,v=13"
+}
+argon2_argon2id_k2096_p1_v13_body() {
+	atf_check -s exit:0 -o match:"^\\\$argon2id\\\$v=19\\\$m=2096,t=3,p=1" -x \
+		'echo -n 'password' | argon2 somesalt -e -id -k 2096 -p 1 -v 13'
+}
+
+atf_test_case argon2_argon2i_k2096_p1_v10
+argon2_argon2i_k2096_p1_v10_head() {
+	atf_set "descr" "ATF test for argon2 argon2i,k=2096,p=1,v=10"
+}
+argon2_argon2i_k2096_p1_v10_body() {
+	atf_check -s exit:0 -o match:"^\\\$argon2i\\\$v=16\\\$m=2096,t=3,p=1" -x \
+		'echo -n 'password' | argon2 somesalt -e -i -k 2096 -p 1 -v 10'
+}
+
+atf_test_case argon2_argon2i_k2096_p1_v13
+argon2_argon2i_k2096_p1_v13_head() {
+	atf_set "descr" "ATF test for argon2 argon2i,k=2096,p=1,v=13"
+}
+argon2_argon2i_k2096_p1_v13_body() {
+	atf_check -s exit:0 -o match:"^\\\$argon2i\\\$v=19\\\$m=2096,t=3,p=1" -x \
+		'echo -n 'password' | argon2 somesalt -e -i -k 2096 -p 1 -v 13'
+}
+
+atf_test_case argon2_argon2d_k2096_p1_v10
+argon2_argon2d_k2096_p1_v10_head() {
+	atf_set "descr" "ATF test for argon2 argon2d,k=2096,p=1,v=10"
+}
+argon2_argon2d_k2096_p1_v10_body() {
+	atf_check -s exit:0 -o match:"^\\\$argon2d\\\$v=16\\\$m=2096,t=3,p=1" -x \
+		'echo -n 'password' | argon2 somesalt -e -d -k 2096 -p 1 -v 10'
+}
+
+atf_test_case argon2_argon2d_k2096_p1_v13
+argon2_argon2d_k2096_p1_v13_head() {
+	atf_set "descr" "ATF test for argon2 argon2d,k=2096,p=1,v=13"
+}
+argon2_argon2d_k2096_p1_v13_body() {
+	atf_check -s exit:0 -o match:"^\\\$argon2d\\\$v=19\\\$m=2096,t=3,p=1" -x \
+		'echo -n 'password' | argon2 somesalt -e -d -k 2096 -p 1 -v 13'
+}
 
 atf_init_test_cases()
 {
@@ -67,4 +120,10 @@ atf_init_test_cases()
 	atf_add_test_case argon2_argon2id_k2096_p2_t3
 	atf_add_test_case argon2_argon2i_k2096_p1_t4
 	atf_add_test_case argon2_argon2d_k2096_p2_t4
+	atf_add_test_case argon2_argon2id_k2096_p1_v10
+	atf_add_test_case argon2_argon2id_k2096_p1_v13
+	atf_add_test_case argon2_argon2i_k2096_p1_v10
+	atf_add_test_case argon2_argon2i_k2096_p1_v13
+	atf_add_test_case argon2_argon2d_k2096_p1_v10
+	atf_add_test_case argon2_argon2d_k2096_p1_v13
 }



CVS commit: src/tests/usr.bin/argon2

2019-10-14 Thread Jason High
Module Name:src
Committed By:   jhigh
Date:   Mon Oct 14 06:40:40 UTC 2019

Removed Files:
src/tests/usr.bin/argon2: Atffile

Log Message:
removed incorrectly added file


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r0 src/tests/usr.bin/argon2/Atffile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/usr.bin/argon2

2019-10-14 Thread Jason High
Module Name:src
Committed By:   jhigh
Date:   Mon Oct 14 06:40:40 UTC 2019

Removed Files:
src/tests/usr.bin/argon2: Atffile

Log Message:
removed incorrectly added file


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r0 src/tests/usr.bin/argon2/Atffile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.