aboutsummaryrefslogtreecommitdiffstats
path: root/doc/examples/ca.cpp
diff options
context:
space:
mode:
authorlloyd <[email protected]>2009-12-01 14:59:01 +0000
committerlloyd <[email protected]>2009-12-01 14:59:01 +0000
commit9ffe4441271ff41fd33fc3965c191e62bce36453 (patch)
tree34ea31314e94c4d51271b9b09506a9aa03eff881 /doc/examples/ca.cpp
parentf3c149bce5b5ddb527a072c2f34daaa993cdba94 (diff)
Update examples for changed/removed APIs, namely:
to_string -> std::to_string system_time -> std::chrono
Diffstat (limited to 'doc/examples/ca.cpp')
-rw-r--r--doc/examples/ca.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/doc/examples/ca.cpp b/doc/examples/ca.cpp
index f5eccdde9..8be0fa527 100644
--- a/doc/examples/ca.cpp
+++ b/doc/examples/ca.cpp
@@ -56,8 +56,13 @@ int main(int argc, char* argv[])
// (this example should be extended to show how)
// now sign the request
- X509_Time start_time(system_time());
- X509_Time end_time(system_time() + 365 * 60 * 60 * 24);
+ auto now = std::chrono::system_clock::now();
+
+ X509_Time start_time(now);
+
+ typedef std::chrono::duration<int, std::ratio<31556926>> years;
+
+ X509_Time end_time(now + years(1));
X509_Certificate new_cert = ca.sign_request(req, rng,
start_time, end_time);