Add MBEDTLS_PRIVATE wrapping to sample programs.

Signed-off-by: Mateusz Starzyk <mateusz.starzyk@mobica.com>
This commit is contained in:
Mateusz Starzyk 2021-05-19 19:35:35 +02:00
parent 6c2e9b6048
commit 5dd4f6e9ce
22 changed files with 91 additions and 76 deletions

View file

@ -17,6 +17,8 @@
* limitations under the License.
*/
#define MBEDTLS_ALLOW_PRIVATE_ACCESS
#if !defined(MBEDTLS_CONFIG_FILE)
#include "mbedtls/config.h"
#else

View file

@ -17,6 +17,8 @@
* limitations under the License.
*/
#define MBEDTLS_ALLOW_PRIVATE_ACCESS
#if !defined(MBEDTLS_CONFIG_FILE)
#include "mbedtls/config.h"
#else

View file

@ -18,6 +18,8 @@
* limitations under the License.
*/
#define MBEDTLS_ALLOW_PRIVATE_ACCESS
#if !defined(MBEDTLS_CONFIG_FILE)
#include "mbedtls/config.h"
#else

View file

@ -17,6 +17,8 @@
* limitations under the License.
*/
#define MBEDTLS_ALLOW_PRIVATE_ACCESS
#if !defined(MBEDTLS_CONFIG_FILE)
#include "mbedtls/config.h"
#else

View file

@ -17,6 +17,8 @@
* limitations under the License.
*/
#define MBEDTLS_ALLOW_PRIVATE_ACCESS
#if !defined(MBEDTLS_CONFIG_FILE)
#include "mbedtls/config.h"
#else

View file

@ -20,6 +20,9 @@
/* Enable definition of gethostname() even when compiling with -std=c99. Must
* be set before config.h, which pulls in glibc's features.h indirectly.
* Harmless on other platforms. */
#define MBEDTLS_ALLOW_PRIVATE_ACCESS
#define _POSIX_C_SOURCE 200112L
#define _XOPEN_SOURCE 600

View file

@ -17,6 +17,8 @@
* limitations under the License.
*/
#define MBEDTLS_ALLOW_PRIVATE_ACCESS
#if !defined(MBEDTLS_CONFIG_FILE)
#include "mbedtls/config.h"
#else

View file

@ -805,7 +805,7 @@ int sni_callback( void *p_info, mbedtls_ssl_context *ssl,
return( mbedtls_ssl_set_hs_own_cert( ssl, cur->cert, cur->key ) );
}
cur = cur->next;
cur = cur->MBEDTLS_PRIVATE(next);
}
return( -1 );
@ -921,7 +921,7 @@ int psk_callback( void *p_info, mbedtls_ssl_context *ssl,
return( mbedtls_ssl_set_hs_psk( ssl, cur->key, cur->key_len ) );
}
cur = cur->next;
cur = cur->MBEDTLS_PRIVATE(next);
}
return( -1 );