diff options
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/extra/m_ssl_gnutls.cpp | 3 | ||||
-rw-r--r-- | src/modules/extra/m_ssl_openssl.cpp | 9 | ||||
-rw-r--r-- | src/modules/m_sslinfo.cpp | 6 |
3 files changed, 17 insertions, 1 deletions
diff --git a/src/modules/extra/m_ssl_gnutls.cpp b/src/modules/extra/m_ssl_gnutls.cpp index 813a8ecfa..2f4acf3f0 100644 --- a/src/modules/extra/m_ssl_gnutls.cpp +++ b/src/modules/extra/m_ssl_gnutls.cpp @@ -703,6 +703,9 @@ class ModuleSSLGnuTLS : public Module if (ret > 0) { recvq.append(buffer, ret); + // Schedule a read if there is still data in the GnuTLS buffer + if (gnutls_record_check_pending(session->sess) > 0) + ServerInstance->SE->ChangeEventMask(user, FD_ADD_TRIAL_READ); return 1; } else if (ret == GNUTLS_E_AGAIN || ret == GNUTLS_E_INTERRUPTED) diff --git a/src/modules/extra/m_ssl_openssl.cpp b/src/modules/extra/m_ssl_openssl.cpp index b21091d3f..9e6472ac3 100644 --- a/src/modules/extra/m_ssl_openssl.cpp +++ b/src/modules/extra/m_ssl_openssl.cpp @@ -591,8 +591,15 @@ class ModuleSSLOpenSSL : public Module if (ret > 0) { recvq.append(buffer, ret); + + int mask = 0; + // Schedule a read if there is still data in the OpenSSL buffer + if (SSL_pending(session->sess) > 0) + mask |= FD_ADD_TRIAL_READ; if (session->data_to_write) - ServerInstance->SE->ChangeEventMask(user, FD_WANT_POLL_READ | FD_WANT_SINGLE_WRITE); + mask |= FD_WANT_POLL_READ | FD_WANT_SINGLE_WRITE; + if (mask != 0) + ServerInstance->SE->ChangeEventMask(user, mask); return 1; } else if (ret == 0) diff --git a/src/modules/m_sslinfo.cpp b/src/modules/m_sslinfo.cpp index 2bfe0e1c4..083ac0f04 100644 --- a/src/modules/m_sslinfo.cpp +++ b/src/modules/m_sslinfo.cpp @@ -180,6 +180,9 @@ class ModuleSSLInfo : public Module if (i != ServerInstance->Config->oper_blocks.end()) { OperInfo* ifo = i->second; + if (!ifo->oper_block) + return MOD_RES_PASSTHRU; + ssl_cert* cert = cmd.CertExt.get(user); if (ifo->oper_block->getBool("sslonly") && !cert) @@ -220,6 +223,9 @@ class ModuleSSLInfo : public Module for(OperIndex::iterator i = ServerInstance->Config->oper_blocks.begin(); i != ServerInstance->Config->oper_blocks.end(); i++) { OperInfo* ifo = i->second; + if (!ifo->oper_block) + continue; + std::string fp = ifo->oper_block->getString("fingerprint"); if (fp == cert->fingerprint && ifo->oper_block->getBool("autologin")) user->Oper(ifo); |