]> eyrie.org Git - kerberos/krb5-strength.git/blobdiff - tests/data/passwords/classes.c
New upstream version 3.2
[kerberos/krb5-strength.git] / tests / data / passwords / classes.c
index 4828512bd989f00226e5267692da1c576d3436fe..6b70a0fd73b400f3634e049f05a6ba816cebeebf 100644 (file)
@@ -5,14 +5,17 @@
  * for the use in C test programs.  To make changes, modify the original
  * JSON source or (more rarely) the make-c-data script and run it again.
  *
+ * Written by Russ Allbery <eagle@eyrie.org>
+ * Copyright 2020 Russ Allbery <eagle@eyrie.org>
  * Copyright 2013
  *     The Board of Trustees of the Leland Stanford Junior University
  *
- * See LICENSE for licensing terms.
+ * SPDX-License-Identifier: MIT
  */
 
 #include <tests/data/passwords/tests.h>
 
+extern const struct password_test classes_tests[];
 const struct password_test classes_tests[] = {
     {
 
@@ -20,7 +23,8 @@ const struct password_test classes_tests[] = {
         "test@EXAMPLE.ORG",
         "PASSWORD98!",
         KADM5_PASS_Q_CLASS,
-        "password must contain a lowercase letter",
+        "Password must contain a lowercase letter",
+        0,
     },
     {
 
@@ -28,7 +32,8 @@ const struct password_test classes_tests[] = {
         "test@EXAMPLE.ORG",
         "password98!",
         KADM5_PASS_Q_CLASS,
-        "password must contain an uppercase letter",
+        "Password must contain an uppercase letter",
+        0,
     },
     {
 
@@ -36,7 +41,8 @@ const struct password_test classes_tests[] = {
         "test@EXAMPLE.ORG",
         "passwordXX!",
         KADM5_PASS_Q_CLASS,
-        "password must contain a number",
+        "Password must contain a number",
+        0,
     },
     {
 
@@ -44,7 +50,8 @@ const struct password_test classes_tests[] = {
         "test@EXAMPLE.ORG",
         "passwordXX9",
         KADM5_PASS_Q_CLASS,
-        "password must contain a space or punctuation character",
+        "Password must contain a space or punctuation character",
+        0,
     },
     {
 
@@ -53,6 +60,7 @@ const struct password_test classes_tests[] = {
         "passwordX9!",
         0,
         NULL,
+        0,
     },
     {
 
@@ -61,6 +69,7 @@ const struct password_test classes_tests[] = {
         "pass wordX9",
         0,
         NULL,
+        0,
     },
     {
 
@@ -68,7 +77,8 @@ const struct password_test classes_tests[] = {
         "test@EXAMPLE.ORG",
         "PASSWORD98!WORD",
         KADM5_PASS_Q_CLASS,
-        "password must contain a lowercase letter",
+        "Password must contain a lowercase letter",
+        0,
     },
     {
 
@@ -76,7 +86,8 @@ const struct password_test classes_tests[] = {
         "test@EXAMPLE.ORG",
         "password98!word",
         KADM5_PASS_Q_CLASS,
-        "password must contain an uppercase letter",
+        "Password must contain an uppercase letter",
+        0,
     },
     {
 
@@ -84,7 +95,8 @@ const struct password_test classes_tests[] = {
         "test@EXAMPLE.ORG",
         "passwordXX!word",
         KADM5_PASS_Q_CLASS,
-        "password must contain a number",
+        "Password must contain a number",
+        0,
     },
     {
 
@@ -93,6 +105,7 @@ const struct password_test classes_tests[] = {
         "passwordXX9w",
         0,
         NULL,
+        0,
     },
     {
 
@@ -101,6 +114,7 @@ const struct password_test classes_tests[] = {
         "passwordXX9word",
         0,
         NULL,
+        0,
     },
     {
 
@@ -109,6 +123,7 @@ const struct password_test classes_tests[] = {
         "passwordX9!word",
         0,
         NULL,
+        0,
     },
     {
 
@@ -117,6 +132,7 @@ const struct password_test classes_tests[] = {
         "pass wordX9word",
         0,
         NULL,
+        0,
     },
     {
 
@@ -124,7 +140,8 @@ const struct password_test classes_tests[] = {
         "test@EXAMPLE.ORG",
         "PASSWORD98!WORDWORD",
         KADM5_PASS_Q_CLASS,
-        "password must contain a lowercase letter",
+        "Password must contain a lowercase letter",
+        0,
     },
     {
 
@@ -132,7 +149,8 @@ const struct password_test classes_tests[] = {
         "test@EXAMPLE.ORG",
         "password98!wordword",
         KADM5_PASS_Q_CLASS,
-        "password must contain an uppercase letter",
+        "Password must contain an uppercase letter",
+        0,
     },
     {
 
@@ -141,6 +159,7 @@ const struct password_test classes_tests[] = {
         "passwordXX!wordw",
         0,
         NULL,
+        0,
     },
     {
 
@@ -149,6 +168,7 @@ const struct password_test classes_tests[] = {
         "passwordXX!wordword",
         0,
         NULL,
+        0,
     },
     {
 
@@ -157,6 +177,7 @@ const struct password_test classes_tests[] = {
         "passwordXX9wordword",
         0,
         NULL,
+        0,
     },
     {
 
@@ -165,6 +186,7 @@ const struct password_test classes_tests[] = {
         "passwordX9!wordword",
         0,
         NULL,
+        0,
     },
     {
 
@@ -173,6 +195,7 @@ const struct password_test classes_tests[] = {
         "pass wordX9wordword",
         0,
         NULL,
+        0,
     },
     {
 
@@ -181,6 +204,7 @@ const struct password_test classes_tests[] = {
         "PASSWORD98!WORDWORDW",
         0,
         NULL,
+        0,
     },
     {
 
@@ -189,6 +213,7 @@ const struct password_test classes_tests[] = {
         "password98!wordwordw",
         0,
         NULL,
+        0,
     },
     {
 
@@ -197,6 +222,7 @@ const struct password_test classes_tests[] = {
         "passwordXX!wordwordw",
         0,
         NULL,
+        0,
     },
     {
 
@@ -205,6 +231,7 @@ const struct password_test classes_tests[] = {
         "passwordXX9wordwordw",
         0,
         NULL,
+        0,
     },
     {
 
@@ -213,6 +240,7 @@ const struct password_test classes_tests[] = {
         "passwordX9!wordwordw",
         0,
         NULL,
+        0,
     },
     {
 
@@ -221,5 +249,42 @@ const struct password_test classes_tests[] = {
         "pass wordX9wordwordw",
         0,
         NULL,
+        0,
+    },
+    {
+
+        "only lowercase (24)",
+        "test@EXAMPLE.ORG",
+        "alllowercasewithclassreq",
+        KADM5_PASS_Q_CLASS,
+        "Password must contain 3 types of characters (lowercase, uppercase, numbers, symbols)",
+        0,
+    },
+    {
+
+        "lower and uppercase (24)",
+        "test@EXAMPLE.ORG",
+        "LowerUprcasewithclassreq",
+        KADM5_PASS_Q_CLASS,
+        "Password must contain 3 types of characters (lowercase, uppercase, numbers, symbols)",
+        0,
+    },
+    {
+
+        "lower, uppercase, symbols (24)",
+        "test@EXAMPLE.ORG",
+        "LowerUp!casewithclassreq",
+        0,
+        NULL,
+        0,
+    },
+    {
+
+        "only lowercase (25)",
+        "test@EXAMPLE.ORG",
+        "alllowercasewithclassreqr",
+        0,
+        NULL,
+        0,
     },
 };