Skip to content

Commit

Permalink
auth: typos
Browse files Browse the repository at this point in the history
  • Loading branch information
dilyanpalauzov authored and miconda committed Mar 30, 2023
1 parent 3f0c510 commit 0cb4332
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 25 deletions.
18 changes: 9 additions & 9 deletions src/modules/auth/auth.xml
Original file line number Diff line number Diff line change
Expand Up @@ -252,11 +252,11 @@
adjustment or when the current proxy is part of a cluster which is
not time-synchronized, it's possible to receive a nonce with
a creation time in the future. In this case if the difference is
greater then the value of <parameter>nonce_auth_max_drift</parameter>
greater than the value of <parameter>nonce_auth_max_drift</parameter>
in seconds, the nonce is considered stale and the request
re-challenged. If this were not done, a dramatic time change
backwards may lead to nonces having been generated before the
cange being valid for too long.
change being valid for too long.
</para>
</refsect2>

Expand All @@ -272,7 +272,7 @@
<literal>yes</literal>, the received <parameter>nc</parameter> value
is remembered and checked against the value used in the previous
digest response. For a successful authentication the received
<parameter>nc</parameter> must be greater then the previously
<parameter>nc</parameter> must be greater than the previously
received one (See RFC 2617 for more details). This will provide
protection against replay attacks while still allowing credentials
caching at the UA side.
Expand Down Expand Up @@ -306,21 +306,21 @@
<serdoc:modparam module="auth">nc_array_order</serdoc:modparam>
parameters. If this number is exceeded, older entries will be
overwritten. As long as the maximum rate of challengeable messages
per average response time is lower then
per average response time is lower than
<serdoc:modparam module="auth">nc_array_size</serdoc:modparam>,
the nonce count check should work flawlessly. For optimal
performance (maximum reuse of cache credentials)
<serdoc:modparam module="auth">nc_array_size</serdoc:modparam>
divided by
<serdoc:modparam module="auth">nid_pool_no</serdoc:modparam>
should be lower then the message rate multiplied by the desired
should be lower than the message rate multiplied by the desired
<serdoc:modparam module="auth">nonce_expire</serdoc:modparam>.
<!-- XXX: Give an example with default nonce_expire and typical
RTT. -->
</para>
<para>
The maximum accepted <parameter>nc</parameter> value is 255. If
<parameter>nc</parameter> becomes greater then this, the nonce will
<parameter>nc</parameter> becomes greater than this, the nonce will
be considered stale and the UA will be re-challenged.
</para>
<para>
Expand Down Expand Up @@ -415,7 +415,7 @@
<serdoc:modparam module="auth">otn_in_flight_order</serdoc:modparam>
parameters. If this number is exceeded, older entries will be
overwritten. As long as the maximum rate of challengeable messages
per average response time is lower then
per average response time is lower than
<serdoc:modparam module="auth">otn_in_flight_no</serdoc:modparam>,
the one time nonce check should work flawlessly.
</para>
Expand Down Expand Up @@ -577,7 +577,7 @@
<title>Additional Integrity Checks</title>
<para>
The auth module can perform additional integrity checks on the
authentication response inclued in a request by the client.
authentication response included in a request by the client.
</para>
<para>
Without the extra checks, the nonce value will be used only to
Expand All @@ -598,7 +598,7 @@
MD5 hash over some selected parts of the message and another secret.
This will be used to check if these parts of the message are the same
when a UA retries the request with the authentication response, thus
protecting from replay attacks or at least severly limiting their
protecting from replay attacks or at least severely limiting their
possibility.
</para>
<para>
Expand Down
2 changes: 1 addition & 1 deletion src/modules/auth/doc/auth_functions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ if (www_authenticate("realm", "subscriber")) {
<section id="auth.f.has_credentials">
<title><function>has_credentials(realm)</function></title>
<para>
This function returns true of the request has Authorization or
This function returns true if the request has Authorization or
Proxy-Authorization header with provided realm. The parameter
can be string with pseudo-variables.
</para>
Expand Down
14 changes: 7 additions & 7 deletions src/modules/auth/doc/auth_params.xml
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ modparam("auth", "qop", "auth") # set qop=auth
<para>
If enabled the received <emphasis>nc</emphasis> value is remembered
and checked against the older value (for a successful authentication
the received <emphasis>nc</emphasis> must be greater then the
the received <emphasis>nc</emphasis> must be greater than the
previously received one, see rfc2617 for more details). This will
provide protection against replay attacks while still allowing
credentials caching at the UA side.
Expand Down Expand Up @@ -210,16 +210,16 @@ modparam("auth", "qop", "auth") # set qop=auth
the <varname>nc_array_size</varname> or
<varname>nc_array_order</varname> parameters. If this number is
exceeded, older entries will be overwritten. As long as the maximum
rate of challengeable messages per average response time is lower then
rate of challengeable messages per average response time is lower than
<varname>nc_array_size</varname>, the <varname>nonce_count</varname>
checks should work flawlessly. For optimum performance (maximum reuse
of cache credentials) <varname>nc_array_size</varname> divided by
<varname>nid_pool_no</varname> should be lower then the message rate
<varname>nid_pool_no</varname> should be lower than the message rate
multiplied by the desired <varname>nonce_expire</varname>.
</para>
<para>
The maximum accepted <emphasis>nc</emphasis> value is 255. If
<emphasis>nc</emphasis> becomes greater then this, the nonce will be
<emphasis>nc</emphasis> becomes greater than this, the nonce will be
considered stale and the UA will be re-challenged.
</para>
<para>
Expand Down Expand Up @@ -343,7 +343,7 @@ route{
tracked nonces is set using the <varname>otn_in_flight_no</varname> or
<varname>otn_in_flight_order</varname> parameters. If this number is
exceeded, older entries will be overwritten. As long as the maximum
rate of challengeable messages per average response time is lower then
rate of challengeable messages per average response time is lower than
<varname>otn_in_flight_no</varname>, the
<varname>one_time_nonce</varname> checks should work flawlessly.
</para>
Expand Down Expand Up @@ -568,7 +568,7 @@ modparam("auth", "otn_in_flight_order", 23) # 8 Mb (1Mb memory)
the client for authentication.</para>
<para>If you use multiple servers in your installation, and would like to
authenticate on the second server against the nonce generated at the
first one its necessary to explicitly set the secret to the same value
first one, it is necessary to explicitly set the secret to the same value
on all servers. However, as the use of a shared (and fixed) secret as
nonce is insecure, it is much better is to stay with the default. Any
clients should send the authenticated request to the server that
Expand Down Expand Up @@ -622,7 +622,7 @@ modparam("auth", "nonce_expire", 600) # Set nonce_expire to 600s
In some cases, like shortly after a system time backward adjustment
or when the current proxy is part of a cluster which is not
time-synchronized, it's possible to receive a nonce with creation time
in the future. In this case if the difference is greater then
in the future. In this case if the difference is greater than
<varname>nonce_auth_max_drift</varname> seconds, consider the nonce
stale and re-challenge (otherwise after a dramatic time change
backwards, it might happen that some previously generated nonces will
Expand Down
6 changes: 3 additions & 3 deletions src/modules/auth/nc.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ int init_nonce_count()
return -1;
}else if (size*sizeof(nc_t) >= max_mem/2){
LM_WARN("the currently configured nc_array_size (%ld) "
"would use more then 50%% of the available shared"
"would use more than 50%% of the available shared"
" memory(%ld bytes)\n", size, max_mem);
}
nc_array_size=size;
Expand Down Expand Up @@ -191,7 +191,7 @@ nid_t nc_new(nid_t id, unsigned char p)
unsigned int v, new_v;

n=get_nc_array_raw_idx(id, p); /* n-th nc_t */
i=get_nc_array_uint_idx(n); /* aray index i, corresponding to n */
i=get_nc_array_uint_idx(n); /* array index i, corresponding to n */
r=get_nc_int_pos(n); /* byte/short inside the uint corresponding to n */
/* reset corresponding value to 0 */
do{
Expand Down Expand Up @@ -226,7 +226,7 @@ enum nc_check_ret nc_check_val(nid_t id, unsigned pool, unsigned int nc, int upd
if (unlikely(nc>=(1U<<(sizeof(nc_t)*8))))
return NC_TOO_BIG;
n=get_nc_array_raw_idx(id, pool); /* n-th nc_t */
i=get_nc_array_uint_idx(n); /* aray index i, corresponding to n */
i=get_nc_array_uint_idx(n); /* array index i, corresponding to n */
r=get_nc_int_pos(n); /* byte/short inside the uint corresponding to n */
do{
v=atomic_get_int(&nc_array[i]);
Expand Down
4 changes: 2 additions & 2 deletions src/modules/auth/nid.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ extern unsigned nid_pool_no; /* number of index pools */

/* id incremenet, to avoid cacheline ping-pong and cover all the
* array locations it should be a number prime with the array size and
* bigger then the cacheline. Since this is used also for onetime nonces
* bigger than the cacheline. Since this is used also for onetime nonces
* => NID_INC/8 > CACHELINE
* This number also limits the maximum pool/partition size, since the
* id overflow check checks if crt_id - nonce_id >= partition_size*NID_INC
Expand All @@ -51,7 +51,7 @@ extern unsigned nid_pool_no; /* number of index pools */
#define DEFAULT_NID_POOL_SIZE 1
#define MAX_NID_POOL_SIZE 64 /* max. 6 bits used for the pool no*/

#define CACHELINE_SIZE 256 /* more then most real-word cachelines */
#define CACHELINE_SIZE 256 /* more than most real-word cachelines */

/* if larger tables are needed (see NID_INC comments above), consider
* switching to unsigned long long */
Expand Down
6 changes: 3 additions & 3 deletions src/modules/auth/ot_nonce.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ int init_ot_nonce()
return -1;
}else if (size/8 >= max_mem/2){
LM_WARN("the currently configured otn_in_flight_no (%ld) "
"would use more then 50%% of the available shared"
"would use more than 50%% of the available shared"
" memory(%ld bytes)\n", size, max_mem);
}
otn_in_flight_no=size;
Expand Down Expand Up @@ -182,7 +182,7 @@ nid_t otn_new(nid_t id, unsigned char p)
unsigned n, b;

n=get_otn_array_bit_idx(id, p); /* n-th bit */
i=get_otn_array_cell_idx(n); /* aray index i, corresponding to n */
i=get_otn_array_cell_idx(n); /* array index i, corresponding to n */
b=get_otn_cell_bit(n); /* bit pos corresponding to n */
/* new_value = old_value with the corresponding bit zeroed */
#ifdef OTN_CELL_T_LONG
Expand Down Expand Up @@ -213,7 +213,7 @@ enum otn_check_ret otn_check_id(nid_t id, unsigned pool)
if (unlikely(otn_id_check_overflow(id, pool)))
return OTN_ID_OVERFLOW;
n=get_otn_array_bit_idx(id, pool); /* n-th bit */
i=get_otn_array_cell_idx(n); /* aray index i, corresponding to n */
i=get_otn_array_cell_idx(n); /* array index i, corresponding to n */
b=get_otn_cell_bit(n); /* bit pos corresponding to n */
b_mask= (otn_cell_t)1<<b;

Expand Down

0 comments on commit 0cb4332

Please sign in to comment.