summaryrefslogtreecommitdiff
path: root/src/modules/ssl.h
diff options
context:
space:
mode:
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2010-02-08 19:38:54 +0000
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2010-02-08 19:38:54 +0000
commit7cf132bc6a8251ad2d7ee73cdf5f019fe18d11a0 (patch)
tree278718539ff675cab67443b72be5cd9350d294a3 /src/modules/ssl.h
parente827892a1353e2954b7ac6595bb40d7c89950350 (diff)
Add <connect requiressl="trusted"> to force CA verification for clients on this block
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12401 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/ssl.h')
-rw-r--r--src/modules/ssl.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/modules/ssl.h b/src/modules/ssl.h
index 17fa6b3f6..5b1f03627 100644
--- a/src/modules/ssl.h
+++ b/src/modules/ssl.h
@@ -34,6 +34,8 @@ class ssl_cert : public refcountbase
std::string fingerprint;
bool trusted, invalid, unknownsigner, revoked;
+ ssl_cert() : trusted(false), invalid(true), unknownsigner(true), revoked(false) {}
+
/** Get certificate distinguished name
* @return Certificate DN
*/
@@ -104,6 +106,11 @@ class ssl_cert : public refcountbase
return revoked;
}
+ bool IsCAVerified()
+ {
+ return trusted && !invalid && !revoked && !unknownsigner && error.empty();
+ }
+
std::string GetMetaLine()
{
std::stringstream value;