aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorGravatar Sadie Powell2025-10-26 15:12:17 +0000
committerGravatar Sadie Powell2025-10-26 15:18:49 +0000
commitd424d2ef710b4f45c06bfad79089bd998d5a35f9 (patch)
tree34197b740e7fa0912dc50e50efb15a80eb22c1f3 /include
parentDeprecate the contents of the SSLClientCert namespace. (diff)
Fix allowing expired client certificates in some cases.
This fixes a regression from v3.
Diffstat (limited to 'include')
-rw-r--r--include/modules/ssl.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/modules/ssl.h b/include/modules/ssl.h
index 4526d7c9f..ff2646e8b 100644
--- a/include/modules/ssl.h
+++ b/include/modules/ssl.h
@@ -314,7 +314,7 @@ public:
return nullptr;
auto* cert = ssliohook->GetCertificate();
- if (!cert)
+ if (!cert || !cert->IsUsable())
return "";
return cert->GetFingerprint();
@@ -355,7 +355,7 @@ public:
std::string GetFingerprint(User* user)
{
ssl_cert* cert = GetCertificate(user);
- if (cert)
+ if (cert && cert->IsUsable())
return cert->GetFingerprint();
return "";
}
@@ -368,7 +368,7 @@ public:
std::vector<std::string> GetFingerprints(User* user)
{
ssl_cert* cert = GetCertificate(user);
- if (cert)
+ if (cert && cert->IsUsable())
return cert->GetFingerprints();
return {};
}