Demo using MBED TLS

Dependencies:   EthernetInterface NTPClient iothub_amqp_transport iothub_client mbed-rtos mbed

Fork of iothub_client_sample_amqp by Azure IoT

Committer:
markrad
Date:
Thu Jan 05 00:20:03 2017 +0000
Revision:
58:f50b97b08851
Sample using MBED TLS

Who changed what in which revision?

UserRevisionLine numberNew contents of line
markrad 58:f50b97b08851 1 // Copyright (c) Microsoft. All rights reserved.
markrad 58:f50b97b08851 2 // Licensed under the MIT license. See LICENSE file in the project root for full license information.
markrad 58:f50b97b08851 3
markrad 58:f50b97b08851 4 /*depending if the symbol GB_TIME_INTERCEPT is defined, this file does the following
markrad 58:f50b97b08851 5
markrad 58:f50b97b08851 6 a) if GB_TIME_INTERCEPT is NOT defined, then the file shall be empty (almost:)
markrad 58:f50b97b08851 7 b) if GB_TIME_INTERCEPT is defined, then the file shall call to the 'real' time.h functions from their gb_* synonyms*/
markrad 58:f50b97b08851 8
markrad 58:f50b97b08851 9 static const int avoid_a_warning_C4206 = 0; /* warning C4206: nonstandard extension used: translation unit is empty*/
markrad 58:f50b97b08851 10
markrad 58:f50b97b08851 11 #ifdef GB_TIME_INTERCEPT
markrad 58:f50b97b08851 12
markrad 58:f50b97b08851 13 #ifdef __cplusplus
markrad 58:f50b97b08851 14 #include <ctime>
markrad 58:f50b97b08851 15 #else
markrad 58:f50b97b08851 16 #include <time.h>
markrad 58:f50b97b08851 17 #endif
markrad 58:f50b97b08851 18
markrad 58:f50b97b08851 19 #include "azure_c_shared_utility/gb_time.h"
markrad 58:f50b97b08851 20
markrad 58:f50b97b08851 21 /*this is time*/
markrad 58:f50b97b08851 22 time_t gb_time(time_t *timer);
markrad 58:f50b97b08851 23 {
markrad 58:f50b97b08851 24 return time(timer);
markrad 58:f50b97b08851 25 }
markrad 58:f50b97b08851 26
markrad 58:f50b97b08851 27 /*this is localtime*/
markrad 58:f50b97b08851 28 struct tm *gb_localtime(const time_t *timer)
markrad 58:f50b97b08851 29 {
markrad 58:f50b97b08851 30 return gb_localtime(timer);
markrad 58:f50b97b08851 31 }
markrad 58:f50b97b08851 32
markrad 58:f50b97b08851 33 size_t gb_strftime(char * s, size_t maxsize, const char * format, const struct tm * timeptr)
markrad 58:f50b97b08851 34 {
markrad 58:f50b97b08851 35 return strftime(s, maxsize, format, timeptr);
markrad 58:f50b97b08851 36 }
markrad 58:f50b97b08851 37
markrad 58:f50b97b08851 38 #endif