Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | util.pposix: Use mallinfo2() on glibc 2.33, fix #1649 | Kim Alvefur | 2022-01-06 | 1 | -5/+12 | |
| | ||||||
* | util.pposix: Bind isatty(3) | Kim Alvefur | 2021-07-04 | 1 | -0/+9 | |
| | | | | | Useful for disabling certain behavior, ANSI colors etc when not connected to a terminal. | |||||
* | util.hashes: Expose OpenSSL version | Kim Alvefur | 2021-05-12 | 1 | -0/+4 | |
| | ||||||
* | Merge 0.11->trunk | Matthew Wild | 2021-05-13 | 1 | -0/+14 | |
|\ | ||||||
| * | util.hashes: Add constant-time string comparison (binding to CRYPTO_memcmp) | Matthew Wild | 2021-05-10 | 1 | -0/+14 | |
| | | ||||||
* | | Merge 0.11->trunk | Kim Alvefur | 2020-10-15 | 1 | -0/+4 | |
|\| | ||||||
| * | Back out changeset 2c1583bb0e0f | Kim Alvefur | 2020-10-15 | 1 | -0/+4 | |
| | | | | | | | | Same reason as 712b2e6a09d9 | |||||
* | | Merge 0.11->trunk | Kim Alvefur | 2020-10-15 | 1 | -17/+6 | |
|\| | ||||||
| * | Back out 6dde2c9fa272: Doesn't work on Lua 5.1 | Kim Alvefur | 2020-10-15 | 1 | -13/+6 | |
| | | ||||||
| * | util.strbitop: Remove redundant init function | Kim Alvefur | 2020-10-15 | 1 | -4/+0 | |
| | | | | | | | | | | When you have 3 almost identical functions, you tend to edit one and then copypaste. Forgot to remove this line from the other two. | |||||
* | | Merge 0.11->trunk | Kim Alvefur | 2020-10-15 | 1 | -15/+22 | |
|\| | ||||||
| * | util.strbitop: Create buffer in the correct size (optimization) | Kim Alvefur | 2020-10-15 | 1 | -6/+13 | |
| | | | | | | | | | | This avoids dynamically growing the buffer as Lua does when luaL_addchar is used, thus saving on realloc calls. | |||||
| * | util.strbitop: Reformat code | Kim Alvefur | 2020-10-15 | 1 | -9/+9 | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | astyle \ --indent=tab \ --attach-classes \ --indent-switches \ --break-blocks \ --pad-oper \ --unpad-paren \ --add-braces \ --align-pointer=name \ --lineend=linux \ *.c | |||||
* | | Merge 0.11->trunk | Matthew Wild | 2020-10-15 | 3 | -2/+93 | |
|\| | ||||||
| * | util.strbitop: Library for bitwise operations on strings | Kim Alvefur | 2019-09-07 | 3 | -2/+93 | |
| | | ||||||
* | | configure: Pass compiler flag to enable ICU only when building util.encodings | Kim Alvefur | 2020-07-12 | 2 | -0/+3 | |
| | | | | | | | | Passing it in CFLAGS applied to all modules, which was not needed. | |||||
* | | util.ringbuffer: Ensure unsigned chars are always returned from :byte() | Matthew Wild | 2020-06-24 | 1 | -3/+3 | |
| | | ||||||
* | | util-src: Use the luaL_pushfail API added in Lua 5.4 to highlight all ↵ | Kim Alvefur | 2020-06-07 | 6 | -49/+70 | |
| | | | | | | | | | | | | | | failure conditions Actually just an alias of pushnil, but it does make it more obvious where the failure conditions are, which is good for readability. | |||||
* | | util.ringbuffer: Add :sub() and :byte() methods equivalent to the string methods | Matthew Wild | 2020-06-04 | 1 | -1/+102 | |
| | | ||||||
* | | util.ringbuffer: Prevent creation of buffer with negative size | Kim Alvefur | 2020-06-04 | 1 | -1/+1 | |
| | | | | | | | | | | Previously this would have been (unsigned)-1 which is a large positive integer. | |||||
* | | util.ringbuffer: Prevent creation of zero-size buffer | Kim Alvefur | 2020-05-29 | 1 | -0/+1 | |
| | | ||||||
* | | util.pposix,signal: Pass around various OS numbers as integers [Lua 5.3] | Kim Alvefur | 2020-05-04 | 2 | -28/+34 | |
| | | | | | | | | | | | | | | Passing around PIDs, UIDs etc as integers makes it more sane in Lua 5.3. Getting 1234.0 as PID is silly. Shouldn't change any behavior as these are all integers on the C side and the integral floats are accepted as integers when passed back from Lua into C. | |||||
* | | util.hashes: Fix output length of PBKDF2-HMAC-SHA256 | Kim Alvefur | 2020-04-22 | 1 | -1/+1 | |
| | | | | | | | | Somehow it got SHA1's 20 byte output instead of the proper 32 = 256/8 | |||||
* | | util.net: Fix signedness warning on ARM | Emmanuel Gil Peyrot | 2020-01-30 | 1 | -2/+2 | |
| | | | | | | | | net.c:87:56: warning: comparison of integer expressions of different signedness: ‘long unsigned int’ and ‘long int’ [-Wsign-compare] | |||||
* | | util.*.c: Add static qualifiers everywhere | Emmanuel Gil Peyrot | 2019-12-01 | 6 | -52/+47 | |
| | | ||||||
* | | util.encodings: Remove redundant cast | Emmanuel Gil Peyrot | 2019-12-01 | 1 | -1/+1 | |
| | | ||||||
* | | util.encodings: Don’t export unneeded symbols | Emmanuel Gil Peyrot | 2019-12-01 | 1 | -8/+8 | |
| | | | | | | | | This reduces the binary size from 22704 B to 18592 B. | |||||
* | | Merge 0.11->trunk | Kim Alvefur | 2019-11-16 | 5 | -108/+146 | |
|\ \ | |/ |/| | ||||||
| * | util.encodings: Don't ignore non-strings passed to stringprep functions | Kim Alvefur | 2019-11-02 | 1 | -11/+1 | |
| | | | | | | | | | | If you manage to pass a table or something weird to these, you deserve to know. | |||||
| * | util.encodings: Strictly verify that the 'strict' *prep argument is a boolean | Kim Alvefur | 2019-10-30 | 1 | -4/+10 | |
| | | | | | | | | | | This is to prevent mistakes like nodeprep(username:gsub("a","b")) from unintentionally invoking strict mode. | |||||
| * | util.encodings: Optional strict flag to stringprep | Kim Alvefur | 2019-04-24 | 1 | -2/+14 | |
| | | ||||||
| * | util.encodings: Spell out all IDNA 2008 options ICU has | Kim Alvefur | 2019-09-11 | 1 | -1/+24 | |
| | | ||||||
| * | util.encodings: Switch ICU binding to IDNA2008 (fixes #533, #1301) | Kim Alvefur | 2019-09-11 | 1 | -4/+9 | |
| | | ||||||
| * | util.poll: Add missing return statements in fallback mode | Kim Alvefur | 2019-07-28 | 1 | -0/+2 | |
| | | | | | | | | | | | | | | These allowed modifying or deleting select() state for unregistered FDs. During normal usage this should never happen. Modifying one that isn't set might cause weirdness but deleting an already deleted FD isn't a problem. | |||||
| * | util.encodings: Declare absence of arguments [-Wstrict-prototypes] | Kim Alvefur | 2019-05-13 | 1 | -1/+1 | |
| | | ||||||
| * | util.encodings: Add compat with ICU before version 58 | Kim Alvefur | 2019-04-29 | 1 | -0/+5 | |
| | | ||||||
| * | util.encodings: Add binding to confusables skeleton function in ICU | Kim Alvefur | 2019-04-24 | 1 | -0/+45 | |
| | | ||||||
| * | Merge 0.11->trunk | Kim Alvefur | 2019-04-24 | 1 | -1/+1 | |
| |\ | ||||||
| * | | Backed out changeset 61bc5c52c941 | Kim Alvefur | 2019-04-21 | 1 | -12/+9 | |
| | | | | | | | | | | | | luaL_buffinitsize is only available in Lua 5.2+ | |||||
| * | | util.hashes: Allow specifying output key length | Kim Alvefur | 2019-04-20 | 1 | -9/+12 | |
| | | | | | | | | | | | | This is not needed for SCRAM but PBKDF2 takes this argument. | |||||
| * | | util.hashes: Add PBKDF2-HMAC-SHA256 | Kim Alvefur | 2019-01-13 | 1 | -0/+18 | |
| | | | ||||||
| * | | util.hashes: Rename PBKDF2 function | Kim Alvefur | 2019-01-13 | 1 | -2/+3 | |
| | | | | | | | | | | | | It's not SCRAM-specific | |||||
| * | | util.hashes: Remove now unused hmac() function | Kim Alvefur | 2019-04-19 | 1 | -38/+0 | |
| | | | ||||||
| * | | util.hashes: Use PBKDF2 from libcrypto | Kim Alvefur | 2019-01-13 | 1 | -44/+9 | |
| | | | ||||||
| * | | Merge 0.11->trunk | Kim Alvefur | 2019-04-19 | 1 | -17/+11 | |
| |\ \ | ||||||
| * | | | util.hashes: Remove redundant semicolon | Kim Alvefur | 2019-04-19 | 1 | -1/+1 | |
| | | | | ||||||
| * | | | util.poll: Minimize scope of methods | Kim Alvefur | 2019-04-13 | 1 | -9/+9 | |
| | | | | | | | | | | | | | | | | File scope is enough | |||||
| * | | | util.pposix: Don't define POSIX_C_SOURCE on FreeBSD to ensure visibility of ↵ | Matthew Wild | 2018-12-04 | 1 | -0/+4 | |
| | | | | | | | | | | | | | | | | initgroups() | |||||
| * | | | util.time: Bump POSIX_C_SOURCE to ensure visibility of CLOCK_MONOTONIC on ↵ | Matthew Wild | 2018-12-04 | 1 | -1/+1 | |
| | | | | | | | | | | | | | | | | FreeBSD (fixes #1253) | |||||
* | | | | util.pposix: Avoid overflow of malloc info at 2GB (fixes #1445 until 4GB) | Kim Alvefur | 2019-11-16 | 1 | -5/+5 | |
| |_|/ |/| | |