Module: kamailio
Branch: master
Commit: d0743460f68c0dfcb807319dc9e2247eb51ee1ba
URL: https://github.com/kamailio/kamailio/commit/d0743460f68c0dfcb807319dc9e2247…
Author: Henning Westerholt <hw(a)skalatan.de>
Committer: Henning Westerholt <hw(a)skalatan.de>
Date: 2019-10-07T10:49:16+02:00
tls: add cryptorand engine also to tls_mod and documentation, enable as default
---
Modified: src/modules/tls/doc/params.xml
Modified: src/modules/tls/tls_mod.c
---
Diff: https://github.com/kamailio/kamailio/commit/d0743460f68c0dfcb807319dc9e2247…
Patch: https://github.com/kamailio/kamailio/commit/d0743460f68c0dfcb807319dc9e2247…
---
diff --git a/src/modules/tls/doc/params.xml b/src/modules/tls/doc/params.xml
index 6028642b5f..72d3278ed7 100644
--- a/src/modules/tls/doc/params.xml
+++ b/src/modules/tls/doc/params.xml
@@ -1251,7 +1251,7 @@ end
is not designed for multi-process applications and can result in a crash.
Therefore set the PRNG engine to one of the options listed in this
section. If libssl 1.1.x (or newer) is detected at compile time, then
- the PRNG engine is set to "fastrand".
+ the PRNG engine is set to "cryptorand".
</para>
<para>
The following options are avaialble:
@@ -1259,10 +1259,13 @@ end
<itemizedlist>
<listitem><para>krand - use internal kam_rand() function</para></listitem>
<listitem><para>fastrand - use internal fastrand function</para></listitem>
+ <listitem><para>cryptorand - use internal cryptorand function</para></listitem>
</itemizedlist>
<para>
The default value is empty (not set) for libssl v1.0.x or older, and
- "fastrand" for libssl v1.1.x or newer.
+ "cryptorand" for libssl v1.1.x or newer. The krand and fastrand engines are
+ not recommended for production use, as they will not generate secure enough
+ random numbers.
</para>
<example>
<title>Set <varname>rand_engine</varname> parameter</title>
diff --git a/src/modules/tls/tls_mod.c b/src/modules/tls/tls_mod.c
index 75d8aa8fd2..5784ce4842 100644
--- a/src/modules/tls/tls_mod.c
+++ b/src/modules/tls/tls_mod.c
@@ -453,6 +453,9 @@ int ksr_rand_engine_param(modparam_t type, void* val)
} else if(reng->len == 8 && strncasecmp(reng->s, "fastrand", 8) == 0) {
LM_DBG("setting fastrand random engine\n");
RAND_set_rand_method(RAND_ksr_fastrand_method());
+ } else if (reng->len == 10 && strncasecmp(reng->s, "cryptorand", 10) == 0) {
+ LM_DBG("setting cryptorand random engine\n");
+ RAND_set_rand_method(RAND_ksr_cryptorand_method());
}
#endif
return 0;
@@ -564,7 +567,7 @@ int mod_register(char *path, int *dlflags, void *p1, void *p2)
#if OPENSSL_VERSION_NUMBER >= 0x10100000L
LM_DBG("setting fastrand random engine\n");
- RAND_set_rand_method(RAND_ksr_fastrand_method());
+ RAND_set_rand_method(RAND_ksr_cryptorand_method());
#endif
sr_kemi_modules_add(sr_kemi_tls_exports);
Module: kamailio
Branch: 5.2
Commit: 77c4bd3207173f7e43e67e553fb47f1f260c166e
URL: https://github.com/kamailio/kamailio/commit/77c4bd3207173f7e43e67e553fb47f1…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2019-10-07T10:41:29+02:00
ims_qos: fixed typo in comments (timout -> timeout)
(cherry picked from commit a6caed41166e555d7297abbae6017c5c54262662)
---
Modified: src/modules/ims_qos/rx_str.c
---
Diff: https://github.com/kamailio/kamailio/commit/77c4bd3207173f7e43e67e553fb47f1…
Patch: https://github.com/kamailio/kamailio/commit/77c4bd3207173f7e43e67e553fb47f1…
---
diff --git a/src/modules/ims_qos/rx_str.c b/src/modules/ims_qos/rx_str.c
index efa9617222..6b243e85a4 100644
--- a/src/modules/ims_qos/rx_str.c
+++ b/src/modules/ims_qos/rx_str.c
@@ -104,8 +104,8 @@ int rx_send_str(str *rx_session_id) {
if (auth->u.auth.state == AUTH_ST_DISCON) {
// If we are in DISCON is because an STR was already sent
- // so just wait for STA or for Grace Timout to happen
- LM_DBG("Hmmm, auth session already in disconnected state\n");
+ // so just wait for STA or for Grace Timeout to happen
+ LM_DBG("auth session already in disconnected state\n");
cdpb.AAASessionsUnlock(auth->hash);
return CSCF_RETURN_FALSE;
}
Module: kamailio
Branch: 5.2
Commit: 342e1dcdd8d59269efe93f4c3e7651d4019e2dd5
URL: https://github.com/kamailio/kamailio/commit/342e1dcdd8d59269efe93f4c3e7651d…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2019-10-07T10:41:19+02:00
sms: fixed typo in comments (timout -> timeout)
(cherry picked from commit 5631338036c405b1e8c7fe8a1e320db2eb63c3f9)
---
Modified: src/modules/sms/libsms_modem.c
Modified: src/modules/sms/libsms_modem.h
---
Diff: https://github.com/kamailio/kamailio/commit/342e1dcdd8d59269efe93f4c3e7651d…
Patch: https://github.com/kamailio/kamailio/commit/342e1dcdd8d59269efe93f4c3e7651d…
---
diff --git a/src/modules/sms/libsms_modem.c b/src/modules/sms/libsms_modem.c
index 5093d28ee2..fe0be1f8a7 100644
--- a/src/modules/sms/libsms_modem.c
+++ b/src/modules/sms/libsms_modem.c
@@ -125,7 +125,7 @@ int put_command( struct modem *mdm, char* cmd, int cmd_len, char* answer,
}
}
}
- /* repeat until timout */
+ /* repeat until timeout */
}while (timeoutcounter<timeout);
if (!answer_e)
diff --git a/src/modules/sms/libsms_modem.h b/src/modules/sms/libsms_modem.h
index feeb6acac9..7eb0a80b04 100644
--- a/src/modules/sms/libsms_modem.h
+++ b/src/modules/sms/libsms_modem.h
@@ -31,7 +31,7 @@ typedef int(*cds_report)( struct modem* , char* , int );
/* put_command
- Sends a command to the modem and waits max timout*0.1 seconds for an answer.
+ Sends a command to the modem and waits max timeout*0.1 seconds for an answer.
The function returns the length of the answer.
The answer can be Ok, ERROR or expect.
The command may be empty or NULL */
Module: kamailio
Branch: 5.2
Commit: df08856b7570ee477e1aaa49d0550e8541f19f02
URL: https://github.com/kamailio/kamailio/commit/df08856b7570ee477e1aaa49d0550e8…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2019-10-07T10:41:03+02:00
db_mysql: fixed typo in comments (timout -> timeout)
(cherry picked from commit 75e0e0f4d693e207d2035f84c3e1ddc9cc715ec4)
---
Modified: src/modules/db_mysql/km_dbase.c
---
Diff: https://github.com/kamailio/kamailio/commit/df08856b7570ee477e1aaa49d0550e8…
Patch: https://github.com/kamailio/kamailio/commit/df08856b7570ee477e1aaa49d0550e8…
---
diff --git a/src/modules/db_mysql/km_dbase.c b/src/modules/db_mysql/km_dbase.c
index 581e4e14be..97b0e4904c 100644
--- a/src/modules/db_mysql/km_dbase.c
+++ b/src/modules/db_mysql/km_dbase.c
@@ -89,7 +89,7 @@ static int db_mysql_submit_query(const db1_con_t* _h, const str* _s)
}
}
/*
- * We're doing later a query anyway that will reset the timout of the server,
+ * We're doing later a query anyway that will reset the timeout of the server,
* so it makes sense to set the timestamp value to the actual time in order
* to prevent unnecessary pings.
*/