]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
schema: add regular expression for tls date format
authorJason Ish <jason.ish@oisf.net>
Thu, 26 Jan 2023 20:37:54 +0000 (14:37 -0600)
committerVictor Julien <vjulien@oisf.net>
Sun, 29 Jan 2023 08:30:19 +0000 (09:30 +0100)
etc/schema.json

index 2334c4870843531ee32bab0760b3da2abac4db21..b59a46e89434db4ab180db4d48cd82d00f4b4c6b 100644 (file)
                             "type": "string"
                         },
                         "notafter": {
-                            "type": "string"
+                            "$ref": "#/$defs/tls_date"
                         },
                         "notbefore": {
-                            "type": "string"
+                            "$ref": "#/$defs/tls_date"
                         },
                         "serial": {
                             "type": "string"
                     "type": "string"
                 },
                 "notafter": {
-                    "type": "string"
+                    "$ref": "#/$defs/tls_date"
                 },
                 "notbefore": {
-                    "type": "string"
+                    "$ref": "#/$defs/tls_date"
                 },
                 "serial": {
                     "type": "string"
                 }
             },
             "additionalProperties": false
+        },
+        "tls_date": {
+            "$comment": "Definition for TLS date formats",
+            "type": "string",
+            "pattern": "^[1-2]\\d{3}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}$"
         }
     }
 }