aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2016-09-28Document FIPS mode supportDániel Szoboszlay
2016-09-28Fix aes_gcm test case in crypto_SUITEMagnus Henoch
In one of the test cases, the IV is 8 bytes. In FIPS mode, the minimum allowed IV length is 12 bytes, so let's skip that test case.
2016-09-28Use proper test data for FIPS mode negative testsMagnus Henoch
block_crypt_nif does some sanity tests on its arguments before trying to initialise the cipher. This made some of the tests in crypto_SUITE fail, since they were expecting notsup, not badarg. Fix this by passing the same test data as for the positive tests.
2016-09-28Filter elliptic curves depending on FIPS modeMagnus Henoch
Adapted from commit 675ee6860d2c273bcc6c6a0536634a107e2a3d9f.
2016-09-28Skip FIPS tests if we cannot enable FIPS modeMagnus Henoch
Even if Erlang/OTP has been built with --enable-fips, it's possible that the OpenSSL library we're linked to doesn't support FIPS mode. In that case, it will fail to enable it at run time. Let's handle that in crypto_SUITE, by skipping the tests instead of failing.
2016-09-28Update test suites with FIPS mode supportDániel Szoboszlay
Every algorithm is now tested in both FIPS and non-FIPS modes (when crypto is compiled with FIPS support). In FIPS mode non-FIPS algorithms are disabled and the tests verify that they crash with notsup error as expected. In FIPS mode RSA and EC algorithms don't work if the key sizes are below a minimum required value - which happened to be the case with most keys used in the tests. These tests were changed to use longer keys (even in non-FIPS mode for simplicity). Conflicts: lib/crypto/test/crypto_SUITE.erl
2016-09-28Support using OpenSSL in FIPS modeDániel Szoboszlay
FIPS mode support needs to be enabled at compile time, by configuring Erlang/OTP with --enable-fips option. In FIPS mode the non-FIPS algorithms are disabled and raise error notsup. The supported protocols list is properly updated in FIPS mode to advertise only the enabled protocols. FIPS mode is off by default even if Erlang/OTP was built with FIPS support. It needs to be turned on at runtime. The official approach is to set the fips_mode application environment parameter of the crypto application to true. This would turn FIPS mode on when the NIF is loaded and would prevent loading the module on error. Another method is provided via the crypto:enable_fips_mode/1 function, but it is not recommended to be used in production, as it won't prevent the use of the crypto module in case of an error, and would risk OpenSSL crashing the emulator. It is very useful for test suites however that need to check both validated and non-validated functionality. This commit is based on commit 00b3a04d17a653b4abddeebd6dd8a2c38df532d0.
2016-09-28Fix erlang:error/2 calls in crypto.erlMagnus Henoch
Make all calls to erlang:error/2 specify the actual argument list of the function. This ensures that the stacktrace contains the correct arity of the function where the error occurred.
2016-09-28Try to handle not yet available functionality in MacOSX SDKRickard Green
2016-09-28Merge branch ↵Siri Hansen
'legoscia/dynamic-child-shutdown-tuple/ERL-163/PR-1158/OTP-13907' into maint * legoscia/dynamic-child-shutdown-tuple/ERL-163/PR-1158/OTP-13907: Don't report error for shutdown exit tuple
2016-09-28wx: Add simple dropfiles supportDan Gudmundsson
Added wxDropFiles event
2016-09-28Merge branch 'maint'Hans Nilsson
2016-09-28Merge branch 'hans/ssh/update_vsn.mk' into maintHans Nilsson
2016-09-28ssh: Update vsn.mkHans Nilsson
2016-09-28Merge branch 'maint'Hans Nilsson
2016-09-28Merge branch 'isvilen/ssh_REPL_exit_status/PR-1173/OTP-13905' into maintHans Nilsson
2016-09-28Merge branch 'maint'Björn-Egil Dahlberg
2016-09-28Merge branch 'lucafavatella/erts/fix-typo-fp/PR-1177' into maintBjörn-Egil Dahlberg
* lucafavatella/erts/fix-typo-fp/PR-1177: Fix typo in configuration description
2016-09-28Merge branch 'maint'Ingela Anderton Andin
2016-09-28Merge remote-tracking branch 'github/pr/1183' into maintIngela Anderton Andin
* github/pr/1183: Fix typos in public_key_app.xml
2016-09-28Merge branch 'maint'Ingela Anderton Andin
2016-09-28Merge branch 'ahmedshafeeq/inets-httpc-RFC-7231/PR-1172/OTP-13902' into maintIngela Anderton Andin
* ahmedshafeeq/inets-httpc-RFC-7231/PR-1172/OTP-13902: Update test case docs with RFC-7231 Update behavior of httpc:request to match RFC-7231
2016-09-28Updated OTP versionOTP-19.1.1Erlang/OTP
2016-09-28Update release notesErlang/OTP
2016-09-28Merge branch 'ingela/ssl/prepare-patch' into maint-19Erlang/OTP
* ingela/ssl/prepare-patch: ssl: Prepare for release
2016-09-28Merge branch 'ingela/ssl/ECC-selection-fix/OTP-13918' into maint-19Erlang/OTP
* ingela/ssl/ECC-selection-fix/OTP-13918: ssl: Correct ECC curve selection, the error could cause default to always be selected.
2016-09-28Merge branch 'ingela/ssl/handshake-event-queue/OTP-13917' into maint-19Erlang/OTP
* ingela/ssl/handshake-event-queue/OTP-13917: ssl: Avoid event reordering
2016-09-28parsetools: Correct handling of Unicode in LeexHans Bolinder
The 'dfa_graph' option did not work with Unicode. The testcase 'unicode' was not correct.
2016-09-28ssl: Correct ECC curve selection, the error could cause default to always be ↵Ingela Anderton Andin
selected.
2016-09-27Update test case docs with RFC-7231Ahmed Shafeeq Bin Mohd Shariff
2016-09-27Merge branch 'maint'Sverker Eriksson
2016-09-27Merge branch 'sverker/cerl-dump-macos' into maintSverker Eriksson
2016-09-27Fix typos in public_key_app.xmlMagnus Henoch
2016-09-27ssl: Prepare for releaseIngela Anderton Andin
2016-09-27ssl: Avoid event reorderingIngela Anderton Andin
Several handshake events may be received in the same TLS packet. Then there will be several events pushed to the gen_statems internal queue. New events already in the socket-buffer should not be processed if there are more unprocessed handshake events in next_event queue. We need to handle this in the next_record/1 function.
2016-09-27Merge branch 'maint'Hans Bolinder
* maint: stdlib: Add a testcase for Unicode expander Support for unicode expander
2016-09-27Merge branch 'andrey/stdlib/fix_edlin_expand/ERL-1152' into maintHans Bolinder
* andrey/stdlib/fix_edlin_expand/ERL-1152: stdlib: Add a testcase for Unicode expander Support for unicode expander
2016-09-27erts: Add examples to binary_to_term and term_to_binaryLukas Larsson
2016-09-27erts: Rename __errno in order to avoid conflict on openbsdLukas Larsson
2016-09-27Merge branch 'maint'Siri Hansen
2016-09-27Merge branch 'siri/ttb/ip-client-queue-size/OTP-13829' into maintSiri Hansen
* siri/ttb/ip-client-queue-size/OTP-13829: [ttb] Add option <c>queue_size</c> to tracer/2
2016-09-27Merge branch 'maint'Siri Hansen
2016-09-27Merge branch 'siri/appups-19.1/OTP-13912' into maintSiri Hansen
* siri/appups-19.1/OTP-13912: Update appups in kernel and stdlib for OTP versions > 19.1
2016-09-27Merge branch 'maint'Siri Hansen
2016-09-27Merge branch 'siri/ct_telnet-typo/OTP-13913' into maintSiri Hansen
* siri/ct_telnet-typo/OTP-13913: Fix typo in documentation for ct_telnet:expect/3
2016-09-26Fix typo in documentation for ct_telnet:expect/3Siri Hansen
2016-09-26Update appups in kernel and stdlib for OTP versions > 19.1Siri Hansen
2016-09-26sys_core_fold: Run optimizations to a fixpointBjörn Gustavsson
Run the optimizations until a fixpoint is reached, or until the maximum iteration count is reached. The hope is that in the future we can many small optimizations instead of optimizations that try to do everything in one pass. This change allows us to remove the ad-hoc calls to expr/2 to run more optimizations on a piece of code.
2016-09-26sys_core_fold: Improve case optimizationBjörn Gustavsson
The optimization that avoids building a tuple in a case expression would not work if any clause matched a tuple as in the following example: f(A, B) -> case {A,B} of {<<X>>,Y} -> {X,Y} end. The generated Core Erlang code would look like this (note the tuples in the case expression and the pattern): 'f'/2 = fun (_cor1,_cor0) -> case {_cor1,_cor0} of <{#{#<X>(8,1,'integer',['unsigned'|['big']])}#,Y}> when 'true' -> {X,Y} . . . end It is expected that the code should look like this (note that tuples have been replaced with "values"): 'f'/2 = fun (_cor1,_cor0) -> %% Line 5 case <_cor1,_cor0> of <#{#<X>(8,1,'integer',['unsigned'|['big']])}#,Y> -> {X,Y} . . . end While at it, also fix bugs in the handling of pattern with aliases. The bindings were produced in the wrong order (creating 'let's with referring to free variables), but in most cases the incorrect bindings were discarded later without causing any harm.
2016-09-26sys_core_fold: Correct scope verification codeBjörn Gustavsson
703e8f4490bf broke the scope verification code (by calling ordsets:is_subset/2 with an unsorted second argument). While we are it, also optimize the verification function by avoiding converting the map to a sorted list.