diff options
author | Attila Molnar <attilamolnar@hush.com> | 2014-02-11 14:00:05 +0100 |
---|---|---|
committer | Attila Molnar <attilamolnar@hush.com> | 2014-02-11 14:00:05 +0100 |
commit | 87ce845b68a1a0314b3ce5dd61ee386f744b2f85 (patch) | |
tree | 482680e3eafa1445d5998c7acb32e7804ed40252 | |
parent | 6fb7507c5801ed0a5e819ccf5c37da396fa21283 (diff) |
m_sqlauth Allow the client certificate fingerprint to be used in the SQL query
Idea by @m4z
-rw-r--r-- | src/modules/m_sqlauth.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/modules/m_sqlauth.cpp b/src/modules/m_sqlauth.cpp index 0c055a085..1ffb3305a 100644 --- a/src/modules/m_sqlauth.cpp +++ b/src/modules/m_sqlauth.cpp @@ -20,6 +20,7 @@ #include "inspircd.h" #include "modules/sql.h" #include "modules/hash.h" +#include "modules/ssl.h" enum AuthState { AUTH_STATE_NONE = 0, @@ -129,6 +130,9 @@ class ModuleSQLAuth : public Module if (sha256) userinfo["sha256pass"] = sha256->hexsum(user->password); + const std::string certfp = SSLClientCert::GetFingerprint(&user->eh); + userinfo["certfp"] = certfp; + SQL->submit(new AuthQuery(this, user->uuid, pendingExt, verbose), freeformquery, userinfo); return MOD_RES_PASSTHRU; |