[rt-commit] r152 - in /redwax-tool/trunk: ChangeLog redwax-tool.c
rt-commit at redwax.eu
rt-commit at redwax.eu
Wed Aug 23 00:10:05 CEST 2023
Author: minfrin at redwax.eu
Date: Wed Aug 23 00:10:04 2023
New Revision: 152
Log:
Filter-threshold becomes metadata-threshold.
Modified:
redwax-tool/trunk/ChangeLog
redwax-tool/trunk/redwax-tool.c
Modified: redwax-tool/trunk/ChangeLog
==============================================================================
--- redwax-tool/trunk/ChangeLog (original)
+++ redwax-tool/trunk/ChangeLog Wed Aug 23 00:10:04 2023
@@ -5,7 +5,7 @@
quiet flag is set. [Graham Leggett]
*) Add --filter-date to specify the date for verification
- if not today. Add --filter-threshold to indicate days
+ if not today. Add --metadata-threshold to indicate days
before expiry we should treat as a warning. Add the
error, warning, and status fields to validity in
certificate metadata showing days to and from expiry.
Modified: redwax-tool/trunk/redwax-tool.c
==============================================================================
--- redwax-tool/trunk/redwax-tool.c (original)
+++ redwax-tool/trunk/redwax-tool.c Wed Aug 23 00:10:04 2023
@@ -173,39 +173,39 @@
#define REDWAX_TOOL_FILTER_IP 263
#define REDWAX_TOOL_FILTER_CURRENT 264
#define REDWAX_TOOL_FILTER_DATE 265
-#define REDWAX_TOOL_FILTER_THRESHOLD 266
-#define REDWAX_TOOL_CERT_OUT 267
-#define REDWAX_TOOL_NO_CERT_OUT 268
-#define REDWAX_TOOL_CHAIN_OUT 269
-#define REDWAX_TOOL_NO_CHAIN_OUT 270
-#define REDWAX_TOOL_ROOT_OUT 271
-#define REDWAX_TOOL_NO_ROOT_OUT 272
-#define REDWAX_TOOL_TRUST_OUT 273
-#define REDWAX_TOOL_NO_TRUST_OUT 274
-#define REDWAX_TOOL_CRL_OUT 275
-#define REDWAX_TOOL_NO_CRL_OUT 276
-#define REDWAX_TOOL_PARAM_OUT 277
-#define REDWAX_TOOL_NO_PARAM_OUT 278
-#define REDWAX_TOOL_KEY_IN 279
-#define REDWAX_TOOL_NO_KEY_IN 280
-#define REDWAX_TOOL_KEY_OUT 281
-#define REDWAX_TOOL_NO_KEY_OUT 282
-#define REDWAX_TOOL_AUTO_OUT 283
-#define REDWAX_TOOL_NO_AUTO_OUT 284
-#define REDWAX_TOOL_FILTER_VERIFY_PARAM 285
-#define REDWAX_TOOL_SECRET_SUFFIX_IN 286
-#define REDWAX_TOOL_SECRET_SUFFIX_OUT 287
-#define REDWAX_TOOL_SECRET_TOKEN_IN 288
-#define REDWAX_TOOL_SECRET_TOKEN_OUT 289
-#define REDWAX_TOOL_LABEL_OUT 290
-#define REDWAX_TOOL_NSS_OUT 291
-#define REDWAX_TOOL_NSS_SLOT_OUT 292
-#define REDWAX_TOOL_DER_OUT 293
-#define REDWAX_TOOL_PEM_OUT 294
-#define REDWAX_TOOL_PKCS12_OUT 295
-#define REDWAX_TOOL_PKCS11_OUT 296
-#define REDWAX_TOOL_PKCS11_MODULE_OUT 297
-#define REDWAX_TOOL_METADATA_OUT 298
+#define REDWAX_TOOL_CERT_OUT 266
+#define REDWAX_TOOL_NO_CERT_OUT 267
+#define REDWAX_TOOL_CHAIN_OUT 268
+#define REDWAX_TOOL_NO_CHAIN_OUT 269
+#define REDWAX_TOOL_ROOT_OUT 270
+#define REDWAX_TOOL_NO_ROOT_OUT 271
+#define REDWAX_TOOL_TRUST_OUT 272
+#define REDWAX_TOOL_NO_TRUST_OUT 273
+#define REDWAX_TOOL_CRL_OUT 274
+#define REDWAX_TOOL_NO_CRL_OUT 275
+#define REDWAX_TOOL_PARAM_OUT 276
+#define REDWAX_TOOL_NO_PARAM_OUT 277
+#define REDWAX_TOOL_KEY_IN 278
+#define REDWAX_TOOL_NO_KEY_IN 279
+#define REDWAX_TOOL_KEY_OUT 280
+#define REDWAX_TOOL_NO_KEY_OUT 281
+#define REDWAX_TOOL_AUTO_OUT 282
+#define REDWAX_TOOL_NO_AUTO_OUT 283
+#define REDWAX_TOOL_FILTER_VERIFY_PARAM 284
+#define REDWAX_TOOL_SECRET_SUFFIX_IN 285
+#define REDWAX_TOOL_SECRET_SUFFIX_OUT 286
+#define REDWAX_TOOL_SECRET_TOKEN_IN 287
+#define REDWAX_TOOL_SECRET_TOKEN_OUT 288
+#define REDWAX_TOOL_LABEL_OUT 289
+#define REDWAX_TOOL_NSS_OUT 290
+#define REDWAX_TOOL_NSS_SLOT_OUT 291
+#define REDWAX_TOOL_DER_OUT 292
+#define REDWAX_TOOL_PEM_OUT 293
+#define REDWAX_TOOL_PKCS12_OUT 294
+#define REDWAX_TOOL_PKCS11_OUT 295
+#define REDWAX_TOOL_PKCS11_MODULE_OUT 296
+#define REDWAX_TOOL_METADATA_OUT 297
+#define REDWAX_TOOL_METADATA_THRESHOLD 298
#define REDWAX_TOOL_FORMAT_OUT 299
#define REDWAX_TOOL_JWKS_OUT 300
#define REDWAX_TOOL_TEXT_OUT 301
@@ -259,7 +259,6 @@
{ "filter-verify-params", REDWAX_TOOL_FILTER_VERIFY_PARAM, 1,
" --filter-verify-params=name\tSpecify the name of the set of parameters used\n\t\t\t\tfor verification. If unspecified, set to\n\t\t\t\t'default'." },
{ "filter-date", REDWAX_TOOL_FILTER_DATE, 1, " --filter-date=date\t\tSet the date to be used for certificate\n\t\t\t\tverification. If unset, it will default to the\n\t\t\t\tcurrent time. Date format is generalized time\n\t\t\t\tsyntax as defined in RFC 4517 section 3.3.13." },
- { "filter-threshold", REDWAX_TOOL_FILTER_THRESHOLD, 1, " --filter-threshold=days\tSet the threshold in days below which an expiry\n\t\t\t\tbecomes a warning. If unset, defaults to no\n\t\t\t\twarning." },
{ "text-out", REDWAX_TOOL_TEXT_OUT, 0,
" --text-out\t\t\tInclude additional text in certificate PEM and\n\t\t\t\tmetadata output." },
{ "no-text-out", REDWAX_TOOL_NO_TEXT_OUT, 0,
@@ -308,6 +307,7 @@
{ "pkcs11-out", REDWAX_TOOL_PKCS11_OUT, 1, " --pkcs11-out=url\t\tWrite certificates, intermediate certificates,\n\t\t\t\troot certificates, crls, and keys into a PKCS11\n\t\t\t\ttoken identified by the given url." },
{ "pkcs11-module-out", REDWAX_TOOL_PKCS11_MODULE_OUT, 1, " --pkcs11-module-out=mod\tSpecify the name of the PKCS11 module to be used,\n\t\t\t\toverriding system defaults. If relative, use the\n\t\t\t\tdefault PKCS11 module path, otherwise specify the\n\t\t\t\tabsolute path. Include the extension of the module." },
{ "metadata-out", REDWAX_TOOL_METADATA_OUT, 1, " --metadata-out=file\t\tWrite metadata of each certificate and key to the\n\t\t\t\tgiven file in the format given by the format\n\t\t\t\tparameter." },
+ { "metadata-threshold", REDWAX_TOOL_METADATA_THRESHOLD, 1, " --metadata-threshold=days\tSet the threshold in days below which an expiry\n\t\t\t\tbecomes a warning. If unset, defaults to no\n\t\t\t\twarning." },
{ "format-out", REDWAX_TOOL_FORMAT_OUT, 1, " --format-out=xml|json|yaml\tFormat of output metadata." },
{ "user-in", REDWAX_TOOL_USER_IN, 1, " --user-in=user\t\tUse the privileges of this user when reading\n\t\t\t\tcertificates and keys." },
{ "user-out", REDWAX_TOOL_USER_OUT, 1, " --user-out=user\t\tUse the privileges of this user when writing\n\t\t\t\tcertificates and keys." },
@@ -2503,12 +2503,6 @@
}
break;
}
- case REDWAX_TOOL_FILTER_THRESHOLD: {
- if (redwax_set_threshold(r, optarg)) {
- return REDWAX_EXIT_OPTIONS;
- }
- break;
- }
}
}
@@ -2669,6 +2663,12 @@
}
case REDWAX_TOOL_METADATA_OUT: {
redwax_metadata_out(r, optarg);
+ break;
+ }
+ case REDWAX_TOOL_METADATA_THRESHOLD: {
+ if (redwax_set_threshold(r, optarg)) {
+ return REDWAX_EXIT_OPTIONS;
+ }
break;
}
case REDWAX_TOOL_SSH_PUBLIC_OUT: {
More information about the rt-commit
mailing list