diff options
| author | 2025-10-26 15:21:02 +0000 | |
|---|---|---|
| committer | 2025-10-26 15:24:15 +0000 | |
| commit | 455fd9be2edab7809d0762b0f0cf3c77454efc14 (patch) | |
| tree | 6b5adc7fbe6cc06df71752a569fea987d36d8a8c /modules/sslinfo.cpp | |
| parent | Merge branch 'insp4' into master. (diff) | |
| parent | Fix a typo in a previous commit's deprecation message. (diff) | |
Merge branch 'insp4' into master.
Diffstat (limited to 'modules/sslinfo.cpp')
| -rw-r--r-- | modules/sslinfo.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/modules/sslinfo.cpp b/modules/sslinfo.cpp index c21cbfbae..5de31e480 100644 --- a/modules/sslinfo.cpp +++ b/modules/sslinfo.cpp @@ -163,7 +163,11 @@ public: if (!luser || nosslext.Get(luser)) return nullptr; - cert = SSLClientCert::GetCertificate(&luser->eh); + auto* ssliohook = SSLIOHook::IsSSL(&luser->eh); + if (!ssliohook) + return nullptr; + + cert = ssliohook->GetCertificate(); if (!cert) return nullptr; @@ -371,7 +375,7 @@ public: whois.SendLine(RPL_WHOISSECURE, "is using a secure connection"); ssl_cert* cert = cmd.sslapi.GetCertificate(whois.GetTarget()); - if (cert) + if (!cert || !cert->IsUsable()) { if (!cmd.operonlyfp || whois.IsSelfWhois() || whois.GetSource()->IsOper()) { @@ -413,7 +417,7 @@ public: } const std::string fingerprint = oper->GetConfig()->getString("fingerprint"); - if (!fingerprint.empty() && (!cert || !MatchFingerprint(cert, fingerprint))) + if (!fingerprint.empty() && (!cert || !cert->IsUsable() || !MatchFingerprint(cert, fingerprint))) { if (!automatic) { |
