Reporter: The Stdio.stderr fallback for report() now UTF-8 encodes its output.
Builtin [NT]: Remove some dead variables. Also use CryptReleaseContext() instead of CloseHandle() to release the NT crypto context. Fixes some warnings.
Doc: Improve documentation for __empty_program()
Documentation [Nettle]: Add some notes about required version of Nettle.
Nettle.BlockCipher16.OCB: Check availability in both headers and lib.
Crypto.ECC.Curve448: Add module.
Nettle.ECC: Initial support for GOSTDSA.
Crypto.SM3: Add cipher.
Process.Process: Support using Stdio.Fd for "cwd" and "chroot" on OSes with fchdir(2). Fixes #10118.
Stdio.Fd: Add cd(). Fixes #10119.
System [NT]: Support inhibiting expansion of REG_EXPAND_SZ values in RegGetValue() et al.
System [NT]: Fix UTF8/UTF16 handling in {Get,Set}FileAttributes().
Documentation [System] [NT]: Improved doc of LookupAccountName() and the SID class.
Stdio.Fd: Add low-level hooks for error callback. Needed for #10108.
Cpp: Support function-style macros in define_macro() et al. This also adds support for defining function-style macros via the -D command line option. Fixes #10109.
EFUNs: Use pike_strptime() to implement predef::strptime(). predef::strptime() should now exist on all platforms (ie including NT).
System: Adjust type for normalize_path(). System.normalize_path() only accepts 8-bit strings as argument, and always returns a utf8_string. Also fixes related testsuite case.
Documentation [ADT.CircularList]: Fix AutoDoc markup error.
Documentation [SSL.Port]: Some documentation updates.
SSL.Port: Add set_accept_callback(). Also alters the accept callback API slightly to be more in line with that of Stdio.Port: * The accept callback now gets a single argument; the id as set by set_id(). * Installation of the internal accept callback (ie ssl_callback()) is now delayed until the first call of accept() if no external accept callback has been installed (ie with any of bind(), listen_fd() or set_accept_callback()). This allows for altering the context between binding and starting to accept connections.
Stdio.Port: Add set_accept_callback().
EFUNs [NT] [AIX]: Attempt to support dates before 1970-01-01T00:00:00. gmtime(), localtime() and mktime() now attempt to support negative timestamps on NT and AIX. Fixes multiple testsuite failures.
Stdio.File: Add isatty().
Parser.Tabular: Use Pike.DestructImmediate. The parser gets confused and may end up in an infinite loop if _checkpoint objects are not destructed when it expects them to be.
Process.run: Add example for redirecting output to stdout/stderr
Stdio.InputStream: Add read_function() to the API. Fixes warnings in Standards.IIM.
Iterators [Compat]: Add 8.0::{Array,Mapping,Multiset,String}.Iterator This fixes compat for code that does stuff like #pike 8.0 multiset l = (< "foo" >); return Multiset.Iterator(l)->index(); // Return first element of l. We assume that noone does inherit on Array.Iterator et al.
8.0::Stdio.FILE: Add missing symbol set_peek_file_before_read_callback(). Also mark it as optional and deprecated, and same for Stdio.File. Move 8.0::Stdio.File to module.pmod to avoid conflict with 8.0::Stdio.FILE on case-insensitive filesystems. Note that the symbol has been marked deprecated since Pike 7.8. Fixes issues where eg Stdio.stdout wasn't compatible with 8.0::Stdio.File.
Shuffler.Shuffle: The wrap callback may return zero.
Debug: added functions to generate perf map files
Testsuite: Fix some broken calls of predef::compile_string().
Nettle.Hash: Adjust type of block_size() to match __builtin.Nettle.Hash.
Documentation [Protocols.HTTP]: Prefix StatusCode descriptions with code. This makes it easier to find out that eg Protocols.HTTP.HTTP_NOT_FOUND should be used to generate error code 404.
Compiler: Adjust approach to lfun::create() fallback. Instead of having a fallback at lookup time, the compiler now adds lfun::create() as an alias for lfun::__create__() if there is no explicitly defined lfun::create(). This should be (much) more robust and backward-compatible. Fixes some fall-out from the #10086 changes.
ADT.Sequence: Update to new iterator API.
Documentation [ADT.Sequence]: Remove remaining references to adapters. The module was renamed ADT.Sequence almost 20 years ago, so fix the remaining places that refer to it as an array adapter.
ADT.List: Updated to new iterator API. Fixes some of #10085.
Sql.sql_result: Fix compilation error.
ADT.Relation.Binary: Updated implementation of lfun::_get_iterator(). Also added some documentation.
Documentation [Stdio.Readline]: Add doc for read() and write() et al.
Compiler [Typechecker]: Changed API for apply_type_attribute() et al. They now get a mapping that they may use to keep state between arguments.
Added zero to piek methods that returns 0 in the src folder.
Crypto: Fix multiple warnings about passing of zero values.
Stdio: Add some missing prototypes to Stdio.NonblockingStream.
Updated types where documentation said 'or zero'.
Web.Api.Instagram: Allow post data to be zero. Fixes several compilation errors.
Web.Api: Authenticate with the Authorization header by default. Sending OAuth authorization information via query variables has been deprecated by RFC6750 (and others), and some endpoints (eg GitHub) do no longer support the old method. Switch to using Authorization: Bearer <access_token> by default. Also updates Web.Api.Github accordingly.
EFUNs: Improved type for sizeof() and strlen().
Documentation [_Roxen.HeaderParser]: Improved some doc.
Program: Fixed some warnings with respect to defined().
Merge branch 'patches/support-mixed-in-count_memory' into 8.0 * patches/support-mixed-in-count_memory: GC: Support remaining types in Pike.count_memory().
GC: Support remaining types in Pike.count_memory(). Users of Pike.count_memory() typically do not want to bother filtering its arguments, so perform filtering in count_memory() rather than throwing errors. Also adds support for counting memory for objects referenced via functions.
Documentation [SSL]: Fix typo in previous commit.
__builtin.Sql.Connection: Added query_db() and reset() to the API.
Added convenience function to load letsencrypt certificate.
Added convenience function to drop process privileges.
CritBit: Fixed prototype for `[]=().
Doc [Nettle.BlockCipher16.KW]: Add note from RFC 6931. Also removes obsolete note about using the AEAD APIs. Minor code clean up.
Doc [Protocols.LysKOM]: Some minor changes.
System.Memory: Updated API for lfun::`[]=() to current. It now no longer complains about getting the context. Removed support for assigning to ranges as it (AFAIK) never has worked, and there is no corresponding lfun. Fixes some testsuite failures.
SSL.File: Add {query,set}_timeout(). This adds an API to set an optional timeout to be used for blocking operations. When the timeout expires it is handled as if the peer sent a fatal internal error alert.
System.TM: Support initialization with bignums. Fixes post-2038 support on ILP32 architectures with 64-bit time_t.
Concurrent: Fix Future()->timeout() call_callback() may use call_out(cb, 0, ...) to call a callback. This means that if we call multiple callbacks wie call_callback(), they mæy be executed in arbitrary order. The implementation of Future()->timeout() was subject to races in this regard, leading to the Future returned by ->timeout() to resolve with 0 instead of the result or instead of rejecting with the same reason as the original Promise/Future was rejected before the timeout triggered. Using less abstractions, we save on such races, Future objects, and even lambdas while getting arguably eaiser to read code.
Documentation [Array]: Improved doc for dwim_sort_func().
Backported fragment helper methods.
Protocols.TCP: Add autodoc everywhere
Doc [Thread]: Added description of the module.
Threads.MutexKey: Added timeout to upgrade().
Thread: Removed redundant and obsolete classes RWMutex and RWKey. Their functionality is provided by Thread.Mutex and Thread.MutexKey.
Doc [Thread.MutexKey]: Fix some markup typos.
Merge branch 'security/decode_value' into 8.0 * security/decode_value: decode_value(): Allow to restrict decoding to simple types
MIME: Stricter types.
Doc [Ffmpeg]: Fixed some markup issues.
SSL.Constants: Remove obsolete (draft-only) constant.
Doc [SSL]: Adjusted some documentation.
Doc [Crypto.DSA]: Fix typo.
Doc [Gmp.mpf]: Fix AutoDoc markup typo.
Protocol.DNS: Windows has a hosts file too.
Implemented Promise variants of async lookup.
async_connect using promises.
Doc: Fix some documentation typos.
Shuffler: Add freerun parameter, to avoid bulkmode/TCP_CORK.
Stdio.Pipe: Add set_nonblocking_keep_callbacks() member.
Shuffler: Support wrap_cb on array sources.
Shuffler: Add support for a single-byte source.
LFUNs: Update the types for lfun::`+(), lfun::``+() and lfun::`+=(). These lfuns are no longer called with multiple arguments, so update the types and documentation accordingly.
Fix typo.
pgsql: Simplify SQL logging.
Inotify: add_watch() now returns -1 on some failures. This is to simplify differentiation between failures due to the filesystem being in flux (eg races), and failures due to resource limits. Fixes race condition (time of check, time of use) in Filesystem.Monitor.basic.InotifyMonitor()->register_path(). Fixes #10059.
Documentation: fix markup errors
Program.annotations: invert recursion flag to make more sense for the default case.
Thread.RWMutex: Added current_locking_{thread,key}s().
EFUNs: Added efuns for accessing iterator state.
Stdio.Buffer [search]: Support searching for substrings.
Gettext: Prevent argument of textdomain from being empty
strftime: Remove non-standard conversions %k and %l from doc and testsuite These are not part of any C standard, not even C2x. Thus libc can not be expected to implement them.
Program: add Program.annotations() for retrieving annotations defined on a program.
More documentation of HeaderParser->feed
SSL.ServerConnection: Added API clarification.
Concurrent: Move handling of aggregated promises to AggregatePromise. This simplifies the code for promises that do not use aggregation, and avoids bugs when aggregation functions are used in combination with non-aggregation functions.
Concurrent.Future: Added try_get().
Concurrent.Future: Added query_{success,failure}_callbacks().
Concurrent.Promise: Refactored the dependency handling. Get rid of multiple cases of circular referencing via AggregateState. Removes the AggregateState class. The folding function no longer gets called with failure values. The successful array result no longer contains failed values. References between Promises and Futures should now strictly be only in the result notification direction. API-compatible, user level code should not notice any differences.
Val.Range: Fixed multiple warnings. Also adds some FIXMEs regarding the API.
Threads.RWMutex: Use the same Key class for both read and write. Reduces code duplication and complexity a fair bit.
Thread.RWMutex: Removed remnants of support for recursive locks.
Stdio.Buffer: Reduce run-time argument strictness in _search(). Searching for values that aren't possible isn't an error, so avoid the precompiler generating errors for such parameters. Fixes testsuite failure searching for character -1.
HTTP.Server: Expose filename_to_extension().
Stdio.Fd: This is now a PIKECLASS.
Thread: Mark simulated MutexKey objects for immediate destruction.
Move Markdown into Parser and leave a stub behind in Tools
markdown: Add very basic autodoc markup to Renderer
SSL.Context: Context commits to tickets via offers_tickets() In certain situations, i.e. after receiving an empty Session Ticket extension (client supports, but does not yet have a ticket), by including the Session Ticket extension in the server hello commits us to providing a ticket later. As SSL.Context would simply return 0 in encode_ticket() when use_cache was zero (not the default), we used to break the protocol on such occasions. Instead, we now use SSL.Context()->offers_tickets() to signal whether Session Tickets should be supported on the connection (and whether the Context commits to encoding a session as ticket later on).
Arg: Document the help/usage system.
Thread.ResourceCount: Provide fallback implementation
Documentation [_Stdio]: Added some doc.
Documentation [Stdio.Buffer]: Fixed markup typo.
Documentation [Stdio]: Document low-level classes.
Stdio.UDP: Added `_fd().
Stdio.UDP: Support the default destination in send().
Stdio.UDP: Adjust query_mtu() to account for headers.
Documentation [Stdio.UDP]: Improved doc for some constants.
SSL.DTLSState: Implemented sliding window for sequence numbers. Needed for DTLS (#10032).
Documentation [Stdio.File]: Enabled some Autodoc markup.
Documentation: Fixed autodoc syntax for bcrypt_{hash,verify}(). Fixes #10022.
Crypt.Password: Support bcrypt hashing.
Operators: `|() now supports UNDEFINED with multisets. Fixes #10021.
ADT.OrderedMapping: Improve docs.
Documentation [Stdio.Port]: Documented changed set_id(). #4312
pgsql: Toggle cache_autoprepared_statements default.
Addressed code review issues Forward port from Pike 8.0 as noted in #10012.
SSL: Do not accept MD2, MD5 and SHA1 signatures any longer Web browsers and others have distrusted SHA1 a long while ago, MD2 and MD5 are at this point simply dangerous to support. However, we now support configuration of supported signature algorithms via @[SSL.Context] in case any use case simply needs to support older signature algorithms.
Merge branch 'grubba/pty-handling' into 8.0 * grubba/pty-handling: Process.Process [NT]: Added modifier "conpty".
Process.Process [NT]: Added modifier "conpty". This modifier associates a ConPTY with the new process without also setting any of stdin, stdout or stderr. Fixes #10008.
Documentation [Stdio]: Added some more notes regarding PROP_TTY.
Merge branch 'grubba/pty-handling' * grubba/pty-handling: Process.create_process [NT]: First go at attempting to support ptys. I/O [NT]: Make Pike_NT_* available to the rest of Pike. Process[NT]: Switch to using STARTUPINFOEXW. I/O [NT]: Added debug_fd_openpty(). I/O [NT]: Reading from the console on NT may fail with ENOMEM. I/O [NT]: Restructured debug_fd_read() somewhat. I/O: Added fd_*-wrapper for openpty().
Process.create_process [NT]: First go at attempting to support ptys.
Stdio: Some pty-handling cleanup. Add wrappers emulating missing libc functions.
Merge branch 'grubba/pty-handling' * grubba/pty-handling: Process [NT]: Support UTF-8 in create_process(). I/O [NT]: Added low_dwim_utf8_to_utf16().
Merge branch 'grubba/fdlib' into grubba/pty-handling * grubba/fdlib: (55 commits) I/O [NT]: Use read-write locking for fd_busy and fd_to_{socket,handle()}. I/O [NT]: Fixed typo. I/O [NT]: Avoid blocking on read from pipes with data. Added some paranoia System [NT]: Normalize the drive letter explicitly in normalize_path(). System [NT]: More normalize_path() fixes. Configure [Solaris]: Fixed quoting level issue. System [NT]: Fixed trailing slashes from normalize_path(). I/O [Solaris]: Fix getcwd() on Solaris. I/O [NT]: Fixed a few warnings. I/O [NT]: Moved bulk of normalize_path() to fdlib. System [NT]: Update normalize_path() to use UTF8. I/O [NT]: Get rid of DO_NOT_WARN(). I/O [NT]: Added some more FD_DEBUG. I/O [NT]: Fixed typo in FD_DEBUG code. Build [NT]: Always use or own implementation of _dosmaperr(). Build [NT]: Improved support for MSVC 2010 (aka MSC 1600). I/O [NT]: Fixed deadlock. I/O [NT]: Updated FD_DEBUG diagnostics. I/O [NT]: Survive invalid UTF-16 surrogate pairs. ...
Merge branch 'grubba/pty-handling' * grubba/pty-handling: Stdio: Added support for PROP_TTY to pipe(). Stdio: Some pty-handling cleanup.
Fix docs formatting
Crypto.Password: Fixed some warnings.
Crypto.Password: Added support for NetBSD-style crypt_sha1().
SSL.ServerConnection: Session tickets (RFC 4507 and RFC 5077). Server side support for session tickets. Note that the default ticket encoding is to use the session_id, it thus uses server side state. The ticket encoding can be changed by overriding {en,de}code_ticket() in SSL.Context. Implementation verified against OpenSSL's s_client. Backported from 372b2a05d05fa0d0e052e6634d2acf8d03629ed4 by Tobias Josefowitz.
Documentation [Image.TIFF]: Enabled some doc.
LFUNs: Added lfun::_reverse(). This is a function that is called by reverse() to generate a reversed object.
Added support for SHA-256 HTTP Digest
Reworkd HTTP Authentication quite a bit. Supports client and server.
Documentation [Charset]: Fixed markup typo.
Documentation [DVB]: Fixed some markup issues.
ADT.CritBit.BigNumTree: Disable autodoc more robustly. CExtractor now actually errors about spurious @endclass directives, which means we need to use DOCSTART() and DOCEND() around them in {tree,iterator}_source.H as we define DOCSTART() to /* in bignumtree.cmod to disable autodoc generation.
Crypto.Password: Added support for PBKDF2 password hashes. These are hashes generated by Python PassLib and Phpass.
Pike: Move DestructImmediate to the Pike module.
Documentation [SSL]: Fixed typo.
Compiler [generators]: Added yield().
Documentation [Gmp]: Fixed markup issue.
Nettle: Added support for CMAC.
Better selection of quote charactes.
__builtin.Sql.Result: Added a default implementation of eof(). This fixes an issue where eg _sprintf() throws errors for some drivers.
Mysql.Result: Update the index counter when fetching rows. Call Sql.Result::increment_index() at relevant places. Fixes testsuite failure. Fixes PIKE-197 (#8197).
Documentation [Sybase]: Fixed broken AutoDoc markup. Fixes the inheritance graph for predef::...
Documentation [Mysql]: Fixed some Autodoc markup typos.
SSL.File: Add support for set_nodelay().
Merge branch 'tobij/fix-precompile-get-storage_2' * tobij/fix-precompile-get-storage_2: Tools.Standalone.precompile: Fix storage offset handling
Documentation [Pike.InhibitDestruct]: Added some cross-references.
HTTP.Server.Request: Restore backward compatibility and fixes to Shuffler. Changes to HTTP.Server.Request: - Support set_mode() in HTTP.Server.Request to optionally enable Shuffler to output the data on the wire. Without setting it, it will revert to the old buffered-output method. - Reinstate write-timeout on HTTP.Server.Request, make sure it works in both classic and Shuffler modes. Changes to Shuffler: - Add automatic TCP_CORK support. - Clean up code duplication between shuffler and sendfile. - Move wrap_callback from a separate member to an optional argument to add_source(). - Add support for Stdio.Buffer. - Adding empty sources works consistently now. - Fix broken cornercases when adding strings or memory regions. - Fix dataloss when using non-blocking io on input files. - Support starting in a file at the spot where the filepointer is. - Add start/length arguments to the main Shuffle object, to skip and limit in the entire concatenated output (needed for HTTP-range support).
Documentation [Locale]: Some minor adjustments.
Gz: Put classes in separate files to lower memory footprint.
Stdio.Buffer: Stricter types. Use string(8bit) in more places.
Stdio.File: Support openat with a single argument. Also fixes: - Avoid a SEGV when supplied with a single argument. - Synchronise low level implementation with pike level by setting the default mask to 0777 everywhere.
Documentation [SSL.Constants]: Updated AutoDoc.
SSL.Constants: Fixed typo.
Standards.PKCS: Updated with references to RFC 8410.
Web.Api: Add and rewrite support for all Google APIs (past/present/future).
Tools.Standalone.precompile: Improved doc.
Compiler: Export state of no_deprecation_warnings ... in the active compilation to Pike.
Implemented MD5-sess algorithm.
Added support for Digest MD5
Pike.ProxyFactory: Added new function. This is a factory for creating classes that act as a proxy for the specified program.
Concurrent.Promis: Fix/optimise delay() and timeout().
Toole.Standalone.test_pike: Complain about calls of handle_error().
System.Memory: Stricter types for p{read,write}*(). Also fixes the typo in the type for pread{16,32}n().
Testsuite: Protect lots of lfuns.
EFUNs: lfun::_destruct() may now inhibit explicit destruction. lfun::_destruct() returning 1 now causes the object to survive an explicit destruct() call. Note that the object will still be destructed if the destruct is for any other reason.
Documentation [master]: Added some AutoDoc mk II markup.
Merge commit '722771973bd' into patches/lyslyskom22891031 * commit '722771973bd': (6177 commits) Verify that callablep responses are aligned with reality. ...
Merge commit '2470270f500c728d10b8895314d8d8b07016e37b' into grubba/typechecker-automap * commit '2470270f500c728d10b8895314d8d8b07016e37b': (18681 commits) Removed the old typechecker. ...
Concurrent.Future: Added wait(). This differs from get() in that it will not throw on failure.
EFUNs: backtrace() now takes an optional argument. Calling backtrace() with an argument of 1 now causes it to return an array(LiveBacktraceFrame) instead of an array(BacktraceFrame).
Builtin.LiveBacktraceFrame: Initial implementation. NB: Some features are still missing.
Documentation [Concurrent]: Note where backend state isn't propagated.
Concurrent.Future: Added promise_factory(). This makes propagating state to new Promises easier. New Promises are now created with the same backend as the Promise they originated from.
Documentation [Concurrent]: Added note about backend disabled mode.
Concurrent.Future: Added {get,set}_backend(). This makes it possible to have a custom Pike.Backend handle the callbacks for the Future.
Concurrent.Future: Added internal function call_callback(). This makes it possible to adjust the way that callbacks are called via overloading. The typical use case is for wanting callbacks to be called by some other thread than the backend.
Merge branch 'marcus/exif_sanitization'
Merge branch 'marcus/exif_sanitization' into 8.0
Stdio: Buffer mode now uses ->write(Stdio.Buffer()) API As part of this change, the Stdio.Buffer()->__fd_set_output() API got replaced by Stdio.Buffer()->__set_on_write(), and users (File and SSL.File) have been adopted to use it.
Compiler: Fix autodoc typo
Documentation [Stdio.File]: Fixed some markup issues.
AutoDoc: Added some support for parsing annotations.
LFUNs: Added magic lfun ::_annotations().
Merge branch 'patches/pike156' into 8.0 * patches/pike156: EFUNs: Hide mutex keys and crypto contexts from backtraces.
Merge branch 'patches/pike156' * patches/pike156: EFUNs: Hide mutex keys and crypto contexts from backtraces.
EFUNs: Added m_add(). This function adds (as opposed to inserts) an element to a multiset. Also adds corresponding (fake) lfun::_m_add().
Make werror() (and by extension exit()) respect current locale This makes it possible to output non-ASCII text and still have it legible in all environments. write() still outputs binary data, and so will werror() and exit() in 8.0 compat mode. Also, restore master.pike.in to ISO-8859-1 encoding, which is the only one supported for the master, and remove the (now superfluous and) aribitrary use of string_to_utf8() for the copyright message.
EFUNs: m_clear() now supports multisets and objects. Adds LFUN _m_clear().
EFUNs: m_delete() now supports operation on multisets.
Thread.Condition: Improve docs.
Compiler: Added Pike.Annotation. The compiler now calls end_pass() in any annotations on the program being compiled once each compiler pass.
Merge branch 'master' of https://github.com/mkrawczuk/Pike * 'master' of https://github.com/mkrawczuk/Pike: if -> else if Enable string import of single files. Throw error on failed import.
if -> else if
Stdio.File()->read: add optional offset argument and documentation
Documentation [Threads]: Some notes about interrupt() and kill().
Stdio.Buffer: Added support for escapes to read_cstring().
Fix refdoc typo.
Protocols.WebSocket: Added low_{connect,websocket_accept}(). Backport from Pike 8.1: This breaks out the generation of WebSocket HTTP headers to separate functions, which makes the modules easier to instrument for testing. Also adds the symbolic constant websocket_version.
Fix copy-paste error in refdoc.
Cpp: Added some optional parameters to define_macro(). Renumber the CPP_MACRO_* values, so that the ones useful for users (CPP_MACRO_VARARGS and CPP_MACRO_KEEP_NL) come first. define_macro() now accepts two additional optional arguments; numargs and flags.
CHANGES: Added note about inherit of CompilerEnvironment.
Merge branch 'pike-modules/sass' into 8.0 * pike-modules/sass: Documentation [Sass]: Some clarifications regarding sass2scss(). Added method sass2scss to convert Sass syntax to SCSS syntax.
Documentation [Sass]: Some clarifications regarding sass2scss().
Added method sass2scss to convert Sass syntax to SCSS syntax.
Added the option "sass_syntax". This option will parse the input as having indented Sass syntax. This option only has effect in compile_string(). Also wrapped an unused argument in UNUSED().
Merge branch 'patches/pike111' into 8.0 * patches/pike111: Sql.mysql / Mysql.SqlTable: Use UTF-8 encoded UTF-16 in a couple of other applicable cases. Sql.mysql: Use/support UTF-8 encoded UTF-16. Testsuite [utf8_to_string]: Fixed typo. EFUNs: Support encoding to UTF-8 encoded UTF-16 in string_to_utf8().
Merge branch 'patches/pike111' into 8.1 * patches/pike111: EFUNs: Support encoding to UTF-8 encoded UTF-16 in string_to_utf8().
CPP: fixed refdoc comment
Documentation: corrected documentation on set operators The operators |, &, - and ^ on arrays rely on the content having an ordering which is compatible with `==. Mention this in the documentation, as this will otherwise lead people to writte buggy code.
master: fixed refdoc comment
EFUNs: Rewrite of validate_utf8(). Changed validation approach in validate_utf8() to simplify the code, and make it easier to read/understand. Also adds some corresponding testsuite tests.
EFUNs: Added validate_utf8(). This efun checks whether a string is valid UTF-8 or not.
pgsql: Add streaming_typed_query() method to avoid emulate_bindings().
Debug.Rapidlog: New module for loggingfloods with minimal latency.
Simple code to support javascript
Efuns: Support little-endian input in string2hex().
sprintf: Officially support %p to display addresses.
Merge branch 'grubba/fdlib' into 8.0 * grubba/fdlib: System [NT]: Update normalize_path() to use UTF8.
MIME: Setter for message boundary prefix.
Sql: Formalise blocking nature of affected_rows(), improve docs.
pgsql: Make affected_rows() and status_command_complete() wait for a meaningful result.
I/O [NT]: Use new low-level functions from Process.
Merge branch 'pike-modules/sass' into 8.1 * pike-modules/sass: (79 commits) Testsuite [Sass]: Check that Tools.Sass is available. Sass: Hide the s8 symbol. Sass: Use HAVE_LIBSASS instead of HAVE_SASS_H. Sass: Clean up configure script. Sass: Clean up acheader.h. Sass: Removed redundant cast. Sass: Adjusted debug message. Sass: Fixed a few C99-isms. Sass: Don't throw pike errors through the libsass layer. Sass: Error messages need to end with a line feed. Sass: Cleaned up documentation a bit. Sass: Fix building in a separate build tree. Sass: Generate config.h.in from acconfig.h. Sass: Removed obsolete stuff from Makefile.in. Sass: Removed quite a bit of stuff. ...
Sass: Cleaned up documentation a bit.
Added Thread.Farm()->set_thread_name_cb() to help applications that monitor thread creation and termination for the purpose of tracking thread names.
Added convenience function to decrypt private key.
Documentation [Crypto.ECC]: Added reference to rfc.
Documentation: Document some more of the master.
Remove some stale code and update documentatin.
Somewhat more flexible opportunistic TLS implementation.
Improve docs.
Documentation: Restore the @namespace directives in master.pike. These were lost in the previous commit.
Fix typos and docs.
Filesystem.Monitor: Clean up rescheduling of backend_check().
String.Buffer: Moved implementation. Moves implementation of String.Buffer from builtin.cmod to string_builder.cmod. Adds initialization of the module to happen before that of cpp. This will allow cpp.cmod to rely on String.Buffer to exist at compile time.
Deprecate RegGet*_76 and move RegGet* from efun to System.
Testsuite [Compiler]: Test indices() values() on programs. Symbols should only be listed once...
strptime/strftime: Added at global level; rip out special strptime/strftime in Val.*.
Sql.Connection: Fallback big_typed_query() to big_query(), and streamline docs.
pgsql: Readding primitive auto-reconnect logic.
Sql.Promise: Add support for eventbased mapping of resultrows.
HKDF rewrite. Should now be possible to use in TLS 1.3
Whitespace and doc fixes.
Debug.find_all_clones(): Fixed off by one issue. It now seems to work as intended also when include_subclasses is true.
MPI: Fix documentation for Init() and Finalize().
Debug: Added find_all_clones().
Restore part of AmigaOS support.
Missed a typo.
Equvivalent and equivalent are not equivalent.
Sql.sql_util.UnicodeWrapper: add fetch_row_array(). For compatibility with newer Sql.Result API.
Documentation: Added doc for Builtin._take_over_initial_predefines().
Val.Timestamp,Date: Support strftime()/strptime().
Move to ISO date format to avoid mm/dd, dd/mm confusion.
Val.Range: Add !, <<, >>, isempty(), merge() and contains().
mktime: Clarify docs.
JSON5: new module, not quite complete (missing proper symbolic numbers.)
Update GTK2 docs from source
Nettle: Fix AES128_CTR_DRBG on ILP32 architectures. 1L<<48 is zero on ILP32... Also some related ILP32 fixes for the reseed_interval getter/setter.
Moved out time-code from __builtin to Val. Reduces start overhead and prevents clobber of System.Time.
Documentation [Filesystem.Monitor]: Some clarifications.
TimeTZ: Add docs, finetune constructors.
Val.TimeTZ: More testsuite entries, docs and fixes.
Val.Time/Date: Small fixes, increased orthogonality of operators.
Change constants into inherited classes to make them show up in refdoc. Performance penalties?
Val.Timestamp et al: Moved the presence of the new types from the root to Val for now.
Timestamp/Date/Inet/Range: First stab at proper documentation.
Sparse list of version support added.
Range: Reuse Math.inf etc; Use NetUtils.
Val: Cleanup references.
Val.NaN: Move definitions from __builtin to Val to avoid circularities.
Sql.Timebase: Adjust SQL-native types to support nanosecond resolution.
Sql: Add native support for Time, Date, Timestamp, Interval and TimeTZ types.
master: Document the resolver some more.
RC4 is alias for Arcfour
master: Added some documentation about the master filesystem.
Concurrent: Reduce stackdepth, minimise catch() breadth.
Concurrent: Improve more docs.
Concurrent: Improve docs.
Concurrent: Add convenience variant to zip() and extend testsuite.
master: Added some documentation.
HTTP.Promise2: Offer get() instead of data in the Result object.
HTTP.Promise2: Proposed changes/optimisation/simplification of HTTP.Promise.
Crypto.Hash: Stricter string types.
Crypto.Hash.SCRAM: Moved class. Move Crypto.SCRAM to __builtin.Nettle.Hash()->SCRAM analogous to other similar APIs. Crypto.SCRAM(Crypto.SHA256) is now Crypto.SHA256.SCRAM(). Also updates the testsuite and Sql.pgsql_util accordingly.
Concurrent: Cleanup.
Concurrent.Promise: depend() fixes. Rename apply_fold() to fold(). Add first_completed(). Add min_failed(), max_failed(), any_results().
Added minimal AES128 CTR DRBG random generator from NIST SP800-90Ar1
Sql.Promise: Improve docs.
Concurrent.Future: depend(),fold() and apply_fold(); interfacechange.
Sql.FutureResult: Polish docs and internals; uses status_command_complete instead of exception.
Add history pop function to Readline for Hilfe's benefit
Promise: Rename fold_finish() to apply_fold().
Promise: Add depend(), fold() and fold_finish() methods.
Sql.Connection: Added missing methods (amongst others: asynchronous callbacks).
Doc fixes.
SSL.File: Added support for set_buffer_mode(). Adds support for user provided buffers in both directions. Updates the {read,write,close}_callbacks to the current conventions of Stdio.File (this includes defaulting the callback_id to this_object()). Also adds some corresponding tests to the testsuite.
pgsql: Create proxy object to avoid circular references.
Thread.ResourceCount: New module to implement resource counters.
Crypto.SCRAM: New module.
Sql.Sql: Support error(void|int clear).
Nettle.Hash.HMAC: Fix non-default block_sizes(). Fall back to the default (generic) HMAC implementation if a non-standard block_size() is requested. Fixes [LysLysKOM 22249286]. Thanks to Stephen R. van den Berg <srb@cuci.nl> for reporting the issue. Also adds some related documentation.
Debug.Inspect: Allow forced dumps.
Crypto.SCRAM: Update docs.
Crypto.SCRAM: API updated, implemented serverside and testsuite.
pgsql: Simplify and bolster the code by using Thread.ResourceCount.
Change destroy() to _destruct().
Modules: Fixed logts of warnings. More fall out from the LFUN::destroy ==> LFUN::_destruct rename.
Fix multiple warnings. LFUN::destroy() has been renamed to _destruct().
Add GL.GLSL and GL.GLSLUtil. This was a project by Per Hedbor that he intended to prepare for inclusion in Pike and shared as a separate repository on the pike-git server, albeit yet in the form of an external module. We have now performed the integration into Pike as a post_module.
Crypto.Checksum: Update docs.
WhiteFish.Blobs: Minor code cleanup. Get rid of a cast by using a different function. Also some documentation cleanup.
Pike.Lazy: Improved typing. Also some documentation updates.
Added some helper methods to Crypto. string md5(string data, void|bool raw) string sha1(string data, void|bool raw) string sha256(string data, void|bool raw) These methods return a hexadecimal string unless `raw` is given. These methods are composed via the helper method `hash()`. string hmac_md5(string secret, string data) string hmac_sha1(string secret, string data) string hmac_sha256(string secret, string data) These methods return a hexadecimal string. These methods are composed via the helper method `hash_hmac()` which can be used to construct new hmac hashing functions.
Removed trailing spaces.
Crypto.ECC.Curve25519.EdDSA: Added jwk(). Support generating JWKs for Ed25519 keys.
Added missing documentation note of month_days
US date formatting, m/d/y.
__builtin.Nettle.Hash._HMAC.State: Implement jwk(). Web.encode_jwk() should now support generating JWKs for HMACs. Fixes remainder of PIKE-39 (#8039).
Crypto.ECC.Curve.ECDSA: Implemented jwk(). Support generation of JSON Web Keys (JWKs) from ECDSA objects. Fixes more of PIKE-39 (#8039).
Crypto.RSA: Implemented jwk(). Support generation of JSON Web Keys (JWKs) from RSA objects. Fixes some of PIKE-39 (#8039).
Protocols.DNS: Add support for CAA records. Certificate Authorities are actually required to check for them since this month as mandated by the CA/Browser Forum.
Stdio.File(): close() fixes. Unify low level calls close_fd() and close_fd_quietly() to reduce code duplication. Fix error handling in close_fd() and do_close_fd(). POSIX says that fds are closed on all errors except EINTR, where it is unspecified. Don't complain about close(2) failing with EBADF if it previously failed with EINTR. Ignore close(2) failing with ECONNRESET. This happens on eg FreeBSD when there is still data pending to be sent and the peer has already closed the connection. Fix documentation for the return value of close(). Potential fix for testsuite failures on FreeBSD.
Add extensible error handling in Protocols.DNS.server Some servers might want to report errors during other mechanisms than werror. By moving the error reporting to the new report_decode_error() method, it is easy to override that method and do something else. Likewise, some servers might want to not reply to malformed requests. Move that code to the new handle_decode_error() method.
Parser.PKCS: Added some support for PKCS#10.
Standards.PKCS: Fixed decoding of PKCS#8 public keys. The public key data is for some reason kept in a BIT STRING (and not in an OCTET STRING)...
Nettle [Blowfish]: Don't throw errors in make_key(). Let make_key() generate a new key if the generated key isn't accepted by set_encrypt_key(). Fixes issue where eg Nettle.Blowfish()->make_key() intermittently threw errors due to the generated key being weak.
Fix spelling of 'necessary' in comments and docs
Fixed digest_info.
Pikedoc fixes.
Filesystem.Monitor: Added report(). This provides an API to simplify targeting tracing of the Filesystem.Monitor operation. Fixes PIKE-17 (#8017).
NTLM hash added
Rename Debug.Peek to Debug.Inspect.
pgsql: Suppress errors if the server gets lost.
System.FSEvents: Fixed Autodoc mk II markup.
Filesystem.Monitor: Fixed some typos.
Stdio: filesystem_stat() on Linux should now set fstype.
ADT.Heap: Survive the same Element being pushed multiple times. Calling push() with an Element already present on the heap is now equivalent to calling adjust() with the same element. Previously the heap got corrupted in the above case.
Debug.Peek: New class for interactive debugging and live data inspection.
Standards.X509: Reduce code duplication. Use a common function for adding certificates in load_authorities(). Also some minor documentation updates.
Documentation [Crypto]: Fixed some references.
Fixed documentation for Image.Color's HSV color space parser.
Decoding of negative integers was broken. Remove pike implementation completely and always use the C version.
Added basic little endian support to reading Stdio.Buffer.
Backend.PollDeviceBackend: Make set_signal_event_callback() optional. Fixes "Warning: An expression of type function({ Backend = object(implements _static_modules.Builtin()->DefaultBackendClass) } : void) cannot be assigned to a variable of type function({ Backend = object(implements _static_modules.Builtin()->Backend) } : void)." Thanks to Per Cederqvist <cederp@opera.com> for the report. Fixes [LysLysKOM 22067696].
Add a little docs to Protocols.WebSocket
search: Fixed end of range condition. Fixes testsuite failure.
Web.encode_jws(): Make the media_type argument optional. RFC 7515 4.1.9 says that the header field "typ" is optional, so make it possible to generate such JWSes.
Nettle.Curve25519: Improved support for JOSE. Implements some parts of RFC 8037.
Sql.sqlite: Added big_typed_query() et al. The SQLite glue should now use the same conventions as the others.
Documentation [MasterObject]: Documented some more stuff. Also restructures the markup a bit.
Oracle: Use __builtin.Sql.
Documentation [Nettle]: Fixed cut'n'paste typo.
Added a global on_failure to capture errors not handled in individual promises.
Fix docs typo
search: Added end argument for the string and array cases.
Protocols.HTTP.Server.Request: Added some AutoDoc markup.
Support multiple instances of the same option.
Added the content_type getter to Protocols.HTTP.Promise.Success and added automatic decoding of gzipped data. This means the explicit decoding in Web.SOAP isn't neccessary anymore.
Compiler: Make #pragma disassemble available --without-debug.
Protocols.DNS: fix decoding and add encoding of LOC RRs.
Web: Added decode_jwk{,_set}(). These decode JOSE keys coded according to RFC 7515.
Crypto.ECC.Curve.Point: Allow creation without arguments again. Points now default to 'g'. Fixes several testsuite failures.
__builtin.Nettle.ECC_Curve.Point: Require coordinate. Nettle doesn't provide a default coordinate on initialization, which means that Points created without arguments are likely to be off the Curve. Don't allow this for now. Possible alternatives would be to initialize to 'g' or infinity.
Crypto.ECC.Curve: Added some more support for JOSE. Added jose_name(), which returns the RFC 7518 name for the curve. It is now possible to initialize a Point from a JWK.
Crypto.RSA: Support initialization from a JWK mapping.
Add _sprintf() to Thread.Mutex() that prints current locking thread. Switch to hex-based thread IDs in _sprintf() for Thread.Thread() for easier reading.
Make it possible to replace a node with multiple nodes.
Documentation: The DefaultCompilerEnvironment is a CompilerEnvironment.
Documentation [LFUNs]: Improved doc for lfun::`->=() et al.
Merge branch 'rosuav/gtk2-drag-drop' into 8.1
GTK2: Improve documentation
GTK2: Implement TreeView drag-and-drop
GTK2: Implement TreeView drag-and-drop functions
Documentation fixes. No need to push 0 on void functions.
Calling crypt() now crypts a random string. Useful as a quick way of generating passwords.
Have Charset.Encoder->set_replacement_callback return the object for call chaining.
If a character can't be encoded in the selected charset, XML-encode it instead of exception. Allow for user override of character encoding in render_xml.
Added Nettle.version()
Concurrent: Support creating promises from traditional methods with callbacks.
Parser.XML: node_to_struct() convenience function.
Concurrent: then() and thencatch() support smart mapping, improve docs.
EngineIO/SocketIO: Minor cosmetic fix and adjust reference in CHANGES.
SocketIO/EngineIO: Packetised queues, increment protocol versions for both. SocketIO/EngineIO: Drop id parameter, it's better solved using inheritance. EngineIO: Prioritise PING/PONG messages.
Added example uses.
Expanded on failure condition on async_connect.
Documentation [sscanf]: Fixed some typos and markup.
Major redesign of the refdoc. Also removed some obsolete stuff.
SOAP: SOAP glue functions including a limited wsdl parser.
Fix doc prototype.
More narrow documentation.
More documentation.
WebSocket: finish the extension support revert Some changes had not been reverted
Revert EngineIO and SocketIO from 8.0 for now.
Revert sprintf %m.
Revert "Add Unicode support to MIME.Message via a subclass." This reverts commit 5d65d4d56ddbfea827045c8aa690ea7a5654abaa.
MIME.UnicodeMessage: Decode the message body according to the charset
Add Unicode support to MIME.Message via a subclass. * Minor refactoring that should have no visible external effect * One new constant, _is_unicode_message, which changes how create() parses the headers * An additional (optional) parameter to parse_headers() * New class MIME.UnicodeMessage, documented as being 21-bit Unicode everywhere, with deviations from such considered to be bugs.
Concurrent: Improved thread safety for Results and Fold.
Concurrent.Future: Support multiple concurrent callbacks. Multiple success and failure callbacks may now be registered concurrently. This is needed to avoid surprises when implicit callbacks are installed by eg flat_map(). Also some related documentation updates. Fixes [bug 7816 (#7816)].
ADT.Heap: Added low_pop(). This function is analogous to low_peek().
Protocols.WebSocket: refactored WebSocket extension support Added a new API which allows implementing Extensions as Protocols.WebSocket.Extension subclasses. This is used both for real WebSocket extensions, as well as defragmentation and conformance checks. Updated the documentation accordingly.
The start parameter to search() has no effect on mappings.
Documentation: Documented optional further args to search(). Also fixes the types for search() and lfun::_search().
Documentation: Improved doc for search().
Stdio.Buffer: Added _search().
Documentation [Nettle]: Improved doc for Curve25519.
Nettle: Added support for Curve25519 and EdDSA25519. CAVEAT: API subject to change! Note that these have a different API than the other ECC curves due to a different low-level API.
Query: timed_async_fetch() didn't support chunked transfer encoding. Promise: Some pikedoc fixes.
Some Pike-doc fixes.
WebSocket/EngineIO/SocketIO: Simplify specifying options per packet.
EngineIO: Drop named inherits. binary frames, make compression overridable.
SocketIO: Streamline Universe API, events run in their own threads. Add onclose(), various cleanups.
SocketIO: Streamline Universe API, events run in their own threads.
EngineIO: Rename options to lower visibility outside the class.
EngineIO: Tune deflate compressionparameters.
Gz.deflate: Add clone() method; allows for testing compression. Gz.File: Support setting the window_size in setparams(). Gz: Support Z_BLOCK and Z_FULL_FLUSH.
EngineIO/SocketIO: Improve documentation.
SocketIO/EngineIO: Define PDT() debugging macro. Define DUSERERROR() macro. Throw proper errors with backtraces. Link statically as far as possible. Provide sid and lastrequest members on SocketIO.Server. Pass up ERROR messages from the protocol.
GTK2: Document GdkPixbufLoader stubbily so the magic happens (Do the magic! Do the magic!)
Protocols.WebSocket: added API for continuation frames
Increase default compression level to 9.
Add set_nodelay() function to Stdio.File objects to control Nagling
Document the link between set_keepalive and setsockopt
Implement Stdio.File()->setsockopt()
Stdio: added getprotobyname()
Compiler: Added CompilerEnvironment()->lock(). This is a class that exposes the compiler internal lock. Fixes some of [bug 7783 (#7783)].
Documentation [cpp]: Fixed warning generated by example.
Documentation [Multiset]: Added minimal description.
Debug: Added hexdump().
Allow for only specific tags to be parsed and the rest ignored.
Reuse the tag parsing loop.
SSL.Constants: Added enum Extension. Fixes some documentation references.
Documentation [SSL]: Improved AutoDoc mk II markup somewhat.
Crypto.DH [SSL]: Updated with references to RFC 7919.
Documented some of the new Randomness subsystem.
Stdio: Added enums File{Mode,Property}Flags. Also adds corresponding documentation. Fixes some broken documentation references.
Tools.AutoDoc: Added support for @enum/@endenum. It should now be possible to document enums at the C-level.
Documentation [SSL]: Document the fmt_*() functions.
Fixed autodoc
Protocols.LDAP: Support passing an SSL.Context to get_connection(). Sometimes the default SSL.Context isn't appropriate, so support passing a custom one along to Protocols.LDAP.client().
Calendar [FAQ]: Removed references to localization.h. localization.h is no more, so don't refer to it.
Added Int class used to case argument to integer. Made Default type agnostic.
GTK: Fix docs typo
It's tedious to write trim_all_whites. Make trim the canonical name.
Efuns: Fixed multiple issues with the new hash(). It now follows the same API as the old hash() (ie the second argument is a modulo). It now also has the same value range as the old hash (eg it no longer returns negative values), and returns the same value on both 32-bit and 64-bit platforms. As a side-effect this fixes a buffer read overrun when the second argument was larger than the length of the string. It no longer leaves droppings on the stack. Updated the testsuite.
Standards.PKCS.PFX: Added minimal AutoDoc markup.
Protocols.HTTP.Server: fixed handling of range requests - The content-length header must contain the length of the entity body, not the full length of the resource - The instance-length part of the content-range header should be the full length of the resource, if known, or '*'
Gmp.mpz: Simplify `**(). Let ``**() convert its argument to a bignum and call `**() in it. Also adds some special cases. This fixes some remaining testsuite failures.
Documentation.
Stdio.Buffer: Support some bignums in add_int32(). FIXME: Ought not to care about the high order bits of the bignum. FIXME: Add similar support to the other add_int*() as well. Thanks to Per Cederqvist <ceder@lysator.liu.se> for the report. Fixes [bug 7712 (#7712)].
Several more ** cases implemented: int ** mpq -> mpq or float float ** mpq -> float mpq ** int -> mpq mpq ** float -> mpq or float mpq ** mpq -> mpq or float mpz ** mpf -> float I am open for suggestions on whether or not the type promoting going on is sane or not. It's at least slightly logical.
_Roxen.HeaderParser: Inverted meaning of last argument to feed(). This makes the default value follow the usual calling conventions where UNDEFINED is equivalent to a left out value.
Concurrent.Promise: Added maybe_failure().
Documentation breakage When preparing a new Debian package of 8.0.240, I noticed that some documentation disappeared, apparently due to the following. The error in Nettle.Sign is already corrected but not the others, AFAICT, and I'm guessing that @exp should be @expr. Patch below, which I home someone can apply right away. ERROR: <Invalid error container: Tools.AutoDoc.AutoDocError(SourcePosition(File: /build/pike8.0-8.0.240/src/modules/Gmp/mpz_glue.c, lines: 668..668), "DocParser", "@exp cannot be used like this: @exp{ ... @}")> ERROR: <Invalid error container: Tools.AutoDoc.AutoDocError(SourcePosition(File: /build/pike8.0-8.0.240/lib/modules/__builtin.pmod/Nettle.pmod/Sign.pike, lines: 102..102), "DocParser", "@item is not allowed inside @array (allowed children are: @elem)")> ERROR: <Invalid error container: Tools.AutoDoc.AutoDocError(SourcePosition(File: /build/pike8.0-8.0.240/lib/modules/Crypto.pmod/ECC.pmod, lines: 286..286), "DocParser", "@item is not allowed inside @array (allowed children are: @elem)")> ERROR: <Invalid error container: Tools.AutoDoc.AutoDocError(SourcePosition(File: /build/pike8.0-8.0.240/lib/modules/Crypto.pmod/RSA.pmod, lines: 368..368), "DocParser", "@item is not allowed inside @array (allowed children are: @elem)")>
Allow preservation of case in headers in HeaderParser. This is needed when acting as a proxy sine some servers treat headers as case-sensitive.
Stdio.File: Support non-empty buffers in set_buffer_mode(). Stdio.File()->set_buffer_mode() now has a defined behaviour for adding and removing buffers that aren't empty. The behaviour is the same as for set_buffer_mode() in SSL.File.
SSL.File: Handle non-empty buffers in set_buffer_mode().
Removed unused class.
Make full use of buffers when parsing incoming frames.
Filesystem.Monitor: Potential fix for [bug 7684 (#7684)]. Avoid recursive mutex locks from destroy() by only locking on explicit destruct().
Renamed pow lfun from pow to `**. This is somewhat incompatible, previously pow(X,3) called X->pow, now it will call X->`**.
Filexyxtem.Monitor: Got rid of update_monitor(). The function didn't work, and if it had worked it would've messed with the internal state of monitors and caused stuff to break.
Parser.RCS: Added feature detection constant "max_revisions_supported".
Parser.RCS: Add optional max_revisions parameter to the API.
Protocols.HTTP.Query: Fixed an old bug (https://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=7676) where basically the timeout in timed_async_fetch wasn't reset each new data read. This timeout had it's own property (data_timeout) which now is "deprecated" since the property "timeout" pretty much serves the same purpose, but on connection. So now timeout is the default value to use unless data_timeout is explicitly set, in which case that value will be used. Since there was no proper way to set a max time for the entire operation (well, that was by accident and not intention how the data_timeout in timed_async_fetch worked) the new property "maxtime" has been added. If this is set (default is 0=indefinetly) the request will be aborted after maxtime second even if data is still being read. So in short: data_timeout = 0 // unless explicitly set timeout = 120 // connection timeout, and then data read timeout maxtime = 0 // 0 = off, otherwise the entire operation must be done within maxtime seconds or else the request is aborted Protocols.HTTP.Session: Added some documentation Protocols.HTTP.Promise: New module which utilise the new Concurrent.Promise/Future stuff for HTTP requests. Internally uses Protcols.HTTP.Session for the actual HTTP stuff. Web.Api.Api: Now fetches data asynchronously when async calls are made. Concurrent: on_success and on_fail now returns the object being called so that they can be chained. Parser.Markdown: Fixed the #require macro directive.
Don't pretend jwa is a variable, to be consistent with name(), digest_size() etc.
Crypto.None: Added the plaintext algorithm.
Crypto.AE: Added class.
Nettle: Added __builtin.Nettle.AE. This is Authenticated Encryption without Authenticated Data.
__builtin.Nettle.MAC: Added support for HMAC-based JWS signatures.
Documentation [__builtin.Nettle.Sign]: Improved JOSE doc.
Implemented HMAC jwa with a little less code.
Web: Updated {en,de}code_jwt() to support HMAC signatures.
Refdoc: Added modfiers to methods, variables and constants. Fixed a Pike doc error in Nettle.Sign.
Inotify: Simulate events for directory content at watch creation. This reduces the race window for tracking directory content. It also simplifies code that does such tracking. Also updates Filesystem.Monitor.basic accordingly.
Documentation [Crypto.RSA]: Fixed cut and paste error.
__builtin.Nettle.Sign: Added JOSE default implementation. Fixes some warnings in SSL.Context. Adds default implementation of jose_{sign,decode}() for signature algorithms that JOSE doesn't support (eg Crypto.DSA).
Web: Added {en,de}code_jwt(). Fixes most of [bug 7671 (#7671)].
Crypto.ECC.Curve.ECDSA: Added support for jose_{sign,decode}().
Crypto.RSA: Some API changes for jose_sign(). Changed argument order and added defaults for the hash algorithm.
Crypto.RSA: Add some support for JOSE JWS signatures.
Crypto: Added algorithm identifiers from JWA (RFC 7518:3.1). Fixes some of [bug 7671 (#7671)].
Web.Api.Api: Fixed so that POST actions actually works. It now also tries to detect if a file is being uploaded. This works by looking at the parameter values and if a value contains "filename=..." a multipart message will be created. So in short this would look something like: string file = "the-file.png"; string data = Stdio.read_file(file); mapping params = ([ "the_file_param" : "filename=" + file ]); api->post("method/endpoint", params, data);
Apple.Keychain: Added initial parser of Keychain files. CAVEAT: This is a VERY limited implementation, and is only intended to be used to extract root certificates from "/Library/Keychains/X509Anchors".
Tools.Shoot: Add an optional prepare function to create test vectors This removes the need to put huge constants into the test program, greatly reducing the memory requirements to run the benchmarks.
Remove deprecated cast_to_int, cast_to_string and cast_to_float.
Fixed the early out when random limit is 2^x and !(x%8). Also some document fixes.
Nettle.KW: This is an AE and not an AEAD.
Nettle.BlockCipher16.KW: Changed API to AEAD.
Nettle: Added BlockCipher16.KW. This is the AES Key Wrapping algorithm from RFC 3394.
Web.Api.Api: When running async the requests gets stored so that they can be forcefully closed if something goes wrong. The public method "close_connections()" will close all open connections.
There is no CVS id string in Hilfe anymore
Documentation [Nettle.Hash]: Fixed typo.
Mysql: Moved and renamed Mysql.mysql_result to Mysql.mysql.Result. This is in preparation for allowing overloading of the Result class.
__builtin.Sql.Result: Removed remains of master_res. This is a base class and not a wrapper...
Threads: Some minor documentation cheanges.
Sql.sql_util [Mysql]: Don't depend on the Mysql module. This makes both MySQLUnicodeWrapper and MySQLBrokenUnicodeWrapper always available, which fixes issues with dumped Sql.sql_util and updating the Mysql module. Also adds some documentation for the MySQLBrokenUnicodeWrapper.
Doc fix.
Use random_string instead of Crypto.Random.random_string
Documentation fixes.
Fix spelling of composite[d]_changed signal
Fix GTK2.SourceBuffer undo/redo signal names
Random: Updated some types and AutoDoc.
Documentation: Added note about some failure modes of rm().
Addressed code review issues
Roxen: Added decoding of surrogates to http_decode_string(). Some javascript code sends %u-encoded surrogate pairs.
ADT.Heap: Added low_peek().
GC [arrays]: Added do_gc_weak_array(). It is now possible to request a quick gc of an array with weak references.
Documentation [GC]: Fixed typo.
GTK2: Fix typo
GTK2: Fix method name linkage
Added Nettle.version
Filesystem.Monitor: Improved thread safety. ADT.Heap is NOT thread-safe (especially not pop()), so use a Thread.Mutex to control access to the monitor_queue. Potential fix for [bug 7644 (#7644)] (where the top element becomes zero instead of an ADT.Heap()->Element).
Revert "Added the Markdown module and the standalone pike_to_html.pike from 8.1." This reverts commit 2706a62c3c72b296a0c77b418f1e186c682c7ac5.
IRC: More properly implement the Channel class and add docs
Added creation method raw to put binary data directly in an image object without adaptation.
Documentation [HTTPAccept]: Fix all references to HTTPLoop. HTTPLoop installs itself as HTTPAccept, so fix the documentation to reflect this. Thanks to Eiichiro ITANI <emu@ceres.dti.ne.jp> for the report.
Removed << on file object. Has been deprecated a while and not properly working always.
Added Fast random generator.
Update GTK2.Notebook docos
Merge branch 'new-pikedoc' into 8.1 * new-pikedoc: New doc layout done! (well, as far as I can tell anyway). It now also works on local modules with module_modref as build target. Start of new layout for the Pike refdoc
New doc layout done! (well, as far as I can tell anyway). It now also works on local modules with module_modref as build target.
Added the Markdown module and the standalone pike_to_html.pike from 8.1.
Make random_seed() a noop and deprecate.
Remove now unused random() implementations.
TURBO2-1398: Allow disabling of wrapping of describe_backtrace output. The wrapping can add lots of spaces to the end of lines to pad them, resulting in enormous backtrace files in some circumstances.
strlen is for strings only these days
Documentation
Move pike compat handling into the Testsuite object.
Less mementos of CVS.
Documentation [Nettle]: Some minor cleanups.
Fixed the _sprintf code.
Readded type information as comments.
Nettle: Added block cipher mode IGE (Infinite Garble Extension).
Documentation [Standards.X509]: Fixed typo.
Move compilation to the test object.
SSL.Context: Deprecated variable require_trust. Setting of this variable is now equivalent to setting the auth_level to AUTHLEVEL_require.
Stop supporting compression by default.
Made hex2string more permissive, as any non-hex characters are now allowed outside hex tuples. It is also less permissive, as non-hex characters will produce an error when in tuples, whereas they were previously treated as 0.
Moved parsing of tests to Testsuite objects.
Stdio.Buffer: added truncate()
Standards.PKCS.RSA: Added oaep_algorithm_id(). Also adjusts the RFC reference for pss_signature_algorithm_id().
Crypto.RSA: Added support for RSAES-OAEP (RFC 3447:7.1).
__builtin.Nettle.Hash: Added eme_oeap_{encode,decode}(). These two functions implement the encoding used in RSAES-OAEP.
Crypto.RSA: Added pkcs_signature_algorithm_id() for PSS.
Removed remnants of Pike.Security
Don't clean up the stack in void functions.
Added an example of how to use an OAuth2 derived module
Crypto.RSA: Cleaned up RSASSA-PSS API. It is now possible to get a PSS signature object from an RSA state by indexing it with "PSS". Eg Crypto.RSA.State rsa = ...; string(8bit) sign = rsa->PSS->pkcs_sign(message, hash); int(0..1) ok = rsa->PSS->pkcs_verify(message, hash, sign); Also adds a corresponding symbol "PKCS1_5" for the traditional (and default) PKCS#1 1.5 style signatures.
Added CRC32C
Added a tool for converting a Pike file into a syntax highlighted HTML file. Usage: pike -x pike_to_html source.pike > source.html This will create a full HTML page. The class also has a public method for converting a string of code into highlighted HTML. This will leave out the <html>...<body> parts in the result.
Crypto.RSA: Added pss_{sign,verify}() implementing RSASSA-PSS. Note: This is a temporary API as it is not compatible with the __builtin.Nettle.Sign API.
Removed no longer needed check_all_args. Removed glob argument from list_fields documentation, which was never supported.
__builtin.Nettle.Hash: Added emsa_pss_{encode,verify}(). These are algorithms specified in RFC 3447 section 9.1, and are primitives used in signatures with RSASSA-PSS.
Functions can not return void|string or void|object.
Don't push 0 in void methods. Don't clean the stack in void methods. Fixed a _sprintf prototype. Converted some code to use RETURN.
SSL: Encrypt then MAC mode is an RFC now...
Rename HASH_sha to HASH_sha1.
Documentation fix.
We can't store UNDEFINED in arrays. Clear up some confusion.
Allow read_cstring to have a different end sentinel than null.
Documentation [Stdio.sendfile]: Document risk of SIGPIPE. Make sure that users of sendfile() are aware of [bug 7582 (#7582)] behavior.
A very, very small fix.
ADT.Scheduler: API fix mk II. ADT.Scheduler()->get() now works as documented and intended again. Reverts the testsuite changes from c2535027a79c958d5355686026e12ff78007b598.
Backported encode/decode base64url
ADT.TreeScheduler: Updated to new Heap API.
Backport from 8.1
Remove time_elapsed, as it has nothing to do with Web.Api per se.
Revert "Don't suggest writing files in /." This reverts commit 4905c255eeda543c7a80e451fc75432ae27f57ea.
Revert "Don't suggest writing files in /." This reverts commit 5d07baf3780523d7fb8c2117aa9c63fd2fd19dfe.
Don't suggest writing files in /.
Inotify: Renamed get_fd() to query_fd(). Also removes some obsolete documentation.
Stdio.UDP: Increased paranoia in bind(). Fixes handling of close(2) failure.
UNRESERVED_CHARS is not used.
Start of new layout for the Pike refdoc
Some comments.
Some argument cleanup.
Updated all references since the modules were moved from root namespace to the Web namespace
Merge branch '8.1' into grubba/typechecker-mk3 * 8.1: (51 commits) Compiler [Types]: Got rid of my_describe_type(). Compiler [Types]: Fixed wide strings in nested types. Compiler [Types]: low_describe_type() now uses string_builder. string_builder_sprintf: Fixed '+' for floats. string_builder_sprintf: Added support for %T. Calendar.mkrules: Improved backward compat. Auth.OAuth.Client: Fixed AutoDoc markup issue. New modules for communicating with different (RESTful) web apis (including OAuth and OAuth2 client modules) . Documentation [%]: Added some clarifications and improved markup. Inotify: Minor code cleanup. Potential fix for [CID 1325796]. Inotify: Removed some debug output. Filesystem.Monitor [Inotify]: Improved support for blocking mode. Inotify: Don't reference count immediate circular references. Inotify: Removed some dead code. System.Inotify, Filesystem.Monitor: Updates to use new Inotify API. Inotify: Use fd_callback_boxes, internal event parsing. Search.Database.MySQL: Censor the SQL-url. Sql: Added censor_sql_url(). Search.Database.MySQL: Avoid long lived database connections. Inotify: Don't throw errors in rm_watch() on invalid watch descriptor. ...
New modules for communicating with different (RESTful) web apis (including OAuth and OAuth2 client modules) . Implemented APIs are (that is, you can authenticate against them and all have basic methods for doing generic get, post, put and so on requests) * Facebook * Github * Google * Analuytics * Plus * Instagram * LinkedIn * Twitter
Documentation [%]: Added some clarifications and improved markup. Fixes [LysLysKOM 21477516] reported by Per Cederqvist. Thanks.
Inotify: Removed some dead code.
Inotify: Use fd_callback_boxes, internal event parsing. Inotify instances are now hooked directly into the backend, so the need to expose an fd object is gone. Parsing of the event stream is now buffered and parsed internally. Also fixes minor bug on close.
System.Inotify, Filesystem.Monitor: Updates to use new Inotify API. System.Inotify.Instance now inherits _Instance directly. This simplifies the code and caused some functions to become redundant. Filesystem.Monitor now has some support for Inotify in blocking mode.
Sql: Added censor_sql_url().
Filesystem.Monitor.debug: Added get_monitors().
Filesystem.Monitor.symlinks: Inherit DefaultMonitor. This means that the symlinks class (and debug class) now take advantage of accellerated monitors.
Filesystem.Monitor: Added DefaultMonitor. This class alias simplifies other code by reducing the need for preprocessor checks.
Documentation: Swiched character encoding to UTF-8. The datatypes documentation source file is now in UTF-8.
Missed a sentence.
Allow fine grained control over what extensions to use.
Standards.PKCS.ECDSA: Added variant of parse_ec_parameters(). When parsing ASN.1 it is not unusual to have the ASN.1 objects rather than their DER representation.
Documentation [Standards.UUID]: Improved AutoDoc markup.
Documentation [Protocols.LDP]: Added some RFC markup.
Documentation [Standards.PKCS]: Minimal history of PKCS.
Standards.PKCS: Added support for decoding PKCS#8 private keys.
Filesystem.Monitor: Refactored the accellerated filesystem monitors. This is to improve compatibility with older code, and to support extending the monitor system to monitor virtual files (like eg http URLs), and also to reduce the complexity of the code. Also fixes issue with Inotify not supporting monitoring of non-existing paths.
Filesystem.Monitor: Added adjust_monitor().
Filesystem.Monitor: Added check_all().
Protocols.HTTP2: Added Frame class.
Doc: Fixed documentation of random(float). Fixes [LysLysKOM 21443522] reported by Per Cederqvist. Thanks.
7.8::GTK: The GTK1 module is no more...
Filesystem.Monitor: Use the new ADT.Heap adjust() API. Improve performance by using the new ADT.Heap adjust() API.
ADT.Heap: Added ADT.Heap.Element. This adds one level of indirection, but is needed to get a reasonable performance in code that needs to call adjust(). Also corresponding updates to ADT.Priority_queue. Also removes the LFUN::`==() operator from ADT.Priority_queue.elem, as it doesn't serve any purpose.
Threads: Added support for setting a thread time quanta. This is mostly intended to be used to identify code that inhibits other threads from running.
Truncated HMAC may be a security issues, and isn't really supported by anyone else. Disable it by default.
Documentation updates.
Merge branch '8.1' into per/substrings
Documentation [Standards.HPack]: Added quite a bit of AutoDoc markup.
Stdio: Initial implementation of Stdio.FakePipe. This is a class that attempts to emulate a bi-directional pipe/socket, but without using any fds. The intended use is to simplify implementation of APIs that require emulation of sockets (like eg SSL.File).
Merge remote-tracking branch 'origin/8.1' into per/substrings
Documentation [Protocols.LMTP]: Moved some documentation.
GTK1 is deprecated
Support linking direct to RFC anchor.
Documentation [Crypto.Password]: Added some RFC markup.
Autodoc fixes.
Use @rfc{@} autodoc syntax.
Documentation [MIME]: Use the new RFC reference markup.
ADT.TreeScheduler: Added scheduler from RFC 7540 section 5.3.
Thread.Thread [Documentation]: Adjusted return type of thread function. The return value of the thread function is relevant (as it is returned by wait())... Fixes [LysLysKOM 21410113] reported by Per Cederqvist. Thanks. Also adjusted the declared type of create() somewhat so that it requires a thread function (ie the compiler will now complain if it is called without arguments).
SSL.Context: Default to the FFDHE2048 group. Changes the default DHE group from MODP group 24 to FFDHE2048. This makes SMACKTest (http://smacktest.com/) happy, and reduces the risk of precalculated attacks against the MODP group.
Documentation [ADT.Heap]: Added some cross-references.
ADT.Heap: Added remove().
ADT.Scheduler: Keep Consumer()->offset up to date. This simplifies code that needs to check the priority of potentially inactive consumers.
ADT.Scheduler: First version. This is a data type intended to be used to distribute quanta of a resource fairly among a set of prioritized consumers.
Support for WebP
Move the compat fallback for Dims.get into the compat module. Doesn't actually work currently, as the resolver in the image module doesn't know about compat resolvers.
Protocols.HTTP2: Added the constants from RFC 7540.
SSL.Connection: Added shutdown().
Postgres: Fixed type for big_query(). Fixes compilation issue with Sql.postgres.
Mark read and write as deprecated. Added documentation.
Standards.HPack: Added create(). create() can now be used to set the "hard" upper size limit for the dynamic header table. Also hides a few variables and adds quite a bit of related (internal) documentation.
Standards.X509.TBSCertificate: Added `hash(). This makes it much easier to get the hash algoritm from a TBS.
Rewrote buffer growth strategy It is now 1.625x old size instead of 2.0 x old size + bytes_added, with some exception. Also added a shrink strategy, by default it's close to the reverse: If more than 61.5% of the buffer is empty space, shrink it down (1/1.625). (cherry picked from commit 917184b64444098f8b84c79cdd1de89ccaa467f6) Conflicts: src/modules/_Stdio/buffer.cmod
Rewrote buffer growth strategy It is now 1.625x old size instead of 2.0 x old size + bytes_added, with some exception. Also added a shrink strategy, by default it's close to the reverse: If more than 61.5% of the buffer is empty space, shrink it down (1/1.625).
HPack: Added module. This module is intended to implement RFC 7541 (HPACK). Currently it only implements huffman_{en,de}code(), which is the huffman encoding used in the RFC.
SSL.File: Added query_application_protocol(). This is needed for protocols using ALPN.
Crypto.Hash: Added mgf1() from RFC 3447 B.2.1.
SSL.ClientConnection: Support ALPN being accepted. Fixes [LysLysKOM 21365565].
Documentation: Some markup changes to some efuns. Improves the documentation of indices(), values() and types().
unicode_to_string: Support UTF8LE without BOM. Adds an optional second argument to unicode_to_string() to specify the default byte order (an initial BOM in the input string overrides this argument).
string_to_unicode: Support outputting UTF8LE. Adds an optional second argument to string_to_unicode() to specify the wanted byte order.
Tools.Standalone.precompile: Fixed typo in description.
Documentation: Added reference to `==() from equal().
Documentation: Removed duplicate doc for hash_7_4(). Also fixes some obsolete documentation references.
Msql: Converted module to using cmod precompiler.
__builtin.Sql: Added module. This is intended to become the base module for the Sql modules.
Crypto.DH: Avoid circular dependency on Crypto.DSA. Adds __builtin.Nettle.DH_Params.
Crypto.DSA: Added some variants handling Crypto.DH.Parameters. set_public_key() and generate_key() now have variants that accept a Crypto.DH.Parameters object instead of the separated values.
Added gethrdtime().
__builtin.Nettle.ECC_Curve: Allow uninitialized Points. This is used by eg the ECDSA module where the public key is set after initialization.
Nettle [ECDSA]: Fixed parent pointer information. The Point must be inherited by hand, as the parent pointer information otherwise gets lost.
Process.create_process [doc]: Improved documentation. Make it clearer that the "cwd" parameter is affected by "chroot".
Process.create_process [doc]: Added some clarifications. Make it clearer that the process callback function is called in a signal handler context. Fixes [LysLysKOM 21312841].
Stdio.Port: Added some missing documentation of query_fd(). Also moved the implementation to be closer to the rest of the functions.