aboutsummaryrefslogtreecommitdiffstats
path: root/lib
AgeCommit message (Collapse)Author
2016-02-18Merge branch 'legoscia/ssl-doc-typos' into maintHenrik Nord
* legoscia/ssl-doc-typos: Fix typos in ssl.xml OTP-13339
2016-02-17kernel: Correct contract for inet:getifaddrs/1Hans Bolinder
See also http://bugs.erlang.org/browse/ERL-95.
2016-02-17Be suspicious of certificates without CRL DPsMagnus Henoch
Previously, if certificate revocation checking was turned on, and a certificate didn't contain a CRL Distribution Points extension, and there was no relevant CRL in the cache, then ssl_handshake:crl_check would accept the certificate even if the crl_check option was set to reject certificates for which the revocation status could not be determined. With this change, such certificates will only be accepted if the crl_check option was set to best_effort. The process for CRL validation is described in section 6.3 of RFC 5280. The text doesn't mention any special treatment to be given to certificates without distribution points: it just says "For each distribution point..." (section 6.3.3), which would leave the revocation status undetermined, unless there were "any available CRLs not specified in a distribution point but issued by the certificate issuer". Thus the result of this algorithm should be UNDETERMINED in this case, not UNREVOKED, and the crl_check option should govern how the implementation reacts to this result.
2016-02-17ssl: with verify_none, accept critical extensionsMagnus Henoch
When establishing a TLS connection with {verify, verify_none}, if the server has a certificate with a critical extension, for example a "Netscape Cert Type" extension, certificate verification would fail, which is surprising given that the name of the option suggests that no verification would be performed. With this change, certificate extensions marked as critical are ignored when using verify_none.
2016-02-17xmerl: Remove 'no_return' Dialyzer warningsHans Bolinder
2016-02-17xmerl: Add suppression of Dialyzer warningsHans Bolinder
2016-02-17eunit: Add suppression of Dialyzer warningsHans Bolinder
2016-02-17debugger: Add suppression of Dialyzer warningsHans Bolinder
2016-02-17kernel: Add suppression of Dialyzer warningsHans Bolinder
2016-02-17mnesia: Add suppression of Dialyzer warningsHans Bolinder
2016-02-17observer: Add suppression of Dialyzer warningsHans Bolinder
2016-02-17runtime_tools: Add suppression of Dialyzer warningsHans Bolinder
2016-02-17stdlib: Add suppression of Dialyzer warningsHans Bolinder
2016-02-17test_server: Add suppression of Dialyzer warningsHans Bolinder
2016-02-17tools: Add suppression of Dialyzer warningsHans Bolinder
2016-02-16Merge branch 'ia/pr/958/OTP-13334' into maintIngela Anderton Andin
* ia/pr/958/OTP-13334: ssl: verify cert signature against original cert binary
2016-02-16kernel: Fix heart dialyzer typesBjörn-Egil Dahlberg
2016-02-16kernel: Add heart callback testBjörn-Egil Dahlberg
2016-02-16kernel: Add basic system check of schedulers on heartbeatBjörn-Egil Dahlberg
Before a heartbeat to the port program a responsiveness check of the schedulers is performed. If the responsiveness check fails, stalls, the heartbeat will not be performed (as intended).
2016-02-16kernel: Add validation callback for heartBjörn-Egil Dahlberg
* heart:set_callback/2 * heart:get_callback/0 * heart:clear_callback/0 The callback is called before every heartbeat to the heart port. The callback needs to return 'ok' if the validation is correct.
2016-02-15kernel: Refactor heart codeBjörn-Egil Dahlberg
2016-02-15Merge branch 'tuncer/ei-breakage' into maintHenrik Nord
* tuncer/ei-breakage: ei: fix breakage reported by Sergei Golovan Revert "musl: fix gethostbyname_r/gethostbyaddr_ selection" OTP-13328
2016-02-12asn1: Suppress warnings for improper lists in generated codeBjörn Gustavsson
2016-02-12Merge branch 'dgud/mnesia/del_schema_hangs/OTP-13284' into maintDan Gudmundsson
* dgud/mnesia/del_schema_hangs/OTP-13284: mnesia: let loader check if tablelock is needed mnesia: Avoid deadlock possibility in mnesia:del_table_copy schema
2016-02-10tools: Remove dead code in lcntBjörn-Egil Dahlberg
2016-02-10Merge branch 'bjorn/compiler/beam_bsm/OTP-13309' into maintBjörn Gustavsson
* bjorn/compiler/beam_bsm/OTP-13309: Eliminate crash because of unsafe delaying of sub-binary creation
2016-02-10Merge branch 'nybek/speed_up_supervisor_count_children' into maintSiri Hansen
* nybek/speed_up_supervisor_count_children: Speed up supervisor:count_children/1; simple_one_for_one Add supervisor:get_callback_module/1 OTP-13290
2016-02-09Improved maps:with/2 and maps:without/2 algorithmBen Wilson
The current implementation is roughly O(N*M) where N is the number of items to be removed, and M is the number of items in the map. This does not include the cost of `maps:from_list` or `maps:to_list`. This leads to pretty horrifying execution times on large maps regardless of how many or few keys are to be removed. The new implementation is O(N) where N is the number of items to be removed. For each N there's the cost of removing a key from a map, and but in practice that turns out to be a vast improvement for all map sizes I tested The new maps:take/2 implementation similarly builds a list of keys and values by iterating only the list of desired keys, and then hands it off to maps:from_list. This turned out to be faster than N maps:put calls.
2016-02-09mnesia: let loader check if tablelock is neededDan Gudmundsson
move_table_copy needs the lock that was set previously in del_table_copy. This doesn't work on old nodes, so bump protocol version and check it. Remove old protocol conversion code, which have been around since OTP-R15. Checking if lock is needed requires rpc communication via mnesia_gvar ets table to be backwards compatible.
2016-02-09dialyzer: Correct byte_size() and comparisonsHans Bolinder
The argument of byte_size() is a bitstring(). The code in erl_bif_types that finds cases where comparisons always return true or false is corrected when it comes to maps and bit strings.
2016-02-08Merge branch 'sverk/ecc-fixes' into maintSverker Eriksson
OTP-13311 * sverk/ecc-fixes: Ensure testing ssl with supported ciphers only Only use supported EC curves in crypto tests Check the result of EC_GROUP_new_curve_* calls
2016-02-08ssl: verify cert signature against original cert binaryMatt Campbell
When searching for a certificate's issuer in the `CertDB`, verify the signature against the original DER certificate from the handshake instead of a re-encoding of the parsed certificate. This avoids false negatives due to differences between DER encoding implementations of OTP and other platforms.
2016-02-08ssh: fixes port_command failure on WIndows in ssh_test_cli.erlHans Nilsson
2016-02-08Merge branch 'ia/ssl/handshake-fragmentation/OTP-13306' into maintIngela Anderton Andin
* ia/ssl/handshake-fragmentation/OTP-13306: ssl: Big handshake messages needs to be fragmented on TLS record level
2016-02-08dialyzer: Fix a bug concerning the option 'plt_remove'Hans Bolinder
[James Fish:] Dialyzer always asserts that files and directories passed in its options exist. Therefore it is not possible to remove a beam/module from a PLT when the beam file no longer exists. Dialyzer should not to check files exist on disk when removing from the PLT.
2016-02-08tools: Correct a Cover testHans Bolinder
2016-02-08Merge branch 'anders/diameter/appup/OTP-13283' into maintAnders Svensson
* anders/diameter/appup/OTP-13283: Add missing appup after 17.5.6.8 merge
2016-02-08Eliminate crash because of unsafe delaying of sub-binary creationBjörn Gustavsson
The following code would fail to compile: decode(<<Code/integer, Bin/binary>>) -> <<C1/integer, B1/binary>> = Bin, case C1 of X when X =:= 1 orelse X =:= 2 -> Bin2 = <<>>; _ -> Bin2 = B1 end, case Code of 1 -> decode(Bin2); _ -> Bin2 end. The error message would be: t: function decode/1+28: Internal consistency check failed - please report this bug. Instruction: return Error: {match_context,{x,0}}: The beam_bsm pass would delay the creation of a sub-binary when it was unsafe to do so. The culprit was the btb_follow_branch/3 function that for performance reasons cached labels that had already been checked. The problem was the safety of a label also depends on the contents of the registers. Therefore, the key for caching needs to be both the label and the register contents. Reported-by: José Valim
2016-02-07Fix dialyzer warning and some code refactoringKostis Sagonas
A previous commit introduced a change that exposed dead code in this module and caused dialyzer warnings. This dead code was taken out. While at it, performed some code refactoring in the handling of the bs_get_integer primop.
2016-02-05ssl: Big handshake messages needs to be fragmented on TLS record levelIngela Anderton Andin
2016-02-05mnesia: Avoid deadlock possibility in mnesia:del_table_copy schemaDan Gudmundsson
del_table_copy grabs a write lock in a new process in prepare_op/3 to change 'where_to_read' when a table copy is updated. When del_table_copy(schema, Node) is called all copies located on Node are deleted, and thus many locks are taken. Since this was done outside of the schema-transaction, mnesia's deadlock prevention algorithms was sidestepped and a deadlock could occur. Fix by always grabbing write-locks for all changed tabs early and in the same transaction, this might slow done the operation some but it must be done and it also cleans up the code.
2016-02-05Minor correction of documentation as reported in bugs.erlang.org:ERL-87Kenneth Lundin
2016-02-05Merge branch 'ia/ssl/validator' into maintIngela Anderton Andin
* ia/ssl/validator: ssl: Only start a new session validator if the old one has finished its work
2016-02-04Merge branch 'tnt-dev/fix-function-index-sort' into maintZandra
* tnt-dev/fix-function-index-sort: Don't sort function index when it's not necessary OTP-13302
2016-02-04Merge branch 'legoscia/tls-dist-listen-ip' into maintZandra
* legoscia/tls-dist-listen-ip: TLS distribution: bind erts socket to localhost OTP-13300
2016-02-04Merge branch 'legoscia/patch-3' into maintZandra
* legoscia/patch-3: Fix documentation of net_kernel:allow/1 OTP-13299
2016-02-04Export gen_tcp:socket() typeBernard Duggan
When handling a gen_tcp socket, it's handy to be able to give it its proper type and have dialyzer be able to validate it, rather than falling back on using port(). The gen_udp equivalent is already exported.
2016-02-03Merge branch 'rj/release-handler-noproc-fix' into maintSiri Hansen
* rj/release-handler-noproc-fix: Fix noproc crash during release installation OTP-13291
2016-02-03Speed up supervisor:count_children/1; simple_one_for_oneRory Byrne
Speed up supervisor:count_children/1 for simple_one_for_one supervisors. This is achieved by avoiding looping through all the child process and verifying that each one is alive. For a supervisor with 100,000 'temporary' children the count-time will drop from approx 25ms to about 0.005ms. For a supervisor with 100,000 'permanent' or 'transient' children the count-time will drop from approx 30ms to about 0.005ms. This avoids having the supervisor block for an extended period while the count takes place. Under normal circumstances the accuracy of the result should also improve since the duration is too short for many processes to die during the count.
2016-02-03Add supervisor:get_callback_module/1Siri Hansen
This function is used by release_handler during upgrade. This was earlier implemented in the release_handler, but it required a copy og the definition of the supervisor's internal state, which caused problems when this state was updated.