mbedtls ported to mbed-classic

Fork of mbedtls by Christopher Haster

Embed: (wiki syntax)

« Back to documentation index

platform.h File Reference

platform.h File Reference

mbed TLS Platform abstraction layer More...

Go to the source code of this file.

Functions

int mbedtls_platform_set_calloc_free (void *(*calloc_func)(size_t, size_t), void(*free_func)(void *))
 Set your own memory implementation function pointers.
int mbedtls_platform_set_fprintf (int(*fprintf_func)(FILE *stream, const char *,...))
 Set your own fprintf function pointer.
int mbedtls_platform_set_printf (int(*printf_func)(const char *,...))
 Set your own printf function pointer.
int mbedtls_platform_set_snprintf (int(*snprintf_func)(char *s, size_t n, const char *format,...))
 Set your own snprintf function pointer.
int mbedtls_platform_set_exit (void(*exit_func)(int status))
 Set your own exit function pointer.

Detailed Description

mbed TLS Platform abstraction layer

Copyright (C) 2006-2015, ARM Limited, All Rights Reserved SPDX-License-Identifier: Apache-2.0

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

This file is part of mbed TLS (https://tls.mbed.org)

Definition in file platform.h.


Function Documentation

int mbedtls_platform_set_calloc_free ( void *(*)(size_t, size_t)  calloc_func,
void(*)(void *)  free_func 
)

Set your own memory implementation function pointers.

Parameters:
calloc_functhe calloc function implementation
free_functhe free function implementation
Returns:
0 if successful

Definition at line 56 of file platform.c.

int mbedtls_platform_set_exit ( void(*)(int status)  exit_func )

Set your own exit function pointer.

Parameters:
exit_functhe exit function implementation
Returns:
0

Definition at line 186 of file platform.c.

int mbedtls_platform_set_fprintf ( int(*)(FILE *stream, const char *,...)  fprintf_func )

Set your own fprintf function pointer.

Parameters:
fprintf_functhe fprintf function implementation
Returns:
0
int mbedtls_platform_set_printf ( int(*)(const char *,...)  printf_func )

Set your own printf function pointer.

Parameters:
printf_functhe printf function implementation
Returns:
0

Definition at line 139 of file platform.c.

int mbedtls_platform_set_snprintf ( int(*)(char *s, size_t n, const char *format,...)  snprintf_func )

Set your own snprintf function pointer.

Parameters:
snprintf_functhe snprintf function implementation
Returns:
0

Definition at line 114 of file platform.c.