summaryrefslogtreecommitdiff
path: root/src/modules/extra/m_ssl_openssl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/extra/m_ssl_openssl.cpp')
-rw-r--r--src/modules/extra/m_ssl_openssl.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/modules/extra/m_ssl_openssl.cpp b/src/modules/extra/m_ssl_openssl.cpp
index 53a0e241f..f468e3c53 100644
--- a/src/modules/extra/m_ssl_openssl.cpp
+++ b/src/modules/extra/m_ssl_openssl.cpp
@@ -407,6 +407,20 @@ class ModuleSSLOpenSSL : public Module
return "OK";
}
}
+ else if (strcmp("GET_FP", request->GetId()) == 0)
+ {
+ if (ISR->Sock->GetFd() > -1)
+ {
+ issl_session* session = &sessions[ISR->Sock->GetFd()];
+ if (session->sess)
+ {
+ Extensible* ext = ISR->Sock;
+ ssl_cert* certinfo;
+ if (ext->GetExt("ssl_cert",certinfo))
+ return certinfo->GetFingerprint().c_str();
+ }
+ }
+ }
return NULL;
}