aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2019-01-08Revamp block_crypt_nif()Doug Hogan
* Simplify error checking. * Add bounds checking before casting. * Add error checking for all OpenSSL calls.
2019-01-08Revamp bn2term()Doug Hogan
* Add error handling for OpenSSL calls. * Change dlen to signed since BN_num_bytes() returns int. * Use enif_make_badarg() on error since it only returned undefined before in one type of error.
2019-01-08Revamp mod_exp_nif()Doug Hogan
* Add error checking for OpenSSL calls. * Change dlen from unsigned to signed since BN_num_bytes is int. * Add bounds checking before casting. * Consolidate all freeing to one location on error or success.
2019-01-08Revamp bin_from_bn()Doug Hogan
* Add error handling for all OpenSSL calls - There was nothing returned on error before so use enif_make_badarg(). * Add bounds checking before casting.
2019-01-08Revamp get_bn_from_bin()Doug Hogan
* Add bounds checking. * Add error checking for OpenSSL calls. * Only set *bnp on success.
2019-01-08Revamp get_bn_from_mpint()Doug Hogan
* Add bounds checking. * Add error checking for OpenSSL calls. * Only set argument *bnp on success.
2019-01-08Revamp rand_seed_nif()Doug Hogan
* Bounds check before casting.
2019-01-08Revamp rand_uniform_nif()Doug Hogan
* Add error handling for all OpenSSL calls.
2019-01-08Revamp strong_rand_range_nif()Doug Hogan
* Add error checking for all OpenSSL calls.
2019-01-08Revamp strong_rand_bytes_nif()Doug Hogan
* Add bounds check before casting.
2019-01-08Revamp info_lib()Doug Hogan
* Add error checking and use enif_make_badarg() on error. * Use size_t when using sizeof(). * Move initialization away from declaration so it's not as easy to miss.
2019-01-08Revamp change_basename()Doug Hogan
* Change the parameter from int to size_t. - Only caller doesn't need to change since it was already passing sizeof(). * Add unsigned wrapping checks.
2019-01-08Revamp get_dss_public_key()Doug Hogan
* Simplify logic by having incremental allocation and only free on error on one place. * Add error checking on all OpenSSL calls. * Make it explicit when you need to be careful with non-reference counted pointers. - set0 calls will use the pointer values without ref counting. - On success, set pointers to NULL to avoid double frees since the struct is now responsible for freeing the resources.
2019-01-08Revamp get_dss_private_key()Doug Hogan
* Simplify logic by having incremental allocation and only free on error in one place. * Add error checking on all OpenSSL calls. * Make it explicit when you need to be careful with non-ref counted pointers. - set0 calls will save the pointer without reference counting. - On success, set pointers to NULL to avoid double frees since the struct is now responsible for freeing the resources.
2019-01-08Revamp ecdh_compute_key_nif()Doug Hogan
* Bug fix: ECDH_compute_key was not being checked for failures - That function returns 0 on failure and never returns < 0. - Using <= 0 check because OpenSSL uses that internally and on their wiki. * Remove unnecessary variable i * Make the gotos always flow downward rather than jumping back.
2019-01-08Revamp chacha20_stream_crypt()Doug Hogan
* Check return values on all OpenSSL and Erlang calls. * Remove trailing semicolon after function definition.
2019-01-08Revamp chacha20_stream_init()Doug Hogan
* Check return values on all OpenSSL calls. * Remove trailing semicolon after function definition.
2019-01-08Revamp poly1305_nif()Doug Hogan
* Fix a possible memory leak where enif_alloc_binary() wasn't always converted into a term or freed in the error path.
2019-01-08Revamp rc4_set_key()Doug Hogan
* Bounds check key.size before casting.
2019-01-08Revamp get_eddsa_key()Doug Hogan
* pkey is only set on success.
2019-01-08Revamp do_exor()Doug Hogan
* Add additional error checking.
2019-01-08Revamp cmac_nif()Doug Hogan
* Add error checking on all OpenSSL and Erlang calls.
2019-01-08Add limits.h to the common headerDoug Hogan
A number of files will do bounds checking.
2019-01-07Revamp hmac_context_dtor()Doug Hogan
Make it NULL safe.
2019-01-07Revamp evp_md_ctx_dtor()Doug Hogan
Make it NULL safe.
2019-01-07Revamp engine_ctx_dtor()Doug Hogan
Make it NULL safe.
2019-01-07Revamp evp_cipher_ctx_dtor()Doug Hogan
Make it NULL safe.
2019-01-07Merge PR-2084 from sverker/erts/enif_select-custom-msg OTP-15349Sverker Eriksson
Custom message format for enif_select
2019-01-07Merge branch 'maint'Lukas Larsson
2019-01-07Merge branch 'lukas/erts/persistent_term_test_fix' into maintLukas Larsson
* lukas/erts/persistent_term_test_fix: erts: Fix persistent_term testcases
2019-01-07erts: Add enif_select_read|write with 'msg_env' argumentSverker Eriksson
2019-01-07Merge branch 'maint'Björn Gustavsson
* maint: Remove unsafe optimization for delaying creation of stackframe Conflicts: lib/compiler/src/v3_codegen.erl
2019-01-07Merge branch 'bjorn/compiler/interim-tuple-bug/OTP-15501/ERL-807' into maintBjörn Gustavsson
* bjorn/compiler/interim-tuple-bug/OTP-15501/ERL-807: Remove unsafe optimization for delaying creation of stackframe
2019-01-07Merge branch 'maint'Hans Nilsson
* maint: ssh: Wait a bit for the docker client to finnish in ssh_compat_SUITE
2019-01-07Merge branch 'hans/ssh/cuddle_tests' into maintHans Nilsson
* hans/ssh/cuddle_tests: ssh: Wait a bit for the docker client to finnish in ssh_compat_SUITE
2019-01-07Merge branch 'maint'Ingela Anderton Andin
Conflicts: lib/ssl/src/ssl_handshake.erl
2019-01-07ssh: Wait a bit for the docker client to finnish in ssh_compat_SUITEHans Nilsson
The testing with a remote client in a docker and a local server could show some hazards. For instance instructing the client to sftp a file to the server is not necessarily ready in the server's file system when the common_test is scheduled. To avoid that the test suite dooms a file operation to not have been performed, simply sleep at increasing times for a while with testing if it is done. After a while give up and signal a fault.
2019-01-07Merge pull request #2063 from bjorng/bjorn/compiler/options/OTP-15456Björn Gustavsson
Make all compiler options work in the option list
2019-01-07Merge branch 'ingela/ssl/error-handling-should-be-throw/OTP-15502' into maintIngela Anderton Andin
* ingela/ssl/error-handling-should-be-throw/OTP-15502: ssl: Clean up extension handling
2019-01-07Merge pull request #2059 from michalmuskala/mm/bif-microopsBjörn Gustavsson
Use microops for BIFs
2019-01-07Remove unsafe optimization for delaying creation of stackframeBjörn Gustavsson
b89044a800c4 introduced an optimization that tries to delay creation of stack frames. It turns out that this optimization is not always safe. (See the new test case for an example.) Since the code generator is completely rewritten in the `master` branch for the upcoming OTP 22 release, it does not make sense trying to mend this optimization. It is better to remove it. Out of a sample of about 1000 modules in OTP, about 50 of them are changed as a result of removing this optimization. The compiler in OTP 22 will do the same optimization in a cleaner, safer, and more effective way. https://bugs.erlang.org/browse/ERL-807
2019-01-07Merge branch 'maint'Hans Nilsson
* maint: Fix sftpd interop for SSH_FXP_STAT
2019-01-07Merge pull request #2077 from KryoStoffer/maintHans Nilsson
ERL-822 Fix sftpd interop for SSH_FXP_STAT OTP-15498
2019-01-04Fix sftpd interop for SSH_FXP_STATKristoffer Larsen
Some SFTP client's have been discover to claim one version of the protocol and send messages in a different version. In the spirit of Postel's law, we can for SSH_FXP_STAT, ignore the differences in the protocol, as we are not doing anything with the flags anyway.
2019-01-03Merge branch 'maint'Hans Nilsson
* maint: Updated OTP version Prepare release
2019-01-03Merge branch 'maint-20' into maintHans Nilsson
* maint-20: Updated OTP version Prepare release
2019-01-02Merge branch 'hans/crypto/Makefile_fixes/OTP-14732'Hans Nilsson
* hans/crypto/Makefile_fixes/OTP-14732: crypto: Fix 'make clean'
2019-01-02crypto: Fix 'make clean'Hans Nilsson
2019-01-02Merge pull request #2068 from hogand/crypto/split-c-filesHans Nilsson
crypto: Split up crypto.c into multiple files OTP-14732
2018-12-28Updated OTP versionOTP-20.3.8.16Erlang/OTP