File tree Expand file tree Collapse file tree 3 files changed +21
-1
lines changed
test/coap-service/unittest/stub Expand file tree Collapse file tree 3 files changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -102,6 +102,11 @@ static int coap_security_handler_init(coap_security_t *sec)
102
102
const int entropy_source_type = MBEDTLS_ENTROPY_SOURCE_WEAK ;
103
103
#endif
104
104
105
+ #if defined(MBEDTLS_PLATFORM_C )
106
+ if (mbedtls_platform_setup (NULL ) != 0 )
107
+ return -1 ;
108
+ #endif /* MBEDTLS_PLATFORM_C */
109
+
105
110
mbedtls_ssl_init (& sec -> _ssl );
106
111
mbedtls_ssl_config_init (& sec -> _conf );
107
112
mbedtls_ctr_drbg_init (& sec -> _ctr_drbg );
@@ -153,6 +158,9 @@ static void coap_security_handler_reset(coap_security_t *sec)
153
158
mbedtls_ctr_drbg_free (& sec -> _ctr_drbg );
154
159
mbedtls_ssl_config_free (& sec -> _conf );
155
160
mbedtls_ssl_free (& sec -> _ssl );
161
+ #if defined(MBEDTLS_PLATFORM_C )
162
+ mbedtls_platform_teardown (NULL );
163
+ #endif /* MBEDTLS_PLATFORM_C */
156
164
}
157
165
158
166
Original file line number Diff line number Diff line change @@ -387,3 +387,15 @@ int mbedtls_ssl_session_reset(mbedtls_ssl_context *ssl)
387
387
void mbedtls_strerror (int ret , char * buf , size_t buflen )
388
388
{
389
389
}
390
+
391
+ int mbedtls_platform_setup ( mbedtls_platform_context * ctx )
392
+ {
393
+ (void )ctx ;
394
+
395
+ return ( 0 );
396
+ }
397
+
398
+ void mbedtls_platform_teardown ( mbedtls_platform_context * ctx )
399
+ {
400
+ (void )ctx ;
401
+ }
Original file line number Diff line number Diff line change 28
28
#include "mbedtls/sha256.h"
29
29
#include "mbedtls/entropy.h"
30
30
#include "mbedtls/pk.h"
31
-
31
+ #include "mbedtls/platform.h"
32
32
33
33
34
34
#define HANDSHAKE_FINISHED_VALUE 8888
You can’t perform that action at this time.
0 commit comments