aboutsummaryrefslogtreecommitdiffstats
path: root/include/modules
diff options
context:
space:
mode:
authorGravatar Sadie Powell2023-03-01 20:07:16 +0000
committerGravatar Sadie Powell2023-03-01 20:45:07 +0000
commit5a24fb0f61dec76b7a022d8da37fc1c222d63d95 (patch)
treec4f566c7d4f4c8a6cf656c7655f01dc8719f62a7 /include/modules
parentFix destroying duplicate channels when the casemapping changes. (diff)
Add client cert activation/expiration times to the ssl_cert class.
Diffstat (limited to 'include/modules')
-rw-r--r--include/modules/ssl.h27
1 files changed, 26 insertions, 1 deletions
diff --git a/include/modules/ssl.h b/include/modules/ssl.h
index 603fe9305..5b60ac9a6 100644
--- a/include/modules/ssl.h
+++ b/include/modules/ssl.h
@@ -47,8 +47,17 @@ class ssl_cert : public refcountbase
std::string error;
std::string fingerprint;
bool trusted, invalid, unknownsigner, revoked;
+ time_t activation, expiration;
- ssl_cert() : trusted(false), invalid(true), unknownsigner(true), revoked(false) {}
+ ssl_cert()
+ : trusted(false)
+ , invalid(true)
+ , unknownsigner(true)
+ , revoked(false)
+ , activation(0)
+ , expiration(0)
+ {
+ }
/** Get certificate distinguished name
* @return Certificate DN
@@ -137,6 +146,22 @@ class ssl_cert : public refcountbase
return IsUsable() && trusted && !unknownsigner;
}
+ /** Retrieves the client certificate activation time.
+ * @param The time the client certificate was activated or 0 on error.
+ */
+ time_t GetActivationTime() const
+ {
+ return activation;
+ }
+
+ /** Retrieves the client certificate expiration time.
+ * @param The time the client certificate will expire or 0 on error.
+ */
+ time_t GetExpirationTime() const
+ {
+ return expiration;
+ }
+
std::string GetMetaLine() const
{
std::stringstream value;