util: add literal operators for duration types
Change-Id: I007fa61c80e535c6e4b12e85a32eeeee62fecc3c
Refs: #4468
diff --git a/tools/ndnsec/cert-gen.cpp b/tools/ndnsec/cert-gen.cpp
index be0c1e0..00f7667 100644
--- a/tools/ndnsec/cert-gen.cpp
+++ b/tools/ndnsec/cert-gen.cpp
@@ -112,7 +112,7 @@
}
if (vm.count("not-after") == 0) {
- notAfter = notBefore + time::days(365);
+ notAfter = notBefore + 365_days;
}
else {
notAfter = time::fromIsoString(notAfterStr.substr(0, 8) + "T" + notAfterStr.substr(8, 6));
@@ -156,7 +156,7 @@
cert.setContent(certRequest.getContent());
// @TODO add ability to customize
- cert.setFreshnessPeriod(time::hours(1));
+ cert.setFreshnessPeriod(1_h);
SignatureInfo signatureInfo;
signatureInfo.setValidityPeriod(security::ValidityPeriod(notBefore, notAfter));