Fix GTK2.SourceBuffer undo/redo signal names
Random: Updated some types and AutoDoc.
Use the random given by _random API.
Documentation: Added note about some failure modes of rm().
Change the _random interface to provide rnadom_string and random from the called random object.
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.
Addressed code review issues
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.
GC [mappings]: Added do_gc_weak_mapping(). It is now possible to request a quick gc of a mapping with weak references.
GTK2: Add utility/debug function for tinkering with signals
GTK2: Fix typo
Provide URL to documentation.
Documentation [cpp]: Move some doc to the correct place.
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
a few autodoc fixes
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.
More documentation.
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 docos
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.
Documentation.
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.
Sql: Added support for multiple results. Adds Sql.sql_result()->next_result().
strlen is for strings only these days
Removed some unused macros.
Moved testsuite parsing to M4Testsuite.
Less mementos of CVS.
Documentation [Nettle]: Some minor cleanups.
Nettle: Added block cipher mode ABC (Accumulated Block Chaining).
Fixed the _sprintf code.
Debug: added functions to generate perf map files
Updated comments and types.
Documentation [Nettle]: Added note about IGE.
Protocols.HTTP now takes 0.08 instead of 0.23s to load. Made Protocol.DNS, SSL and the Calendar module on-demand-loaded.
On this branch portable bytecode generation is not normally done This actually noticeably speeds up the compiler and also saves about 15% of RAM when starting hilfe. If the decode_value code is modified to free the portable bytecode _TWICE_. This will not be merged to 8.1 until I figure out _why_ that is. It should only need to be freed once, but I guess it's in the string table twice?
Added Standards.MsgPack MsgPack is a binary serialization format. It supports encoding of the usual basic data types and additionally allows for representing arbitrary data types through extensions. It is designed to be more compact than JSON and can be considerably faster to encode and decode.
Stdio.Buffer: added truncate()
Documentation [Nettle]: Fixed some minor issues.
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.
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.
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.
Gmp.mpf: Use mpfr if available.
Parser.RCS: Add optional max_revisions parameter to the API.
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.
Documentation [Standards.URI]: Added some RFC markup.
SSL.Context: Added some references to RFCs.
SSL.Context: Added some documentation for trusted_issuers_cache.
Don't clean up the stack in void functions.
Standards.PKCS.RSA: Added pss_signature_algorithm_id().
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 a more natural place to find checksums (though not strictly cryptographic).
Expose adler32.
Added a Markdown parser. This is a port of the Javascript Markdown parser Marked (https://github.com/chjj/marked). The Marked module only has one "static" method which is the only one needed to convert Markdown to HTML. There's also a shortcut to that method directly in the Markdown module (Parser.Markdown.marked()).
Added support for Bittorrent DHT (BEP005).
Removed no longer needed check_all_args. Removed glob argument from list_fields documentation, which was never supported.
Comment fixes.
SSL: Encrypt then MAC mode is an RFC now...
Rename HASH_sha to HASH_sha1.
SSL: Added some constants from RFC 4681.
SSL.context: Added sort_suites().
Allow read_cstring to have a different end sentinel than null.
SSL: Added some constants from RFC 4492. Also adds some related low-level support for ECC key exchanges.
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.
SSL: Add support for AEAD ciphers. Implements the TLS 1.2 protocol-level support for AEAD cipher suites. No AEAD cipher suites have been added yet.
SSL.Constants: Added KE_fortezza for completeness.
SSL.handshake: Support EXTENSION_signature_algorithms.
Documentation [JSON]: Added RFC markup.
SSL.handshake: Fixed documentation typo.
Simplified some debug.
ADT.Scheduler: API fix mk II. ADT.Scheduler()->get() now works as documented and intended again. Reverts the testsuite changes from c2535027a79c958d5355686026e12ff78007b598.
Inotify: Renamed get_fd() to query_fd(). Also removes some obsolete documentation.
Nettle: Let the IV be set through Nettle.Proxy (aka Crypto.Buffer).
Stdio.UDP: Increased paranoia in bind(). Fixes handling of close(2) failure.
UNRESERVED_CHARS is not used.
Moving Auth.pmod to Web.pmod/Auth.pmod and WebApi.pmod to Web.pmod/Api.pmod
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.
Sql: Added censor_sql_url().
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.
Documentation [Protocols.LDAP]: Added some RFC markup.
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.
Standards.PKCS: Added support for decoding PKCS#8 private keys.
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.
SSL.Context: Added option to disable renegotiation. This is a feature required by HTTP/2 (RFC 7540 9.2.1).
7.8::GTK: The GTK1 module is no more...
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.
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.
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).
Allow for only specific tags to be parsed and the rest ignored.
Documentation [HPack]: Stricter type in documentation.
Documentation [HPack]: Added some RFC markup.
Use @rfc{@} autodoc syntax.
Documentation [MIME]: Use the new RFC reference markup.
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.
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.
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.Cipher: Minor documentation changes.
SSL.ClientConnection: Support ALPN being accepted. Fixes [LysLysKOM 21365565].
SSL.Buffer: Added read_string_array().
Documentation: Some markup changes to some efuns. Improves the documentation of indices(), values() and types().
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.
Postgres: Converted to cmod. Also moves some flags from the connection object to the result object. FIXME: Consider moving the auto-cursor stuff to pike-code.
this_object(): Minor documentation fix.
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().
Nettle.ECC.Curve.ECDSA: Inherit the Point.
Removed trailing spaces.
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].
Protocols.DNS: Added some constants from the DNSSEC RFCs.
Stdio.Port: Added some missing documentation of query_fd(). Also moved the implementation to be closer to the rest of the functions.
Stdio.Buffer(): Don't allow negative padding to be added.
equal() now regards all false values as equal. Also updates the documentation somewhat.
Add a non-ASCII character to the example to demo automatic UTF-8 encoding
Implement Stdio.File()->setsockopt()
Moved locate_references to Debug.
Keep track of Session activity, so they can be removed when inactive, not just old.
Backport of Bz2 from 8.1
Sql.sql_result: Added some more doc for next_result().
MPI: doc fix
First go at MPI bindings
SSL.Port: Support on-demand creation of the Context. Adds context_factory() and a few related getters and setters.
Moved disassemble into _Debug.
Added the final defined PSK suites, ECDHE. The suite lookup table test broke as always, but all the defined ciphers appears to work.
SSL.Session: Updated some documentation.
Image.JPEG: Support multiple markers of the same type. decode_headers() and _decode() now return a "marker" mapping with arrays when there are multiple markers of the same type. encode() now supports the same format for the "marker" mapping in the options argument. Fixes some of [bug 6601 (#6601)].
Optimize export crypto a bit for the testsuite.
Added base64url from RFC 4648.
No one is seriously using export ciphers, so stop optimizing them and throw out some code. (My desktop is doing 710 keys per second)
Protocols.WebSocket: Use Stdio.File buffer mode
Stdio.File: Fixed multiple issues in buffered mode. Seems to fix the issues detected by socktest.pike in mode 2.
Compat [8.0]: Added some minimal doc about moved efuns.
Moved _next, _prev and next_object to Debug.
Moved _refs
Doc: Clarified the difference between LFUNs `==() and _equal().
Don't use RC4 by default.
Start moving debug code to the Debug module.
SSL.Context: Added support for private FFDHE-groups.
Doc fixes.
Trim ASN.1 APIs even more. Still need to decide on how to manage the internal DER cache.
TURBO2-942: Add Stdio.Buffer support to Gz.inflate
Crypto.DH: Restored definitions of FFDHE2432 and FFDHE6144. The latest TLS-FFDHE draft (06) reinstates FFDHE6144 and mentions FFDHE2432. I also don't see any reason to remove these symbols to begin with, since even if they might not be used as named curves, they are still possible to use in eg TLS 1.2 and earlier.
Autodoc fix.
Whitespace changes.
Fortuna.random_string(): No need to allocate more than the final string, as we only copy as many bytes from the last block as we need.
SSL: Implemented EXTENSION_extended_master_secret.
Implemented RSA PSK key exchange. select_cipher_suite() in Session however requires a rewrite to work with these suites.
Some documentation. Perhaps we want to move all this to an abstract class PSKContext?
Odbc: big_typed_query() now knows about timestamps and dates.
Odbc: big_typed_query() now knows about numeric/decimal values.
Odbc: typed_result->fetch_row() now returns Val.null for NULL.
Compat: Compat with 7.8 is based on compat for 8.0. Also makes sure that 7.8::master() returns the 7.8-compatibility master object.
Enable initialization of base 37..62 when running GMP 5.0 or later.
Gmp.mpz: Support import/export from reversed network byte order.
Compiler: Documented a few more #pragmas.
Interpreter: object_index_no_free() et al now return the type.
SSL.Cipher: KeyExchangeECDH now uses init_{server,client}(). Reverses the inheritance order for KeyExchangeECDH and KeyExchangeECDHE to reduce the code complexity a bit.
SSL.Context: get_suites() now also filters on the version range.
ADT.Bloom: Added Bloom filter class for integers
Crypto.ECC.Curve: Added LFUN::`==().
Synchronize with latest FF-DHE draft.
Nettle.ECC: Added initial implementation of Curve.Point. This is to simplify handling of points on ECC curves. Currently the code is sufficient to perform ECDSA, but eg encode and decode would be nice. TODO: Other code needs to be updated to accept Points.
SSL.Cipher.KeyExchange: Introduced got_client_key_exchange(). Renames ke->server_derive_master_secret() to ke->got_client_key_exchange(), and changes it to return the premaster secret. This will reduce the amount of code duplication soon.
__builtin.Nettle: Moved Point to ECC_Curve.Point. This will allow for using parent references in ECC_Curve.Point.
ECC_Curve.Point can now deserialize x9.62 curve points.
Document AUTHLEVEL a bit.
SSL.ClientConnection: Support TLS 1.3 ClientKeyShare. client_hello() now sends a pure TLS 1.3 hello if Context.min_version is TLS 1.3 or later, a compat TLS 1.3 hello if Context.max_version is TLS 1.3 or later, and a legacy TLS 1.2 or earlier handshake otherwise. Note that SSL.ServerConnection does not yet suport pure TLS 1.3 hellos, and that the SSL.ClientConnection won't be happy with the result from a server that does support TLS 1.3.
SSL.Connection: Added derive_master_secret(). More unification of code in client and server.
SSL.Cipher: Some more KeyShare-related API changes. The API now seems to be usable for TLS 1.3.
SSL: More KeyShare{EC,}DHE fixes for TLS 1.3.
SSL: Added KeyShare{EC,}DHE in preparation for TLS 0.3.
Added HKDF, used by e.g. IKEv2 (IPSec).
SSL.Constants: Added some more notes about DTLS.
SSL.Constants: Added some DTLS constants.
SSL: Support the Negotiated FF-DHE Parameters draft. NB: This draft has been incorporated into the TLS 1.3 draft.
Crypto.DH: Renamed the DLDHE constants to FFDHE for clairity. The DLDHE draft has been renamed FFDHE. As these constants aren't yet used anywhere, rename them accordingly. Also updates the references for the constants to the latest drafts where they are defined.
SSL [DHE]: Validate the Ys received from the peer. This is required by the current FFDHE draft, and is needed to protect the connection from MITM attacks. Also changes some alerts from unexpected_message to handshake_failure as required by the same draft.
Threads: Propagate thread abortion errors to wait(). A thread terminating by throwing an error now causes any corresponding wait() on it to rethrow the error (instead of just returning zero (0)). This simplifies detection of thread failures.
Compat: Added 8.0::Standards.PKCS.RSA.
Crypto.DH: Added DLDHE2048 from the latest FF-DHE draft.
master: add support for searching ZIP archives as part of the module path.
Updated the fallback implementation for object hashing.
Added support for buffers to Crypto.X.hash() It now support the various buffer objects as the data source argument.
cast tests.
SSL.File: Improved API for resuming sessions somewhat.
SSL.File: Added API for resuming sessions.
Protocols.LDAP: Corrected doc for client().
pgsql: Make SET synchronous to avoid surprises with subsequent queries.
put_fix_string() and add_data() converted to add().
pgsql: Docs tuned.
Reinstate legacy hash functions for the benefit of legacy network protocols.
Work around a compat resolver bug.
Reinstate legacy XML parsing modes until further notice.
Manual: Updated the compatibility chapter.
Add 8.0 compat and remove references to 7.0 and 7.2 compat.
Update docs.
pgsql: Cosmetics.
Process.spawn_pike: Added launcher argument.
Standards.ASN1.Decode.simple_der_decode requires combined tag ids in "types".
Fix docs.
pgsql: Slow down driver by default, async parsing only on request.
Sql.pgsql: New and improved full threaded version. Lower latencies, increased parallelism, theoretical elimination of all race conditions, simplified code, uses Stdio.Buffer, no C-helper anymore, less filling. As a new feature, introduces: send_row(), fetch_row_array() for increased efficiency, set_result_callback() and set_result_array_callback() for event driven database queries.
SSL.Cipher: Added KeyExchangeKRB (experimental). This is a tentative implementation of the RFC 2712 Kerberos-based key exchange. No interoperation tests have been performed, and the corresponding suites are not enabled.
ZXID: Added Session()->get_auth_info(). An explicit getter is needed when proxying via Remote.
ZXID: Changed arguments to authenticate(). Recent versions of the zxid library have an extra parameter "uri_path" that they want from the request. To avoid needing to pass this argument via enviroment variables, we now use some lower level functions. Fixes "null or empty cgi->uri_path=(null) qs(...) programming error".
Enhance Process.run() to be able to accept handler functions for stdout/stderr
SSL.File: Added query_version(). Added function to query the protocol version in use.
SSL.Constants: Minor documentation change.
Calendar: Added some more doc.
SSL.handshake: Support setting the minimum required version. The SSL 3.0 protocol can now be disabled by setting min_version in the context to SSL.Constants.PROTOCOL_TLS_1_0. Backported API from Pike 8.0. Note that the constants differ from Pike 8.0 and later, so use the provided symbolic values.
Oracle: Removed fallback code for Pike 7.1.
Mostly word wrapping.
Stdio.Buffer: Fixed some documentation typos.
Fix docs typos in Process.run()
String.Buffer: completed the removal of addat
_Roxen: Fixed buffer overrun in http_decode_string(). Also increases the strictness of a few related testsuite tests.
Stdio.File: Fixed autodoc markup error.
Make TLS 1.0 loweset default TLS in Pike 8.0 too.
Document rsa_unpad return value.
Put the default lower version at TLS 1.0. IE users on pre XP need to upgrade.
Fixed some issues when zlib isn't present.
Stdio.Buffer: Added try_output().
set_priority(): add "normal" as a priority. This makes it possible to return to the default priority in a documented way. (cherry picked from commit 2d3e79777cd88b5c708447fba1b68783136539a0)
Stdio: typo in documentation Buffer does not start with a vowel anymore.
Nettle: Reference the programs being inherited. Make sure that there's a local symbol in the parent for the programs that we inherit. Otherwise the parent_identifier in the generated inherit may point back to some later override. This happens frequently when inheriting the State class. This fixes infinite recursion in eg Program.all_inherits() when called with several of the Crypto and Nettle classes.
Stdio.Buffer: output_to() et al now support functions. This reduces the need for proxy objects in higher level code using Stdio.Buffer internally. Also adds support for subtyped objects and multiple inheritance of Stdio.Fd et al.
Stdio.File: Name space cleanups. Multiple symbols in Stdio.File are now protected: * {in,out}buffer * ___{read,write,close,read_oob,write_oob,fs_event}_callback * ___id Moved the {read,write}_callback_t types to the Stdio module proper. Also adds a do {} while(0) wrapper to the CHECK_OPEN() macro.
Mysql.list_fields(): support more field flags
Some changes to CHANGES. Mainly rewording things, added some notes about Stdio.Buffer
No changes for 8.1 yet
Removed MAX_FD configure test It only returns the current max anyway, which is usually smaller than the max if you are running as root, and can also be changed at any time at runtime. Instead, use sysconf(_SC_OPEN_MAX) when available if needed, and as a last resort a hardcoded value (on Windows), but as a secondary change all uses except two was removed: o Stdio.get_all_active_fd - On systems without /dev/fd and /proc/self/fd. o On NT, the size of FD_SET is now set to a hardcoded value (64k). The rewrite of get_all_active_fd also speeds it up a lot. Not that it is a frequently used function.
IOBuffer: Propagate read errors in input_from(). input_from() now returns -1 on read error. Also minor optimization to avoid extra read(2) call when reading a multiple of 4096 bytes.
Verify that no additional payload is hidden in ASN.1 structures.
Added validation method and _sprintf.
Stdio.Fd: Map _errno. Make it possible to set the errno for a Stdio.File from Pike code. Also added some minimal documentation for the other mapped fields in Stdio.Fd, as well as moving the documentation for the low-level functions from Stdio.File to Stdio.Fd.
Rework Program.all_inherits to be recursive
Typo fixes in GTK2.ScrolledWindow docs
Added more direct mapping to seek. Also added SEEK_DATA and SEEK_HOLE support if they are supported by the OS (solaris, freebsd, linux). In order to keep compatibility the SEEK_<whatever> constants are actually strings. Deprecated the old seek( offset, multiplier, adder ) version of seek (which was, according to the documentation, obsolete before year 2000).
Gdbm: Fixed some documentation typos.
Removed compat support for Pike 7.4.
Parser.HTML: Added mode quote_stapling(). This is a compatibility mode with the Pike 7.8 and earlier Parser.HTML. Do not use if you can avoid it.
Fixed the read and write callback types. This makes them more usable in strict_types mode. Since the types are now so long they use a typedef.
Removed add_byte. We have add_int8.
Use Stdio.IOBuffer instead of ADT.struct
When we know the types we can optimize pop and friends. Use that.
Revert to String.Buffer simplex. Lost functionality needs to be found in IOBuffer.
Fix typos.
Moved some common code to functions. Also use the new "map variable from structures" support to remove two getters.
IOBuffer: Return -1 from output_to() on write error.
Fixed autodoc error
Some IOBuffer work o Made all (I think) functions atomic. Either they work or they do nothing (except throw an error or return 0). o One minor optimization to avoid copies when strings/system.memory object etc are added to an empty buffer. Unless you add more data the buffer is just moved to point to the object that was just added. The malloced buffer is still kept around, however. o Added a very very basic testsuite for IOBuffer. More to come.
IOBuffer: Some documentation fixes.
Added some references to PKCS#1
Added get_certificates().
Merge remote-tracking branch 'origin/8.0' into string_alloc Conflicts: src/stralloc.c
Removed stdin/stderr/stdout variables in the 7.8 compat stdio. Keeping them generates about 100 lines of warnings when the file is compiled due to incompatible types for everything different between Fd_ref and Fd, more or less
Fixed a few warnings.
Added share option to SSLPort as well
Update GTK2 docs based on source files (including the additional options)
Added Stdio.IOBuffer.write_to(Stdio.Stream).
GTK2: Update Scale docs based on source file
[autodoc] Some toplevel documentatioon for Cache.
IOBuffer documentation fixes.
Repair and cleanup declarations.
[autodoc] Added some linebreaks
Fixed a few autodoc syntax errors.
Pike 7.2 was released 2002. Stop supporting compat for it.
Wrap some comments.
Merge remote-tracking branch 'origin/8.0' into string_alloc
Improved type checking.
Image.Freetype: allow use of faces beyond position 0 in font files.
encode_value: Improved support for variant functions. Variant functions weren't dumped correctly if they were overloading inherited non-variant functions. Fixes remaining issue with the dumping of Crypto.RSA.State.
Reintroduced missing test before using private globals.
Less crazy coding style.
Fix a crash.
Changed back to using apply(current_object,function). The name of the C-function seems to change between f_cq__decode and f_cq__Image_WebP_decode randomly. There is no obvious pattern, at least
Added F_PRIVATE_TYPED_GLOBAL. Much like PRIVATE_GLOBAL, but handles typed svalues (everything but int, function and object). No assign yet.
Dropped 7.0 hiding support in the traditional manual. Unless I am incorrect this list should have included 7.6 and 7.8 as well
There is such a function as error.
Stdio.sendfile: Fixed use before set. Fixes "Indexing the NULL value with \"call_out\".", when Stdio.sendfile(({""}), 0, -1, -1, 0, simulated_file, cb, ...). Also fixes issue where the trailers weren't sent if there was no source file, no headers and a non-empty file length. Fixes [bug 7230 (#7230)].
Added Yabu documentation Also renamed db -> DB and lookup -> LookupDB
Fixed an invariance vaguely pointed out by Niels.
Standards.ASN1: Removed the TeletexString type. This ASN.1 string type was encoded according to T.51/T.61, and was not handled properly by other software at the time (~1995) when it was in use.
cpp(): added documentation
SSL.File: Improved robustness of close handling. The close_state is now set correctly even when there's a pending close_errno and the peer closes the connection.
Mappings: Fixed assertion. Ensure that there are at least as many keypairs as buckets in created mappings. Fixes fatal "Pretty mean hashtable there buster!".
Thread.Queue: Added FIXME. The Thread.Queue API ought to be extended to be compatible with ADT.Queue.
SSL.File: Removed some redundant tests in read().
Make heartbleed probing optional and default off.
Fixed type
SSL.File: Fail read() on ALERT. read() now fails with EIO if the peer has aborted the connection with a fatal alert. Also sets errno to EAGAIN in nonblocking read() if no data available and not closed by peer.
Debug cleanup.
SSL.File: Fixed potential hang in blocking read(). The remote close packet may already have been received, in which case no read callback is installed anymore, and the local backend would hang. Also updates the documentation to mention that blocking read and write in concurrent threads now is supported.
Paranoia: Use guaranteed_memset() to CLEAR_ON_EXIT.
Image: Fixed a few documentation typos.
We are typically only calling sign/verify once a connection, so just do the implementation selection during that call.
Moved _Regexp_PCRE documentation to Regexp.PCRE. Also mark up code segments in the documentation with @code.
SSL.File: Stricter type for backend_once().
SSL.File: Changed backend handling. The backend to use (real/local) now strictly depends on blocking/ nonblocking mode. This means that creation of the local backend can be (and has been) moved to set_blocking{,_keep_callbacks}(). This reduces the number of short-lived backends used by SSL in a typical nonblocking backend-driven application down to ~ zero.
Documentation: Added some crossreferences for *.secure().
Gmp.mpz: Propagate CLEAR_ON_EXIT to bignums. Creating a bignum from a String.secure()d string now causes the bignum to be Object.secure()d.
Object: Added secure(). This function sets the OBJECT_CLEAR_ON_EXIT flag on the provided object (analogous to String.secure() and STRING_CLEAR_ON_EXIT). Also fixes the documented type of String.secure().
Runtime: Added flags field for objects.
Optimized rsa_unpad a bit.
CHANGES: Updated the segments about Crypto and SSL. Splitted the combined segment into one about SSL and one about Crypto and Nettle changes. Combined, reworded and extended several items.
SSL.File: Revamped handling of errno. Splits cb_errno into {read,write,close}_errno, which in turn are used to update local_errno depending on which of {read,write,close,renegotiate}() et al was called. Removes the now obsolete FIX_ERRNOS() macro. Also removes a direct call of close_callback() from ssl_close_callback().
SSL.File: Improved handling of user callbacks in set_backend(). Any pending callbacks now migrate to the new backend. Also clears pending callbacks on shutdown().
Nettle.BufferedCipher: Fixed bug in unpad(). The new unpad() padding checker didn't survive the case where the padding consisted of a single byte.
Support REQUEST_GETNEXT by allowing callback to return a different OID. Previously, the API only supported returning the requested OID, which made it impossible for the callback to return the "next" OID (the one actually used in REQUEST_GETNEXT requests).
SSL.Session: Fixed some warnings.
SSL.Session: Improve interoperation with GnuTLS. GnuTLS doesn't like certificates for SHA256 signing being used with suites (in TLS 1.1 and earlier) using SHA1. We now filter such certs.
SSL.File: Detach chaining of callbacks for read. The user {accept,read,close}_callback():s are now no longer called directly from the internal ssl_read_callback(), but instead via internal_poll() (analogous to ssl_write_callback()). This attempts at further reducing the code complexity of SSL.File.
SSL.File: Detach chaining of callbacks for write. Adds schedule_poll() and internal_poll(). The user {write,close}_callback():s are now no longer called directly from the internal ssl_write_callback(), but instead via a call_out of internal_poll() (scheduled by schedule_poll()). This is a start at attempting to reduce the code complexity of SSL.File.
Since Session doesn't know about Context, do the CertificatePairs lookup in the caller to avoid ugly type casts.
No SNI in Pike 7.8.
OO harder. Let CertificatePair sort themselves according to perceived certificate strength.
Optimizer: Fixed bug in foreach with ranges. The foreach range optimizer didn't handle negative start ranges, which would cause foreach to index the array out of bounds. Fixes [bug 7216 (#7216)].
Kill NPN fully.
SSL.Connection: Added query_write_queue_size(). This provides an easy API to see whether it is meaningful to call to_write().
Stdio.File: Improved documentation of write(). Restructured and more details about behaviour in nonblocking mode.
SSL.File: Unify code paths in write(). Reduce the amount of duplicated code in write() by unifying the code for the array and string cases. This has the added benefit of having the array case actually being tested.
Process: Fixed documentation for kill(). predef::kill() returns int(0..1) (not void). Thanks to Per Cederqvist <cederp@opera.com> for the report. Fixes [LysLysKOM 20889011]. Also strengthens the return type from int to int(0..1).
Standards.PKCS.Identifiers: Added brainpool. This adds the brainpool curve identifiers from RFC 5639.
SSL.Context: Added get_signature_algorithms(). Also extends the documentation for the signature_algorithms variable a bit.
Crypto.RSA: Reenable the generate_key() compat function. Also fixes some related warnings.
Pike.identify_cycle: Improved documentation somewhat.
Doc: Moved identify_cycle() documentation to proper place.
SSL.Constants: Added some constants from RFC 7250.
SSL.Cipher: Extended hash_packet() with length adjustment. This is needed to support the current draft of encrypt-then-mac.
Documentation update.
GC: Bugfix in visit_short_svalue to avoid fatal. Fixes a fatal that was triggered if Pike.count_memory or Pike.identify_cycle was performed on a backend object having either pending call_outs or any active or inactive fd:s (it seems that's the only call site of gc_recurse_short_svalue, which in turn is the only call site of visit_short_svalue).
Significantly faster stack handling in many cases This is done by declaring pike_interpreter to be a const variable. This is, obviously, not quite true. Different threads have different values for the variable in question, but it is always the same for the lifetime of the thread. These changes make it be const everywhere except in interpret.c and threads.c. If the variable was moved to threads.c it could probably be const in interpret.c as well. This generates fully working code on at least one architecture with one compiler. ;) The gain is fairly substantial in code size (it saves about 10% of the binary size) and speed is faster, since it no longer has to read the value of **Pike_interpreter every time the stack is used (one step is skipped, but the stack pointer is still re-read if a function has been called) push_int(0), push_int(1), push_int(2) before: | movq Pike_interpreter_pointer(%rip), %rax | movq (%rax), %rcx | leaq 16(%rcx), %rdx | movq %rdx, (%rax) | movq $0, 8(%rcx) | movq $0, (%rcx) | movq Pike_interpreter_pointer(%rip), %rax | movq (%rax), %rcx | leaq 16(%rcx), %rdx | movq %rdx, (%rax) | movq $0, (%rcx) | movq $1, 8(%rcx) | movq Pike_interpreter_pointer(%rip), %rax | movq (%rax), %rcx | leaq 16(%rcx), %rdx | movq %rdx, (%rax) | movq $0, (%rcx) | movq $2, 8(%rcx) And after: | movq Pike_interpreter_pointer(%rip), %rax | movq (%rax), %rcx | movq $0, (%rcx) | movq $0, 8(%rcx) | movq $0, 16(%rcx) | movq $1, 24(%rcx) | leaq 48(%rcx), (%rax) | movq $0, 32(%rcx) | movq $2, 40(%rcx)
Remove all the private classes and use the factory and the ASN1 module support for dynamic tags and classes.
Import Standards.ASN1.Types
Added compatibility for constructed and primitive.
Nettle: Use PROGRAM_CLEAR_STORAGE.
Pike: Added Pike.identify_cycle(). This is useful to identify reference cycles in Pike data structures, so that the need for garbage collection can be reduced.
GC: Clean up some of the visit_* API. All the visit_*() functions now have all arguments.
Nettle: Added __builtin.Nettle.BlockCipher.
Nettle.BlockCipher: Added new mode: OFB.
Nettle.BlockCipher: Inherit __builtin.Nettle.BlockCipher. It is now possible to add generic stuff to all block ciphers by adding it to __builtin.Nettle.BlockCipher. NB: Requires cipher.cmod to be processed by a recent precompiler.
ZXID: Fixed warning about redefined symbol. GETTIMEOFDAY is defined in both port.h and <zxid/errmac.h>. We don't use either in the ZXID module, so just undef the first definition.
__builtin.Nettle: Added some missing functions. Adds serveral query functions to the State classes and has them default to calling the corresponding function in the parent.
Don't support indefinite form.
Support decoding high tag numbers.
Simplify the code a bit by not having cls and tag as constants.
The CR in a macro definition line is now outputted as a space, in line with how CR is treated elsewhere in CPP. Adjusted testcase.
Nettle: Fixed some minor issues with CCM. Set the PROGRAM_NEEDS_PARENT and PROGRAM_USES_PARENT flags where required (they are probably inherited anyway, but...). Fixed some minor CCM documentation misses.
Nettle.BlockCipher: Added new mode: CFB. This adds support for the Cipher Feed-Back mode, which is a NIST-specified mode of operation.
Nettle: Major cleanup and fixes of PCBC.