aboutsummaryrefslogtreecommitdiff
path: root/library/platform.c
AgeCommit message (Collapse)AuthorFilesLines
2017-12-20Fix undefined function in platform.cManuel Pégourié-Gonnard1-0/+8
The bug was introduced in 79a2e7ef069d6 and is not present in the default configuration, which let it go unnoticed so far.
2017-11-28Merge remote-tracking branch 'upstream-restricted/pr/369' into ↵Gilles Peskine1-2/+3
development-restricted
2017-07-27Rename macro SETUP_ALT to SETUP_TEARDOWN_ALTAndres Amaya Garcia1-2/+2
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-27Remove internal functions from setup APIAndres Amaya Garcia1-14/+4
2017-07-27Add library setup and teardown APIsAndres Amaya Garcia1-0/+30
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-06-26Zeroize return buf on failure in platform.cAndres Amaya Garcia1-2/+3
2016-11-10Fix various compiler warnings with MSVCSimon B1-2/+2
Fixes various compiler warnings found with Microsoft Visual Studio 2015 (and earlier versions).
2016-07-13Adds missing conditions for platform timeSimon Butcher1-0/+4
In platform.c, made the time functions dependent on the configuration MBEDTLS_HAVE_TIME to fix a build break where the functions could be built but the mbedtls_time_t was not defined.
2016-06-01Introduce platform-layer functions for reading/writing seed from NVPaul Bakker1-1/+88
Introduces mbedtls_nv_seed_read() and mbedtls_nv_seed_write(). The platform-layer functions are only available when MBEDTLS_ENTROPY_NV_SEED is enabled.
2016-04-26Fixes time() abstraction for custom configsSimon Butcher1-3/+3
Added platform abstraction of time() to ChangeLog, version features, and fixed the build for dynamic configuration.
2016-04-26Abstracts away time()/stdlib.h into platformSimonB1-0/+23
Substitutes time() into a configurable platform interface to allow it to be easily substituted.
2015-09-04Change main license to Apache 2.0Manuel Pégourié-Gonnard1-12/+11
2015-07-28Update date in copyright lineManuel Pégourié-Gonnard1-1/+1
2015-07-08Some windows environments don't have _snprint_sManuel Pégourié-Gonnard1-0/+9
Do an alternative version for them. That happens for example with our windows buildbot with mingw32-make.
2015-06-26Tune up Windows snprintf() supportManuel Pégourié-Gonnard1-0/+4
When we build with Visual Studio in debug mode, the invalid parameter handler aborts the application (and offers to debug it) when n is 0. We want to just return -1 instead (as calls with n == 0 are expected and happen in our tests).
2015-06-22Include fixed snprintf for Windows in platform.cManuel Pégourié-Gonnard1-0/+15
Use _WIN32 to detect it rather that _MSC_VER as it turns out MSYS2 uses the broken MS version by default too.
2015-06-03Merge branch 'mbedtls-1.3' into developmentManuel Pégourié-Gonnard1-3/+2
* mbedtls-1.3: Fix compile errors with NO_STD_FUNCTIONS Expand config.pl's notion of "full" Ack external bugfix in Changelog FIx misplaced Changelog entry (oops) Fix compile bug: incompatible declaration of polarssl_exit in platform.c Fix contributor's name in Changelog
2015-06-03Fix compile errors with NO_STD_FUNCTIONSManuel Pégourié-Gonnard1-2/+1
2015-06-02Fix compile bug: incompatible declaration of polarssl_exit in platform.cptahpeteh1-1/+1
This causes a compile-time error: platform.c(157): error: #147: declaration is incompatible with "void (*polarssl_exit)(int)" (declared at line 179 of "platform.h")
2015-05-27Adapt the platform layer from malloc to callocManuel Pégourié-Gonnard1-8/+9
2015-04-08The Great RenamingManuel Pégourié-Gonnard1-51/+51
A simple execution of tmp/invoke-rename.pl
2015-04-03Fix bug in POLARSSL_PLATFORM_STD_EXIT supportManuel Pégourié-Gonnard1-4/+4
2015-04-03Fix bug in POLARSSL_PLATFORM_STD_EXIT supportManuel Pégourié-Gonnard1-4/+4
2015-03-10Rename include directory to mbedtlsManuel Pégourié-Gonnard1-2/+2
2015-03-06Rename website and repositoryManuel Pégourié-Gonnard1-1/+1
2015-02-13add POLARSSL_PLATFORM_EXIT_ALTRich Evans1-0/+23
2015-02-13add platform_set_snprintfRich Evans1-0/+30
2015-01-28Fix url againManuel Pégourié-Gonnard1-1/+1
2015-01-23Fix website url to use https.Manuel Pégourié-Gonnard1-1/+1
2015-01-23Remove maintainer line.Manuel Pégourié-Gonnard1-1/+0
2015-01-23Remove redundant "all rights reserved"Manuel Pégourié-Gonnard1-2/+0
2015-01-23Update copyrightManuel Pégourié-Gonnard1-1/+1
2015-01-22Change name to mbed TLS in the copyright noticeManuel Pégourié-Gonnard1-1/+1
2014-04-30Adapt sources to configurable config.h nameManuel Pégourié-Gonnard1-0/+4
2014-04-25Typo in POLARSSL_PLATFORM_STD_FPRINTF in platform.cPaul Bakker1-1/+1
2014-04-02Fix default #define for malloc/freeManuel Pégourié-Gonnard1-2/+2
2014-02-06Migrated the Memory layer to the Platform layerPaul Bakker1-0/+32
Deprecated POLARSSL_MEMORY_C and placed placeholder for memory.h to make sure current code will not break on new version.
2014-02-06Platform abstraction layer for memory, printf and fprintfPaul Bakker1-0/+80