Nettle.Hash: Fix AutoDoc syntax for balloon(). Also adds some related headerfile/lib paranoia.
Crypto.ECC: Add curves GOST_GC256B and GOST_GC512A.
Crypto.SHAKE_256: Add Crypto.Hash API for SHAKE_256.
Nettle.SHA3_256: Add support for SHAKE-256.
Stdio.Fd: Add cd(). Fixes #10119.
System [NT]: Fix UTF8/UTF16 handling in {Get,Set}FileAttributes().
Stdio.Fd: Add low-level hooks for error callback. Needed for #10108.
EFUNs: Use pike_strptime() to implement predef::strptime(). predef::strptime() should now exist on all platforms (ie including NT).
Cpp [Haiku]: Add OS detection macro __HAIKU__. Also documents the macro __APPLE__.
Testsuite [Protocols.WebSocket.SSLPort]: Reduce size of {R,D}SA keys in test. Fixes testsuite timeouts on old and slow machines.
Documentation [ADT.CircularList]: Added some cross-references.
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.
ADT.CircularList: Add force argument to add() and push_{front,back}(). This makes it possible to take advantage of it being circular.
Stdio.File: Add isatty().
Show fallthrough.
Stdio.InputStream: Add read_function() to the API. Fixes warnings in Standards.IIM.
Fix a couple of docs typos
Stdio: Added InputStream et al. These types can be used in places where files opened for reading are accepted.
8.0::Stdio: Make 7.8::Stdio happy. 7.8::Stdio inherits 8.0::Stdio.module, and expects to find stuff like _Stdio there. Inherit 8.1::Stdio.module so that 7.8::Stdio finds the expected symbols.
Shuffler.Shuffle: The wrap callback may return zero.
Tools.AutoDoc: Improved support for array length information. Fixes support for parsing and rendering of array types like array(0..5:string).
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.
Compiler: Add lfun::__create__(). This lfun is intended to hold the code previously inlined in lfun::create() for the implicit create syntax. Preparation for implementing the implicit create case(s) of #10086.
Misc: Fix incorrect syntax in autodoc
Iterators: Add 8.0::get_iterator(). Add wrapper that implements the 8.0 and earlier iterator API. Also update the testsuite to match the current iterator behavior.
Sql.sql_result: Fix compilation error.
Sql.sql_result: Base this class on __builtin.Sql.Result. Reduces code-duplication.
ADT.Relation.Binary: Updated implementation of lfun::_get_iterator(). Also added some documentation.
Documentation [Stdio.Readline]: Document {enable,get}_history().
Documentation [Stdio.Readline]: Add doc for set_{non,}blocking().
Documentation [Stdio.Readline]: Add doc for read() and write() et al.
Documentation [Readline]: Added an example of how to use.
7.8::Crypto.DSA: Stricter handling of zero. Fixes multiple warnings.
EFUNs: Restructuring of the sprintf() typechecker.
Pike: get_return_type() now supports the state mapping.
Pike: Support state mapping in low_check_call().
Remote: Stricter handling of zero.
Crypto.Password: Fix support for Django-style pbkdf2_sha256.
Compiler: Update code generator to support F_SSCANF_80.
Compiler: Updated prototypes for __handle_{sprintf,sscanf}_format(). The second argument may be UNDEFINED, so declare the function type accordingly, and do not complain if it is.
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.
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.
Geography.Country: Allow iso2 or fips10 code to be zero.
EFUNs: Improved type for sizeof() and strlen().
Merge branch 'patches/support-mixed-in-count_memory' * patches/support-mixed-in-count_memory: GC: Support remaining types in Pike.count_memory().
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.
doc: fixing some autodoc markup
Sql.mysql: Clean up character set handling. Adds helper functions fix_{query,result}_charset() that contain code that used to be in the QUERY_BODY() macro. This makes the code quite a bit easier to read. Adds charset wrappers to list_{dbs,tables,fields}() that previously changed behavior depending on what the send_charset was. Remove some now obsoleted character set handling from Mysql.SqlTable. Potential fix for intermittent failures for Mysql.SqlTable to handle tables with wide characters in the table name.
__builtin.Sql.Connection: Added query_db() and reset() to the API.
decode_value: Fix "Calling undefined function __INIT()" The autogenerated __INIT calling through to inherited __INITs should not be generated on decode_value, because it has already been recovered from the dump.
Added convenience function to load letsencrypt certificate.
Bugfixed diff_namespaces. Added character encoding to render_xml.
Doc [SSL.Packet]: Use Autodoc markup.
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.
Backported fragment helper methods.
WebSocket: Provide a query_id() function to parallel Stdio.File
Doc [Thread]: Added some more notes about fallback classes.
Doc [Thread.Thread]: Improved doc for status().
Threads.MutexKey: Added timeout to upgrade().
Doc [Image.ColorTable]: Fix markup typos.
Doc [Stdio]: Document some more constants.
Doc [Thread.MutexKey]: Fix some markup typos.
Doc: Fixed AutoDoc markup typo.
Merge branch 'security/decode_value' into 8.0 * security/decode_value: decode_value(): Allow to restrict decoding to simple types
MIME: Stricter types.
SSL.Constants: Remove obsolete (draft-only) constant.
Merge branch 'rosuav/http-multi-connect'
Charset: Strict types.
Protocols.DNS: Return host_to_ip to its former state of IPv4-only
Doc [Crypto.DSA]: Fix typo.
Protocols.DNS: Cleanup interface, allow arbitrary numbers of restargs.
Protocols.DNS: Add a resolver compatible generic_query().
DNS.client: Expose match_etc_hosts.
async_connect using promises.
Doc: Fix some documentation typos.
Shuffler: Add freerun parameter, to avoid bulkmode/TCP_CORK.
Crypto.DSA: Fix a few warnings.
Fixed warnings.
Shuffler: done_cb is called on every pause.
Shuffler: Support wrap_cb on array sources.
Debug: Add map_all_strings() to trace memory leaks.
Shuffler: Add autopause mode.
Shuffler: Add support for array sources.
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.
Master: Added predef::zero.
Program.annotations: invert recursion flag to make more sense for the default case.
Documentation [LFUNs]: Added some doc for the _iterator_*() lfuns.
ADT: Use new iterator LFUNs in more places.
EFUNs: Added efuns for accessing iterator state.
Iterators: Use the new LFUN names. Fixes lots of warnings.
LFUNs: Support atomic get and set with lfun::`->=() and lfun::`[]=(). `->=() and `[]=() should now return the previous value. Also alters ::`->=() accordingly.
CHANGES: updates in preparation for release
EFUNs: Add predef::atomic_get_set().
Documentation: Improved doc for search().
Gettext: Prevent argument of textdomain from being empty
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.
Thread.Mutex: Improved behavior for {try_,}shared_lock(). If the current thread already holds a shared lock, a new one is created without waiting. This avoids some dead locks.
Thread.Thread: Add gethrvtime().
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: Allow replacement of the lexers and parser
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).
MIME: Move decode_/encode_headerfield_params functions here.
Arg: Document the help/usage system.
Thread.ResourceCount: Provide fallback implementation
Arg: Fix docs.
Crypto: Update bcrypt docs.
Documentation [_Stdio]: Added some doc.
Documentation [Stdio.Buffer]: Fixed markup typo.
Stdio.UDP: Added dup().
Stdio.UDP: Added support for write callbacks.
Stdio: Added query_mtu() to Stdio.File and Stdio.UDP.
SSL.DTLSState: Implemented sliding window for sequence numbers. Needed for DTLS (#10032).
SSL.Packet: Added seq_num to Packet. This is in preparation for implementing DTLS (#10032).
Documentation [Stdio.File]: Enabled some Autodoc markup.
Inotify: Improved handling of invalid event callbacks. The events are now buffered until the callback becomes valid. Fixes #8042.
Operators: `|() now supports UNDEFINED with multisets. Fixes #10021.
Added JavaScript to cgrep
CHANGES: Added note about pty handling on NT. Fixes #10008.
ADT.OrderedMapping: Improve docs.
ADT.OrderedMapping: Fix duplicate entries, optimise and add substract.
Documentation [Stdio.Port]: Documented changed set_id(). #4312
pgsql: Toggle cache_autoprepared_statements default.
Merge branch 'grubba/pty-handling' into 8.0 * grubba/pty-handling: I/O [NT]: Fixed typo. Stdio [NT]: Fixed compilation error when no struct termios. Diagnostics [NT]: Fixed multiple issues with FD_DEBUG. I/O [NT]: Enable some termios functions on NT. I/O [NT]: Implemented TIOCGWINSZ and TIOCSWINSZ ioctls. I/O: Make termios code dependent on presence of tcgetattr(). Stdio: Fix get_all_args() call to support Pike 8.0 and earlier. Stdio.File: Added tcdrain() and tcsetsize().
Stdio.File: Added tcdrain() and tcsetsize(). It is now possible to set the window size for a pty or other terminal. Also adds documentation for them as well as tcflush() and tcsendbreak(), and moves it and the documentation for tc{get,set}attr() from Stdio.File to Stdio.Fd. Also some fixes to make the code work on systems with <sys/termios.h> but no <termios.h>, and preparation to make some of it work on NT. Fixes some of #10013.
Documentation [Standards.X509]: Fixed some typos. Fixes #10012.
Standard.X509: Make signature algorithms configurable
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".
Merge branch 'grubba/pty-handling' * grubba/pty-handling: Process.Process [NT]: Added modifier "conpty".
Merge branch 'grubba/pty-handling' into 8.0 * grubba/pty-handling: I/O [NT]: Fixed typo. Documentation [Stdio]: Added some more notes regarding PROP_TTY.
Merge branch 'grubba/pty-handling' * grubba/pty-handling: Documentation [Stdio]: Added some more notes regarding PROP_TTY.
Documentation [Stdio]: Added some more notes regarding PROP_TTY.
Merge branch 'grubba/fdlib' into grubba/pty-handling-new * 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. ...
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().
SSL.Context: Fix autodoc typo
Fix documentation for next_prime
Fix function definition for next_prime and the documentation for next_prime and probably_prime_p
Crypto.Password: Fixed some warnings.
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.
ADT.List: Added _reverse().
MIME: Added decode_crypt64(). This is the inverse of encode_crypt64().
LFUNs: Added lfun::_reverse(). This is a function that is called by reverse() to generate a reversed object.
Documentation tweaks.
Reworkd HTTP Authentication quite a bit. Supports client and server.
Documentation [Charset]: Fixed markup typo.
Documentation [DVB]: Fixed some markup issues.
Make Profiling.pmod doc reflect the real state of things.
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.
__builtin.Nettle.Hash: crypt_php() is now API-compatible with crypt_hash().
Pike: Move DestructImmediate to the Pike module.
Documentation [Gmp]: Fixed markup issue.
Nettle: Added support for CMAC.
Better selection of quote charactes.
Fix typo.
__builtin.Sql.Result: Added a default implementation of eof(). This fixes an issue where eg _sprintf() throws errors for some drivers.
Merge branch 'patches/pike197' * patches/pike197: Mysql.Result: Update the index counter when fetching rows.
Mysql.Result: Update the index counter when fetching rows. Call Sql.Result::increment_index() at relevant places. Fixes testsuite failure. Fixes PIKE-197 (#8197).
Compiler: Warn about indexing of deprecated values.
Documentation [Sybase]: Fixed broken AutoDoc markup. Fixes the inheritance graph for predef::...
ADT.Stack: Added pop_to(). This is useful to undo an unknown number of push()es.
SSL.Constants: Renamed some EdDSA-related constants for consistency.
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.
Sass: Create pike -x sass SCSS compilation tool.
Gz.Pipe.Uncompress/Transmogrify: Add parent class and Uncompress pipe.
Stdio.Buffer: Stricter types. Use string(8bit) in more places.
HTTP.Server.Request: Use Shuffler to send and support sending chunked data.
FakePipe: Numerous bugfixes; it actually works now. Fixes include: - Callback handling rationalised, fixed and optimised. - Eliminate double inheritance which caused subtle conflicts. - Changes the API to use ->other instead of ->get_other(). - Use single references to mux and cond variables.
Documentation [Nettle]: Fixed typo in doc.
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.
SSL.constants: Added some entries from RFC 8422.
Compiler: Export state of no_deprecation_warnings ... in the active compilation to Pike.
Support verifying that the nonce used actually came from the server.
Pike.ProxyFactory: Added new function. This is a factory for creating classes that act as a proxy for the specified program.
Master: Re-hook global constants on replace_master(). replace_master() sets the variable is_pike_master in the object that is to be the new master to 1. Catch this with a setter so that global functions implemented by the master are actually implemented by the active master. This mostly affects the test suite, which replaces and restores master objects several times.
Concurrent.Promis: Fix/optimise delay() and timeout().
Concurrent.Promise: Add delay() member to delay the future.
Toole.Standalone.test_pike: Complain about calls of handle_error().
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. ...
Pike.Annotations: Added Override annotation. This annotation verifies that the annotated symbol also exists in one of the inherited programs.
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).
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.
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.
GSSAPI: Autodoc typo fixes
Documentation [Stdio.File]: Fixed some markup issues.
Master: Support __HAVE_COMPILER_NO_HANDLERS__. Implement support for handlers by overloading the CompilerEnvironment.
EFUNs [Master]: get_active_{compilation,error}_handler() moved to master. This is in preparation for moving all handler stuff to the master.
AutoDoc: Added some support for parsing annotations.
Documentation [Master]: Added some minimal AutoDoc markup.
Merge branch 'patches/pike156' into 8.0 * patches/pike156: EFUNs: Hide mutex keys and crypto contexts from backtraces.
EFUNs: Return an array(multiset) from predef::annotations(). A multiset is a more natural datatype for the set of annotations. NB: The low-level code still uses arrays; this will most likely be changed later.
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.
Thread.Condition: Improve docs.
Runtime: Adjusted API for lfun::_annotations(). The API for lfun::_annotations() now aligns better with the APIs for lfun::_indices(), lfun::_values() and lfun::_types(). Also adds some minimal documentation for some undocumented lfuns.
EFUNs: Added predef::annotations(). This function returns the annotations (if any) corresponding to the symbols returned by indices() on the same value. Also adds lfun::_annotations().
Pike.Annotations.Implements: Added initial implementation. This annotation causes the compiler to validate that the annotated class implements the specified API.
Compiler: Added Pike.Annotation. The compiler now calls end_pass() in any annotations on the program being compiled once each compiler pass.
if -> else if
Merge branch 'buffer_mode_proposal_wip'
Stdio.File()->read: add optional offset argument and documentation
Stdio.Buffer: added allocate() and advance()
Added program.h to module.h
Documentation [Threads]: Some notes about interrupt() and kill().
Stdio.Buffer: Added support for escapes to read_cstring().
Fix refdoc typo.
Threads.Mutex: Added cond(). This creates a Thread.Condition bound to the mutex.
Cpp: Macro expansion failure is now indicated by returning 0.
Documentation [Cpp]: Fix documentation markup error. Fixes remainder of LysLysKOM 22790861.
Cpp: Simplified base implementation of report(). The base implementation of CompilerEnvironment.CPP::report() now just calls CompilerEnvironment::report() in its parent. The handling of handler and compat_handler in report() is moved to the implementation in the master.
Whitespace changes.
Compiler: Cleaned up the resolv() calling conventions. CompilerEnvironment()->PikeCompiler()->resolv() now takes a single argument, and looks up the current file and handlers from the PikeCompiler object, and then calls CompilerEnvironment()->resolv(). The actual calling of resolv() in the handlers is now performed by CompilerEnvironment()->resolv().
Merge branch 'pike-modules/sass' into 8.1 * 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.
Merge branch 'pike-modules/sass' into 8.0 * pike-modules/sass: Added the option "sass_syntax". Fixed broken indentation
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().
ADT.Stack: Added peek().
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
Merge branch 'grubba/fdlib' into 8.0 * grubba/fdlib: System [NT]: Update normalize_path() to use UTF8.
__builtin.Sql.Result: Added increment_index().
MIME: Setter for message boundary prefix.
Merge branch 'pike-modules/sass' into 8.0 * pike-modules/sass: (91 commits) Sass: Use ONERROR to free sass contexts on error. Sass: Unlink stale JMPBUF. Sass: Fixed indentation. Added some tests for Sass compilation errors. Just some cleanup of a simple test. Transfered "ownership" of error message from libsass to Pike. Fixed stupid Emacs indentation.:wq Testsuite [Sass]: Fixed detection of Web.Sass some more. Testsuite [Sass]: Updated testsuite to the moved module. Sass: Move module to Web.Sass. Sass: Hide the module when not available. Install: Added Tools.Sass to the feature list. 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. ...
pgsql: Make affected_rows() and status_command_complete() wait for a meaningful result.
I/O [NT]: Use new low-level functions from Process.
Crypto: Added some support for generating JWK Thumbprints. Cf RFC 7638.
Merge branch 'pike-modules/sass' into 8.1 * pike-modules/sass: Sass: Move module to Web.Sass. Sass: Hide the module when not available.
Sass: Cleaned up documentation a bit.
Filesystem.Monitor: Add set_stable_time() function.
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: Document some more of the master.
Documentation [ADT.Stack]: Fixed some typos.
Remove some stale code and update documentatin.
Somewhat more flexible opportunistic TLS implementation.
Documentation [Crypto.Password]: Fixed typo.
Put cp() in the global scope, as rm() and mv() are already there.
Fix documentation.
Improve docs.
Fix typos and docs.
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.
Documentation [Nettle.BlockCipher]: Adjusted some references.
Sql.Promise: Add support for eventbased mapping of resultrows.
HKDF rewrite. Should now be possible to use in TLS 1.3
Always name the 4th argument of bind reuse_port instead of share
Debug.find_all_clones(): Fixed off by one issue. It now seems to work as intended also when include_subclasses is true.
MPI: Document MPI typed arrays.
Debug: Added find_all_clones().
Missed a typo.
Equvivalent and equivalent are not equivalent.
We do not support OS/2
Documentation: Added doc for Builtin._take_over_initial_predefines().
Val.Timestamp,Date: Support strftime()/strptime().
Val.Range: Salvage SQL syntax for use in SQL subsystems.
Move to ISO date format to avoid mm/dd, dd/mm confusion.
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.
Convert Val to a directory and move the last pieces from builtin to it.
Moved out time-code from __builtin to Val. Reduces start overhead and prevents clobber of System.Time.
TimeTZ: Add docs, finetune constructors.
Val.Time/Date: Small fixes, increased orthogonality of operators.
Change constants into inherited classes to make them show up in refdoc. Performance penalties?
Sparse list of version support added.
Range: Reuse Math.inf etc; Use NetUtils.
Val.nan: Introduce new Val values and native lightweight Date/Time/Inet/Range types.
Concurrent: Transparent automatic backend enable/disable.
Back out the thin convenience wrapper hash and hash_hmac. Replacements: Crypto.hash(Crypto.SHA1, true)(x) -> Crypto.SHA1.hash(x) Crypto.hash(Crypto.SHA1) -> sprintf("%x", Crypto.SHA1.hash(x)) Crypto.hash_hmac(Crypto.SHA1,k)(x, true) -> Crypto.SHA1.HMAC(k)(x)
master: Added some documentation about the master filesystem.
Concurrent: Slight optimisation and typo fix.
Promise: Update docs again.
Concurrent: Improve docs.
master: Added some documentation.
Stdio.Buffer: Support bignums in add_int{8,16,32}(). add_int8() and add_int16() now support getting called with a bignum. add_int32() with a bignum now ignores any bits outside the 32-bit range.
HTTP.Promise2: Proposed changes/optimisation/simplification of HTTP.Promise.
Concurrent: Cleanup.
Concurrent.Promise: depend() fixes. Rename apply_fold() to fold(). Add first_completed(). Add min_failed(), max_failed(), any_results().
Concurrent: Add map_with() as an alias for flat_map().
Added support for automatic entropy underflow management.
Added minimal AES128 CTR DRBG random generator from NIST SP800-90Ar1
Compiler: Replaced resolv_program() with resolv_type(). The function resolv_program() (not to be confused with resolve_program()) is no longer used, so remove it. Move some inlined code from language.yacc to a function called resolv_type().
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.FutureResult: Add a Concurrent.Promise interface to Sql.Connection.
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.
pgsql: Simplify and bolster the code by using Thread.ResourceCount.
Crypto.SCRAM: New module.
Sql.Sql: Support error(void|int clear).
SSL.File: Implement query_fd().
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.
pgsql: Update docs.
pgsql: Rip out fundamentally flawed reconnect logic, make failures consistent.
Crypto.SCRAM: Update docs.
Crypto.SCRAM: API updated, implemented serverside and testsuite.
Thread.ResourceCount: New module to implement resource counters.
Merge branch 'grubba/rename_lfun_destroy' into 8.1 * grubba/rename_lfun_destroy: Modules: Fixed logts of warnings. Testsuite: Updated for LFUN::_destruct(). Compiler: Don't complain about LFUN::destroy() in compat mode. Fix multiple warnings. Runtime: LFUN::destroy() has been renamed to _destruct(). Compiler: Rename LFUN::destroy() to LFUN::_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.
time: Clarify and correct documentation.
push_*: handle possible evaluation errors Always evaluate the macro arguments before incrementing the stack pointer.
Documentation [Standards.PEM]: Some minor clarifications.
Crypto.ECC.Curve25519.EdDSA: Fixed documentation.
Fix docs typo in Image.Image()->make_ascii()
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).
Web [Crypto]: Added encode_jwk(). This is the reverse of Web.decode_jwk(). Note that no actual encodings are generated yet. Fixes some of PIKE-39 (#8039).
Mysql.result: Renamed seek() to low_seek(). This function performs absolute positioning (rather than the relative positioning of __builtin.Sql.Result()->seek()), and was shadowed by a generic (relative) implementation in previous versions of Pike. CAVEAT: Old code that used sql_res->master_res->seek() will break and need to be updated. Any such code will trigger warnings as master_res has been declared deprecated. It is also unlikely that any such code exists, since the function didn't comply with its documented behavior. Fixes some testsuite failures.
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.
Compat [__builtin.Sql.Result]: Added getter for master_sql. Fixes testsuite failure.
Crypto.ECC.Curve25519.EdDSA: Fixed API for set_private_key(). It now returns the current object.
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)...
Abstract lazy resolving into the Pike.Lazy module.
Fix spelling of 'necessary' in comments and docs
Last major release of Irix was in 1998 with support updates until 2006 and declared unsupported 2013. Remove support.
Fixed digest_info.
Pikedoc fixes.
Documentation [Crypto]: Add more references to useful stuff. Mention MACs and AEADs. Make it easier to find some of the more popular modules (like AES.GCM and SHA1.HMAC). Also removes some references to obsolete algorithms.
NTLM hash added
Rename Debug.Peek to Debug.Inspect.
Fix autodoc reference.
System.FSEvents: Fixed Autodoc mk II markup.
Filesystem.Monitor: Fixed some typos.
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: Introduce Debug.globals and fix some cosmetics.
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.
Documentation: Minor clarification.
Essentially white space changes.
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
5x faster encode_base64url() and 50% faster decode_base64url().
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.
Web: Added {en,de}code_jws(). These simplify handling of JWSes other than JWTs. Also cleans up {en,de}code_jwt() by using the new functions. Also fixes a typo in the type for decode_jwt().
Sql.mysql: Reduce code duplication somewhat.
Sql.Sql: Sql.Sql() is now a function and not a class. Now that __builtin.Sql.Connection exists and is used, the wrapper class should no longer be needed. The wrapper class has moved to 8.0::Sql.Sql.
Documentation [SQLite]: Fixed AutoDoc markup typo.
SQLite: Use __builtin.Sql. Also some AutoDoc markup adjustments.
Oracle: Use __builtin.Sql.
Documentation [Nettle]: Fixed cut'n'paste typo.
Added a global on_failure to capture errors not handled in individual promises.
Protocols.HTTP.Server.Request: Added some AutoDoc markup.
Mention the equivalence of Port("stdin") and listen_fd
Msql: Updated to provide the standard Sql-API.
Documentation: Updated syntax in doc for lfun::create().
Support multiple instances of the same option.
Compiler: Make #pragma disassemble available --without-debug.
Protocols.DNS: fix decoding and add encoding of LOC RRs.
String.Buffer: Added _search(). It is now possible to search a String.Buffer.
Added Unicode.is_whitespace.
Web: Added decode_jwk{,_set}(). These decode JOSE keys coded according to RFC 7515.
Documentation updates
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: POC implementation of Widget->drag_{source,dest}_set() Should be broadly coherent but may not work correctly
GTK2: Add get/set_text methods to SelectionData
Simplify API by removing the need for a length parameter
Specify that the drag type should be a MIME type
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()
Parser.XML: node_to_struct() convenience function.
Concurrent: then() and thencatch() support smart mapping, improve docs.
Arg: Moved handling of --help to a standard option. This allows for having overriding the name of the --help option, and for having multiple aliases for it (eg also -h). Also adds a default help description string for --help.
Added example uses.
Concurrent: Doc fixes and simplify code.
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.
Function: several doc fixes
Link to RFCs in both places, not just one (oops)
Revert "Add Unicode support to MIME.Message via a subclass." This reverts commit 5d65d4d56ddbfea827045c8aa690ea7a5654abaa.
Revert "MIME.UnicodeMessage: Decode the message body according to the charset" This reverts commit 94c5393bc0ebea8e6eb0701c5c04b6554d627159.
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)].
Fix docs typo
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 [Nettle]: Improved doc for Curve25519.
Query: timed_async_fetch() didn't support chunked transfer encoding. Promise: Some pikedoc fixes.
Some Pike-doc fixes.
clone() is not referenced, so define it away for now.
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.
SocketIO: Support creation of multiple Universes (Yes, we think BIG :-).
EngineIO: Rename options to lower visibility outside the class.
EngineIO: Tune deflate compressionparameters.
WebSocket: Support for permessage-deflate compression.
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.
EngineIO: _sprintf() includes protocol revision. Add lastrequest member. Consolidate setting callbacks to a single function. Binary frames have their type in binary sometimes too. Run the close_cb just prior to shutting down the write channel. Use the faster sprintf in favour of Buffers for %c%s type situations. Add accessible close() method. Avoid circular references in id. Close Transport without destructing. Tie up dangling refences when closing is forced.
GTK2: Document GdkPixbufLoader stubbily so the magic happens (Do the magic! Do the magic!)
Protocols.WebSocket: added defragment() defragment() can be used to automatically recombine fragmented frames.
Protocols.WebSocket: added API for continuation frames
Clean-room Engine.IO implementation.
Reference correct function in docs
Compiler: Added CompilerEnvironment()->lock(). This is a class that exposes the compiler internal lock. Fixes some of [bug 7783 (#7783)].
Add a 'level' parameter to setsockopt(), and add more constants
Documentation [cpp]: Fixed warning generated by example.
Allow sprintf %x on a string.
Debug: Added hexdump().
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.
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.
Documentation [Protocols.HTTP]: Fixed typo.
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().
Even more specific types of crypt in documentation.
GTK: Fix docs typo
It's tedious to write trim_all_whites. Make trim the canonical name.
Parser.PKCS: Added some support for PKCS#10.
Documentation improvement.
Efuns: Renamed hash_7_8() to hash_8_0() for consistency. Also made the hash_*() types somewhat stricter.
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.
Renamed 'hash' to 'hash_7_8' Hopefully it will not be used now (this is triggered by yet another person thinking it's a good string hashing function). The function is not really suitable for use. The returned values are higly likely to be the same for similar strings, something that is not optimal for hashing. Also added comments about what to use instead (hash_value or one of the cryptographic hash functions). It might make sense to add a hash() that actually works, perhaps siphash?
Standards.PKCS.PFX: Added minimal AutoDoc markup.
Crypto.NTLM: Added some primitives from [MS-NLMP].
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 '*'
Concurrent.Promise: Fixed potential backtrace in destroy(). destroy() now uses unlocked_failure() to avoid potential recursive mutex locks. Also converted some comments to AutoDoc.
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)].
Gmp.mpq: Allow initialization with Gmp.mpz objects.
_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.Future: Added timeout().
Concurrent.Promise: Added maybe_failure().
SSL.File: Handle non-empty buffers in set_buffer_mode().
Removed unused class.
Protocols.HTTP.Promise: The arguments are now passes as an object of class Arguments for better type cheking and more coherent method signatures for the request methods. Also some refactoring. Web.Api.Api: Using Protocols.HTTP.Promise for the requests if available and applicable.
Tweaked the pow function in bignums/mpz o If the exponent is a float, the result will now be a float (ie, 1000000000000**0.5 is now 1000000.0, not 1) o Added ``** o Removed arbitrary size limit entirely. It's up to the programmer to avoid 999 ** 9999999999999999999999. You still get an error if the result is too large for your memory.
Renamed pow lfun from pow to `**. This is somewhat incompatible, previously pow(X,3) called X->pow, now it will call X->`**.
Extended glob pattern syntax: o \ can now be used to quote special characters in the pattern o [ can be used for ranges of characters ([bx] [a-c0-9] [^a] etc). Also changed glob to return the matching glob instead of 1 when an array is passed as the first (pattern) argument. This can be used to remove some loops where you want to do different things depending on which pattern matched. Both these changes are incompatible.
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".
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.
__builtin.Nettle.Hash [HMAC]: Somewhat stricter type for `jwa(). Also adds some documentation.
__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.
Auto bignum is always true
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.
__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.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.
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".
Crypto.ECC.Curve.ECDSA: Added support for jose_{sign,decode}().
Concurrent: Added some more functions.
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.
Fixed the early out when random limit is 2^x and !(x%8). Also some document fixes.
Crypto.RSA [SSL.Context]: Fixed some warnings.
Nettle.KW: This is an AE and not an AEAD.
__builtin.Nettle.__Hash: Some minor fixes.
Nettle: Added __builtin.Nettle.AE. This is Authenticated Encryption without Authenticated Data.
Nettle.BlockCipher16.KW: Changed API to AEAD.
Nettle: Added BlockCipher16.KW. This is the AES Key Wrapping algorithm from RFC 3394.
Mysql: Use the new __builtin.Sql API.
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.
Sql.sql_array_result: Fixed multiple issues. Some of the functions in Sql.sql_result assemed that they were in Sql.sql_object_result. This broke eg next_result().
__builtin.Sql.Connection: Use variants for big_query() et al. This simplifies overloading by the various drivers.
__builtin.Sql.Connection: Added emulate_bindings().
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...
Add an example to the IRC docs
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
Documentation: Added note about some failure modes of rm().
Change the _random interface to provide rnadom_string and random from the called random object.
Roxen: Added decoding of surrogates to http_decode_string(). Some javascript code sends %u-encoded surrogate pairs.
ADT.Heap: Added low_peek().
Documentation [GC]: Fixed typo.
GC [mappings]: Added do_gc_weak_mapping(). It is now possible to request a quick gc of a mapping with weak references.
GTK2: Fix method name linkage
Provide URL to documentation.
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.
a few autodoc fixes
Added creation method raw to put binary data directly in an image object without adaptation.
Git: Added convenience function try_git(). Also updates the documentation somewhat.
Removed << on file object. Has been deprecated a while and not properly working always.
Added Fast random generator.
Added support for hardware 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 posibility to define the HTTP request timeout in async queries. Fixed a typo in pike_to_html.pike
Added the Markdown module and the standalone pike_to_html.pike from 8.1.
Removed f_random[string,seed] from module API.
Documentation.
Make random_seed() a noop and deprecate.
Remove now unused random() implementations.
Don't call f_random directly.
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.
Added HMAC-based One-Time Password generator.
strlen is for strings only these days
Documentation
Move pike compat handling into the Testsuite object.
Move M4Test into M4Testsuite
Moved testsuite parsing to M4Testsuite.
Less mementos of CVS.
Documentation [Nettle]: Some minor cleanups.
Fixed the _sprintf code.
Debug: added functions to generate perf map files
Readded type information as comments.
Nettle: Added block cipher mode IGE (Infinite Garble Extension).
Move compilation to the test object.
Gmp.mpf: Added quite a few functions in the MPFR case.
Added AUTHLEVEL_verify to documentation and compat.
Added AUTHLEVEL_verify that will not require any optional certificates, but will verify any it gets.
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.
Gmp.mpf: Use mpfr if available.
Parser.RCS: Add optional max_revisions parameter to the API.
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.
SSL.Context: Added some references to RFCs.
SSL.Context: Added some documentation for trusted_issuers_cache.
Removed remnants of Pike.Security
Don't clean up the stack in void functions.
Crypto.RSA: Fixed multiple typing errors. Values of type Crypto.RSA.LowState should be possible to assign to variables declared as Crypto.RSA.State without drowning in warnings... Also restores the default return value of name() to "RSA".
Standards.PKCS.Identifiers: Fixed typo. "mfg1_id" ==> "mgf1_id". Also adds "pspecified_id" and some RFC references.
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
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.
__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.
Fix documentation issue.
Updated documentation to mention that verify_certificate_chain also can return CERT_UNAUTHORIZED_CA and CERT_EXCEEDED_PATH_LENGTH.
Comment fixes.
SSL: Encrypt then MAC mode is an RFC now...
Rename HASH_sha to HASH_sha1.
SSL: Added some constants from RFC 4681.
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.
Documentation [JSON]: Added RFC markup.
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
Autodoc fix.
Remove time_elapsed, as it has nothing to do with Web.Api per se.
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 argument cleanup.
Added some protected modifiers.
Updated all references since the modules were moved from root namespace to the Web namespace
Moving Auth.pmod to Web.pmod/Auth.pmod and WebApi.pmod to Web.pmod/Api.pmod
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.
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.
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.
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.
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().
Operators: The shift operators now also work on floats. Also improves argument checking in the shift operators.
Protocols.HTTP2: Added Frame class.
Doc: Fixed documentation of random(float). Fixes [LysLysKOM 21443522] reported by Per Cederqvist. Thanks.
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.
[amd64] Fixed compilation of F_CONSTANT in decoded programs. Note that the code used for decode_value decoded programs is significantly slower than the one that is generated for programs compiled from pike code. This is sort of unfortunate since most modules are dumped.
Added the gnu %m extension to sprintf This is a fairly specific format: It inserts strerror(errno()) Useful for things like if(!read_file(file)) exit(1,"Failed to read %s: %m\n", file); and not much more.
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: Added some more RFC markup.
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
Reuse the tag parsing loop.
Documentation [HPack]: Added some RFC markup.
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: 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.
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.
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 modul