diff options
| author | 2021-07-24 11:32:09 +0100 | |
|---|---|---|
| committer | 2021-07-24 11:34:10 +0100 | |
| commit | f4c257e1b20d285b27f5c2942d03c142eee82c09 (patch) | |
| tree | 7477a22cf109a1de3ac873986a67c66dfdece112 /src/modules | |
| parent | Clean up the routing code in the ctables header. (diff) | |
| parent | Also increase maxquit from 255 to 300. (diff) | |
Merge branch 'insp3' into master.
Diffstat (limited to 'src/modules')
| -rw-r--r-- | src/modules/extra/m_ssl_openssl.cpp | 2 | ||||
| -rw-r--r-- | src/modules/m_password_hash.cpp | 14 |
2 files changed, 12 insertions, 4 deletions
diff --git a/src/modules/extra/m_ssl_openssl.cpp b/src/modules/extra/m_ssl_openssl.cpp index 0d8569ceb..6c656384a 100644 --- a/src/modules/extra/m_ssl_openssl.cpp +++ b/src/modules/extra/m_ssl_openssl.cpp @@ -375,7 +375,7 @@ namespace OpenSSL } const std::string ciphersuites = tag->getString("ciphersuites"); - if (!ciphers.empty()) + if (!ciphersuites.empty()) { #if OPENSSL_VERSION_NUMBER >= 0x10101000L if ((!ctx.SetCiphersuites(ciphersuites)) || (!clientctx.SetCiphersuites(ciphersuites))) diff --git a/src/modules/m_password_hash.cpp b/src/modules/m_password_hash.cpp index a9ef722e5..0c73ddf38 100644 --- a/src/modules/m_password_hash.cpp +++ b/src/modules/m_password_hash.cpp @@ -69,9 +69,17 @@ class CommandMkpasswd : public Command return CmdResult::FAILURE; } - std::string hexsum = hp->Generate(parameters[1]); - user->WriteNotice(parameters[0] + " hashed password for " + parameters[1] + " is " + hexsum); - return CmdResult::SUCCESS; + try + { + std::string hexsum = hp->Generate(parameters[1]); + user->WriteNotice(parameters[0] + " hashed password for " + parameters[1] + " is " + hexsum); + return CmdResult::SUCCESS; + } + catch (const ModuleException& error) + { + user->WriteNotice("*** " + name + ": " + error.GetReason()); + return CmdResult::FAILURE; + } } }; |
