summaryrefslogtreecommitdiff
path: root/src/modules/m_jumpserver.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/m_jumpserver.cpp')
-rw-r--r--src/modules/m_jumpserver.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/modules/m_jumpserver.cpp b/src/modules/m_jumpserver.cpp
index 682e353d2..fc13a831c 100644
--- a/src/modules/m_jumpserver.cpp
+++ b/src/modules/m_jumpserver.cpp
@@ -38,8 +38,11 @@ class CommandJumpserver : public Command
std::string reason;
int port;
int sslport;
+ UserCertificateAPI sslapi;
- CommandJumpserver(Module* Creator) : Command(Creator, "JUMPSERVER", 0, 4)
+ CommandJumpserver(Module* Creator)
+ : Command(Creator, "JUMPSERVER", 0, 4)
+ , sslapi(Creator)
{
flags_needed = 'o';
syntax = "[<server> <port>[:<sslport>] <+/-an> <reason>]";
@@ -146,7 +149,7 @@ class CommandJumpserver : public Command
int GetPort(LocalUser* user)
{
- int p = (SSLIOHook::IsSSL(&user->eh) ? sslport : port);
+ int p = (sslapi && sslapi->GetCertificate(user) ? sslport : port);
if (p == 0)
p = user->GetServerPort();
return p;