libUseful 5.23

libUseful is a general 'C' library providing useful functions related to: resizable strings, lists and maps, unix and tcp sockets, SSL/TLS, cryptographic hashes, parsing of json, yaml and other markup languages, terminal output including ANSI/vt100 escape sequences, OAuth 2.0, etc, etc.

Tags c library files ssl tls sockets resizeable strings lists maps
License GNU GPLv3
State mature

Recent Releases

5.2322 Aug 2024 02:45 minor feature: Improve attribution of base64 and hashing functions. -net/nonet (flag meaning was inverted). ProcessNoNewPrivs now handles 'already set' and is no longer static. Call setsid before setting controlling tty in PtySpawnFunction. added CGIReadDocument. v5.22. clash of flags between PROC_NO_NEW_PRIV and PROC_NOSHELL. v5.21. replaced 'exit if can't chroot/chdir' with 'strict' option to ProcessApplyConfig. Added ERRFLAG_ABORT to error handling functions, aborts the process after reporting the error. Added ERRFLAG_SYSLOG to error handling functions, forces syslog even if library-wide syslog flag isn't set. MakeShellSafeStr now quotes/blanks out ' ' in addition to other dangerous characters. MakeShellSafeStr can now report unsafe characters via syslog if the SHELLSAFE_REPORT flag is passed. MakeShellSafeStr can now abort program if the SHELLSAFE_ABORT flag is passed and unsafe chars are found. FileMoveToDir will now copy the file if a simple rename fails. Negative values for width and height on TerminalMenu and TerminalProgress set width as 'terminal width minus that value'.
5.1911 Jul 2024 11:05 minor feature: Added 'nosu', 'noprivs' options to 'ProcessApplyConfig' that prevent a process escalating priviledges via su/sudo/setuid. check for prctl properly using './configure'. Eliminate use of 'fopen' in 'GetHostARP'. General cleanup of 'ProcessApplyConfig'. If chdir or chroot fail in 'ProcessApplyConfig' print "too dangerous to continue" and exit.
5.1805 Jul 2024 06:45 minor bugfix: FindFileInPath now returns a real file, rather than symlink, unless a symlink is all it can find (not it really does). Clean up some errors revealed by -Wall.
5.1701 Jul 2024 11:45 minor feature: FindFileInPath now returns a real file, rather than symlink, unless a symlink is all it can find. Added TerminalPrint function.
5.1522 Jun 2024 04:25 minor feature: Add/support for calling hmac functions via the Hash interface. Use of openssl hashing functions no longer experimental. Support sha384 hash. Added 'UnpackURL' function.
5.909 Feb 2024 00:05 minor feature: Build without openssl AGAIN. Support compile with -Wall, -Werror, FORTIFY_SOURCE, and -fstack-protector-strong.
5.131 Mar 2023 08:43 major feature: Turn all features on by default with 'configure'. Support hash functions from openssl. Bugfixes in STREAM functionality. HMAC functions added.
4.4020 Aug 2020 05:25 minor feature: Unicode lookup cache. Add STREAMShutdown for use in garbage-colle . STREAMShutdown. Shutdown sshproxy processes on exit of their owner process.
4.3617 Jul 2020 05:45 minor feature: Add stdin, stdout, and stdio to list of STREAM urls . Correction for stdin/stdout/stdio streams url parsing. . Added 'unicode-names' system and some xterm functions. . Version bump.
4.3510 Jul 2020 18:54 minor bugfix: Stop leaking ssh processes when using ssh tunnels
4.3102 Jun 2020 08:45 minor feature: Terminal widgets broken out of Terminal.c Horizontal Menu/MenuBar wid . TerminalMenuBar renamed TerminalChoice. Version bump.
4.2830 Apr 2020 08:31 minor feature: Added 'r64' or 'rfc4648' encoding. Added OpenSSLAutoDetect function that detects if a just-accepted network stream is SSL/TLS encrypted.
4.2516 Mar 2020 11:05 minor feature: More oauth. 'voldown' mismapping. . Added 'FindVarNamesInString' function. . Version bump.
4.2420 Feb 2020 06:05 minor feature: FileSystem: use __APPLE__, not _APPLE_ . FileSystem: add ifdef for extra getxattr call. . FileSystem: too many params to setxattr. . . . only check symlinks if file opened for write. . Added Timeout argument to STREAMExpectDialog. Improvements to DataPar . . correct some 'char *'/'const char *' typos. . 'implicit declaration'. . : RawData:ReadAt stores incorrect length. . More for RAWDATAReadAt. . added process.sfork() (fork with a stream to talk to forked process), . . Make SF_NONBLOCK apply to write. . handle blank lines in oauth.creds. . Re-add Quickstart.md. for ssh 'execute' mode. . crash in ssh execute mode when no command given. . version bump.
4.2309 Feb 2020 07:05 minor feature: Copy libUseful links as symbolic links, not files . Handle apple osx xattr oddities. . For building *without openssl. . Markdownify Quickstart.txt. . Version bump, apply correct '-P' flag to cp in 'make install'. . Autoclean old entries out of.oauth.creds file. . Rationalize file locking on.oauth.creds. . Demessages printing when not requested. . More keystrokes detected in Terminal.c.
4.2201 Feb 2020 03:15 minor feature: memory leaks when using SSL . Improvements to the libUseful RaiseError system. . Final changes for STREAM.
4.2126 Jan 2020 14:30 minor bugfix: Fix for bug introduced in v4.20 that can hang apps that read an entire document from an ssh stream, rather than more interactive line-by-line processing.
4.2026 Jan 2020 14:09 minor feature: Text files can now be opened for write on a remote ssh server using STREAMOpen("ssh://server/textfile.txt", "w") Any file, including binary data, can still be read with STREAMOpen("ssh://server/whatever", "r") And commands exectued with STREAMOpen("ssh://server/ps ax", "") or STREAMOpen("ssh://server/ps ax", "x")
4.1609 Dec 2019 20:43 major bugfix: Fix for linking against openssl for recent versions of openssl (libressl has been fine, but openssl has lost/renamed some functions). Many changes since last update on freshcode.club, including strlen caching for faster string operations, a new 'terminal menu' system, and internal support for using poll() rather than select().
3.2116 Jun 2018 13:58 major feature: Now builds under macosx. Various other bugfixes.
20 Nov 2017 11:53 major feature: This is the initial release.