aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules/extra
diff options
context:
space:
mode:
authorGravatar Sadie Powell2021-07-01 12:33:51 +0100
committerGravatar Sadie Powell2021-07-01 12:33:51 +0100
commitd95d7fc4f574b4ce3593b6684dd9fd738c40fcab (patch)
tree88bc789896945fac5b82bc19dd4b8e440e590da6 /src/modules/extra
parentRequire that hideserver is set to a valid hostname. (diff)
parentAllow reloading SSL profiles on rehash. (diff)
Merge branch 'insp3' into master.
Diffstat (limited to 'src/modules/extra')
-rw-r--r--src/modules/extra/m_mysql.cpp6
-rw-r--r--src/modules/extra/m_pgsql.cpp2
-rw-r--r--src/modules/extra/m_ssl_gnutls.cpp2
-rw-r--r--src/modules/extra/m_ssl_mbedtls.cpp2
-rw-r--r--src/modules/extra/m_ssl_openssl.cpp22
5 files changed, 17 insertions, 17 deletions
diff --git a/src/modules/extra/m_mysql.cpp b/src/modules/extra/m_mysql.cpp
index ed26f3ab6..9df2bde0c 100644
--- a/src/modules/extra/m_mysql.cpp
+++ b/src/modules/extra/m_mysql.cpp
@@ -56,9 +56,9 @@
/* THE NONBLOCKING MYSQL API!
*
- * MySQL provides no nonblocking (asyncronous) API of its own, and its developers recommend
+ * MySQL provides no nonblocking (asynchronous) API of its own, and its developers recommend
* that instead, you should thread your program. This is what i've done here to allow for
- * asyncronous SQL requests via mysql. The way this works is as follows:
+ * asynchronous SQL requests via mysql. The way this works is as follows:
*
* The module spawns a thread via class Thread, and performs its mysql queries in this thread,
* using a queue with priorities. There is a mutex on either end which prevents two threads
@@ -81,7 +81,7 @@
* threadsafe. This module is designed to be threadsafe and is careful with its use of threads,
* however, if we were to call a module's OnRequest even from within a thread which was not the
* one the module was originally instantiated upon, there is a chance of all hell breaking loose
- * if a module is ever put in a re-enterant state (stack corruption could occur, crashes, data
+ * if a module is ever put in a reentrant state (stack corruption could occur, crashes, data
* corruption, and worse, so DONT think about it until the day comes when InspIRCd is 100%
* guaranteed threadsafe!)
*/
diff --git a/src/modules/extra/m_pgsql.cpp b/src/modules/extra/m_pgsql.cpp
index b61b96b3c..a5eb3c0ec 100644
--- a/src/modules/extra/m_pgsql.cpp
+++ b/src/modules/extra/m_pgsql.cpp
@@ -93,7 +93,7 @@ struct QueueItem
/** PgSQLresult is a subclass of the mostly-pure-virtual class SQLresult.
* All SQL providers must create their own subclass and define it's methods using that
- * database library's data retriveal functions. The aim is to avoid a slow and inefficient process
+ * database library's data retrieval functions. The aim is to avoid a slow and inefficient process
* of converting all data to a common format before it reaches the result structure. This way
* data is passes to the module nearly as directly as if it was using the API directly itself.
*/
diff --git a/src/modules/extra/m_ssl_gnutls.cpp b/src/modules/extra/m_ssl_gnutls.cpp
index d13bd0cfd..bb90538f7 100644
--- a/src/modules/extra/m_ssl_gnutls.cpp
+++ b/src/modules/extra/m_ssl_gnutls.cpp
@@ -662,7 +662,7 @@ class GnuTLSIOHook : public SSLIOHook
}
else
{
- // Change the seesion state
+ // Change the session state
this->status = ISSL_HANDSHAKEN;
VerifyCertificate();
diff --git a/src/modules/extra/m_ssl_mbedtls.cpp b/src/modules/extra/m_ssl_mbedtls.cpp
index 89ffed0f9..3f1c8840f 100644
--- a/src/modules/extra/m_ssl_mbedtls.cpp
+++ b/src/modules/extra/m_ssl_mbedtls.cpp
@@ -534,7 +534,7 @@ class mbedTLSIOHook : public SSLIOHook
int ret = mbedtls_ssl_handshake(&sess);
if (ret == 0)
{
- // Change the seesion state
+ // Change the session state
this->status = ISSL_HANDSHAKEN;
VerifyCertificate();
diff --git a/src/modules/extra/m_ssl_openssl.cpp b/src/modules/extra/m_ssl_openssl.cpp
index 9091d11fe..0d8569ceb 100644
--- a/src/modules/extra/m_ssl_openssl.cpp
+++ b/src/modules/extra/m_ssl_openssl.cpp
@@ -286,7 +286,7 @@ namespace OpenSSL
/** OpenSSL makes us have two contexts, one for servers and one for clients
*/
Context ctx;
- Context clictx;
+ Context clientctx;
/** Digest to use when generating fingerprints
*/
@@ -352,11 +352,11 @@ namespace OpenSSL
: name(profilename)
, dh(ServerInstance->Config->Paths.PrependConfig(tag->getString("dhfile", "dhparams.pem", 1)))
, ctx(SSL_CTX_new(SSLv23_server_method()))
- , clictx(SSL_CTX_new(SSLv23_client_method()))
+ , clientctx(SSL_CTX_new(SSLv23_client_method()))
, allowrenego(tag->getBool("renegotiation")) // Disallow by default
, outrecsize(static_cast<unsigned int>(tag->getUInt("outrecsize", 2048, 512, 16384)))
{
- if ((!ctx.SetDH(dh)) || (!clictx.SetDH(dh)))
+ if ((!ctx.SetDH(dh)) || (!clientctx.SetDH(dh)))
throw Exception("Couldn't set DH parameters");
const std::string hash = tag->getString("hash", "sha256", 1);
@@ -367,7 +367,7 @@ namespace OpenSSL
const std::string ciphers = tag->getString("ciphers");
if (!ciphers.empty())
{
- if ((!ctx.SetCiphers(ciphers)) || (!clictx.SetCiphers(ciphers)))
+ if ((!ctx.SetCiphers(ciphers)) || (!clientctx.SetCiphers(ciphers)))
{
ERR_print_errors_cb(error_callback, this);
throw Exception("Can't set cipher list to \"" + ciphers + "\" " + lasterr);
@@ -378,7 +378,7 @@ namespace OpenSSL
if (!ciphers.empty())
{
#if OPENSSL_VERSION_NUMBER >= 0x10101000L
- if ((!ctx.SetCiphersuites(ciphersuites)) || (!clictx.SetCiphersuites(ciphersuites)))
+ if ((!ctx.SetCiphersuites(ciphersuites)) || (!clientctx.SetCiphersuites(ciphersuites)))
{
ERR_print_errors_cb(error_callback, this);
throw Exception("Can't set ciphersuite list to \"" + ciphersuites + "\" " + lasterr);
@@ -395,20 +395,20 @@ namespace OpenSSL
#endif
SetContextOptions("server", tag, ctx);
- SetContextOptions("client", tag, clictx);
+ SetContextOptions("client", tag, clientctx);
/* Load our keys and certificates
* NOTE: OpenSSL's error logging API sucks, don't blame us for this clusterfuck.
*/
std::string filename = ServerInstance->Config->Paths.PrependConfig(tag->getString("certfile", "cert.pem", 1));
- if ((!ctx.SetCerts(filename)) || (!clictx.SetCerts(filename)))
+ if ((!ctx.SetCerts(filename)) || (!clientctx.SetCerts(filename)))
{
ERR_print_errors_cb(error_callback, this);
throw Exception("Can't read certificate file: " + lasterr);
}
filename = ServerInstance->Config->Paths.PrependConfig(tag->getString("keyfile", "key.pem", 1));
- if ((!ctx.SetPrivateKey(filename)) || (!clictx.SetPrivateKey(filename)))
+ if ((!ctx.SetPrivateKey(filename)) || (!clientctx.SetPrivateKey(filename)))
{
ERR_print_errors_cb(error_callback, this);
throw Exception("Can't read key file: " + lasterr);
@@ -416,7 +416,7 @@ namespace OpenSSL
// Load the CAs we trust
filename = ServerInstance->Config->Paths.PrependConfig(tag->getString("cafile", "ca.pem", 1));
- if ((!ctx.SetCA(filename)) || (!clictx.SetCA(filename)))
+ if ((!ctx.SetCA(filename)) || (!clientctx.SetCA(filename)))
{
ERR_print_errors_cb(error_callback, this);
ServerInstance->Logs.Log(MODNAME, LOG_DEFAULT, "Can't read CA list from %s. This is only a problem if you want to verify client certificates, otherwise it's safe to ignore this message. Error: %s", filename.c_str(), lasterr.c_str());
@@ -428,14 +428,14 @@ namespace OpenSSL
const std::string crlmode = tag->getString("crlmode", "chain", 1);
ctx.SetCRL(crlfile, crlpath, crlmode);
- clictx.SetVerifyCert();
+ clientctx.SetVerifyCert();
if (tag->getBool("requestclientcert", true))
ctx.SetVerifyCert();
}
const std::string& GetName() const { return name; }
SSL* CreateServerSession() { return ctx.CreateServerSession(); }
- SSL* CreateClientSession() { return clictx.CreateClientSession(); }
+ SSL* CreateClientSession() { return clientctx.CreateClientSession(); }
const EVP_MD* GetDigest() { return digest; }
bool AllowRenegotiation() const { return allowrenego; }
unsigned int GetOutgoingRecordSize() const { return outrecsize; }