Hanno Becker
7e8e57c6d1
Initialize RSA context in RSA test suite before first potentially failing operation
...
The function `mbedtls_rsa_gen_key` from `test_suite_rsa.function` initialized a stack allocated RSA context only after
seeding the CTR DRBG. If the latter operation failed, the cleanup code tried to free the uninitialized RSA context,
potentially resulting in a segmentation fault. Fixes one aspect of #1023 .
2017-07-23 10:40:29 +01:00
Simon Butcher
de1586799d
Added missing credit to Changelog and format fixes
2017-07-22 11:56:20 +02:00
Ron Eldor
e6ec1d2d44
Check return code of mbedtls_mpi_fill_random
...
Add MBEDTLS_MPI_CHK to check for error value of mbedtls_mpi_fill_random.
Reported and fix suggested by guidovranken in #740
2017-07-22 11:56:20 +02:00
Ron Eldor
8a26de6d99
Resource leak fix on windows platform
...
Fix a resource leak on windows platform, in mbedtls_x509_crt_parse_path,
in case a failure. when an error occurs, goto cleanup, and free the
resource, instead of returning error code immediately.
2017-07-22 11:56:20 +02:00
Ron Eldor
237ab35b4a
Wrong preproccessor condition fix
...
Fix for issue #696
Change #if defined(MBEDTLS_THREADING_PTHREAD)
to #if defined(MBEDTLS_THREADING_C)
2017-07-22 11:56:20 +02:00
Ron Eldor
537e2e9bb3
fix for issue 1118: check if iv is zero in gcm.
...
1) found by roberto in mbedtls forum
2) if iv_len is zero, return an error
3) add tests for invalid parameters
2017-07-22 11:56:20 +02:00
Janos Follath
3422ddfa4c
Remove mutexes from ECP hardware acceleration
...
Protecting the ECP hardware acceleratior with mutexes is inconsistent with the
philosophy of the library. Pre-existing hardware accelerator interfaces
leave concurrency support to the underlying platform.
Fixes #863
2017-07-22 11:55:39 +02:00
Andres Amaya Garcia
fdd11b2531
Improve MBEDTLS_NO_UDBL_DIVISION description
2017-07-22 11:53:56 +02:00
Andres Amaya Garcia
c327aa1542
Remove MBEDTLS_TYPE_UDBL tests from all.sh
2017-07-22 11:53:56 +02:00
Andres Amaya Garcia
de2e70431f
Remove MBEDTLS_TYPE_UDBL option
2017-07-22 11:53:56 +02:00
Andres Amaya Garcia
6fb65864a2
Fix no 64-bit division test in all.sh
2017-07-22 11:53:56 +02:00
Andres Amaya Garcia
33264d7a96
Add tests for 64 and 32-bit int types compilation
2017-07-22 11:53:56 +02:00
Andres Amaya Garcia
713c6fdd4e
Fix check_config.h #error directive
2017-07-22 11:53:56 +02:00
Andres Amaya Garcia
bebc5f69f8
Fix typo in check_config.h
2017-07-22 11:53:56 +02:00
Gilles Peskine
710f54182f
Checked names
2017-07-22 11:53:56 +02:00
Gilles Peskine
9a9adcd6aa
MBEDTLS_NO_INT64_DIVISION -> MBEDTLS_NO_UDBL_DIVISION
...
Changed the option to disable the use of 64-bit division, to an option
to disable the use of double-width division, whether that's 64 or 128-bit.
2017-07-22 11:53:56 +02:00
Andres Amaya Garcia
6ee7dad896
Allow forcing 64-bit integer type
...
Allow forcing 64-bit integer type for bignum operations. Also introduce
the macro MBEDTLS_TYPE_UDBL to allow configuration of the double length
integer in unknown compilers.
2017-07-22 11:53:56 +02:00
Andres Amaya Garcia
dd29c2f2c3
Add all.sh test to force 32-bit compilation
2017-07-22 11:53:56 +02:00
Andres Amaya Garcia
05d9535c90
Enable 64-bit compilation with ARM Compiler 6
...
This patch fixes the conditional preprocessor directives in
include/mbedtls/bignum.h to enable 64-bit compilation with ARM
Compiler 6.
2017-07-22 11:53:56 +02:00
Simon Butcher
c0da47dd1e
Fix platform setup/teardown feature and comments
...
Fixed the platform setup/teardown feature, by fixing it for doxygen and adding it
as a feature in 'version_features.c'.
2017-07-21 23:48:55 +01:00
Andres Amaya Garcia
2d0aa8be97
Fix MD selftest to use correct type and expose ret
2017-07-21 14:57:26 +01:00
Andres Amaya Garcia
aa464ef23a
Fix indentation and add goto cleanup; stmt
2017-07-21 14:27:41 +01:00
Janos Follath
745bcf454f
Fix typos
2017-07-21 14:04:31 +01:00
Simon Butcher
be4f75c12f
Add additional comments to platform setup/teardown functions
2017-07-21 02:15:14 +02:00
Simon Butcher
8d65f95901
Correct order of sections in the ChangeLog
2017-07-21 02:15:14 +02:00
Ron Eldor
e1b2f6bd33
Check return code of mbedtls_mpi_fill_random
...
Add MBEDTLS_MPI_CHK to check for error value of mbedtls_mpi_fill_random.
Reported and fix suggested by guidovranken in #740
2017-07-21 02:14:08 +02:00
Ron Eldor
45778acf85
Resource leak fix on windows platform
...
Fix a resource leak on windows platform, in mbedtls_x509_crt_parse_path,
in case a failure. when an error occurs, goto cleanup, and free the
resource, instead of returning error code immediately.
2017-07-21 02:14:07 +02:00
Ron Eldor
8c50e72a0a
Wrong preproccessor condition fix
...
Fix for issue #696
Change #if defined(MBEDTLS_THREADING_PTHREAD)
to #if defined(MBEDTLS_THREADING_C)
2017-07-21 02:14:07 +02:00
Ron Eldor
49406c8978
fix for issue 1118: check if iv is zero in gcm.
...
1) found by roberto in mbedtls forum
2) if iv_len is zero, return an error
3) add tests for invalid parameters
2017-07-21 02:14:07 +02:00
Janos Follath
1d74c41a49
Remove mutexes from ECP hardware acceleration
...
Protecting the ECP hardware acceleratior with mutexes is inconsistent with the
philosophy of the library. Pre-existing hardware accelerator interfaces
leave concurrency support to the underlying platform.
Fixes #863
2017-07-21 02:14:07 +02:00
Andres Amaya Garcia
f92e5d5dbc
Fix typo in ChangeLog and update macro name
2017-07-21 02:12:49 +02:00
Andres Amaya Garcia
9da69514ec
Rename macro SETUP_ALT to SETUP_TEARDOWN_ALT
...
Rename the macro MBEDTLS_PLATFORM_SETUP_ALT to
MBEDTLS_PLATFORM_SETUP_TEARDOWN_ALT to make the name more descriptive
as this macro enables/disables both functions.
2017-07-21 02:12:49 +02:00
Andres Amaya Garcia
9d80a36336
Improve documentation for mbedtls_platform_context
2017-07-21 02:12:49 +02:00
Andres Amaya Garcia
849811c9cc
Modify ChangeLog according to API changes
2017-07-21 02:12:49 +02:00
Andres Amaya Garcia
82d7314c43
Remove internal functions from setup API
2017-07-21 02:12:49 +02:00
Andres Amaya Garcia
ab8b624fd5
Add ChangeLog entry for platform setup and teardown
2017-07-21 02:12:49 +02:00
Andres Amaya Garcia
122d899296
Add library setup and teardown APIs
...
Add the following two functions to allow platform setup and teardown
operations for the full library to be hooked in:
* mbedtls_platform_setup()
* mbedtls_platform_teardown()
An mbedtls_platform_context C structure is also added and two internal
functions that are called by the corresponding setup and teardown
functions above:
* mbedtls_internal_platform_setup()
* mbedtls_internal_plartform_teardown()
Finally, the macro MBEDTLS_PLATFORM_SETUP_ALT is also added to allow
mbedtls_platform_context and internal function to be overriden by the
user as needed for a platform.
2017-07-21 02:11:35 +02:00
Andres Amaya Garcia
b2b063ff35
Add comment in entropy.c
2017-07-20 16:45:24 +01:00
Andres Amaya Garcia
3395250f5f
Fix use of uninitialised ret ssl_tls.c
2017-07-20 16:29:16 +01:00
Andres Amaya Garcia
42e5e1084e
Add goto cleanup; for consistency md.c
2017-07-20 16:27:03 +01:00
Andres Amaya Garcia
46f5a3e9b4
Check return codes from MD in ssl code
2017-07-20 16:17:51 +01:00
Andres Amaya Garcia
8798a10ff0
Update ChangeLog entry as ssl_tls.c needs fixing
2017-07-20 14:46:23 +01:00
Andres Amaya Garcia
c5c7d76bf5
Add goto exit; stmt in rsa.c for consistency
2017-07-20 14:42:16 +01:00
Andres Amaya Garcia
0963e6cfac
Fix possible memory leak in <MD>_ext()
2017-07-20 14:41:10 +01:00
Andres Amaya Garcia
94682d1d7d
Fix use of unitialized ret in rsa.c
2017-07-20 14:26:37 +01:00
Andres Amaya Garcia
6a3f30514a
Ensure MD self_test ret codes are not hidden
...
Also fix a potential memory leak and an incorrect goto statement in
sha1.c self_test
2017-07-20 14:18:54 +01:00
Andres Amaya Garcia
a21247ead7
Remove unwanted whitespace in MD comments
2017-07-20 14:01:08 +01:00
Simon Butcher
75c0c814e4
Update Changelog for API/ABI fixes to revert interface
2017-07-20 12:36:53 +02:00
Hanno Becker
1a28b01b5e
Make minor changes to documentation
2017-07-20 12:36:53 +02:00
Hanno Becker
489b985fae
Export mbedtls_aes_(en/de)crypt to retain for API compatibility
...
The commit f5bf7189d3
made the AES
functions mbedtls_aes_encrypt and mbedtls_aes_decrypt static, changing
the library's API.
This commit reverts this.
2017-07-20 12:36:53 +02:00