mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-12-23 05:45:27 +00:00
Add handlers for parameter validation in the sample programs
The sample programs require an additional handler function of mbedtls_param_failed() to handle any failed parameter validation checks enabled by the MBEDTLS_CHECK_PARAMS config.h option.
This commit is contained in:
parent
a646345e3f
commit
63cb97e562
|
@ -78,6 +78,16 @@ int main( void )
|
|||
return( 0 );
|
||||
}
|
||||
#else
|
||||
|
||||
#if defined( MBEDTLS_CHECK_PARAMS ) && defined(MBEDTLS_PLATFORM_C)
|
||||
void mbedtls_param_failed( char* failure_condition, char* file, int line )
|
||||
{
|
||||
mbedtls_printf("%s:%i: Input param failed - %s\n", file, line,
|
||||
failure_condition );
|
||||
mbedtls_exit( MBEDTLS_EXIT_FAILURE );
|
||||
}
|
||||
#endif
|
||||
|
||||
int main( int argc, char *argv[] )
|
||||
{
|
||||
int ret = 0;
|
||||
|
@ -109,6 +119,7 @@ int main( int argc, char *argv[] )
|
|||
off_t filesize, offset;
|
||||
#endif
|
||||
|
||||
mbedtls_aes_init( NULL );
|
||||
mbedtls_aes_init( &aes_ctx );
|
||||
mbedtls_md_init( &sha_ctx );
|
||||
|
||||
|
|
|
@ -80,6 +80,16 @@ int main( void )
|
|||
return( 0 );
|
||||
}
|
||||
#else
|
||||
|
||||
#if defined( MBEDTLS_CHECK_PARAMS ) && defined(MBEDTLS_PLATFORM_C)
|
||||
void mbedtls_param_failed( char* failure_condition, char* file, int line )
|
||||
{
|
||||
mbedtls_printf("%s:%i: Input param failed - %s\n", file, line,
|
||||
failure_condition );
|
||||
mbedtls_exit( MBEDTLS_EXIT_FAILURE );
|
||||
}
|
||||
#endif
|
||||
|
||||
int main( int argc, char *argv[] )
|
||||
{
|
||||
int ret = 1, i, n;
|
||||
|
|
|
@ -70,6 +70,15 @@ int main( void )
|
|||
return( 0 );
|
||||
}
|
||||
#else
|
||||
|
||||
#if defined( MBEDTLS_CHECK_PARAMS ) && defined(MBEDTLS_PLATFORM_C)
|
||||
void mbedtls_param_failed( char* failure_condition, char* file, int line )
|
||||
{
|
||||
mbedtls_printf("%s:%i: Input param failed - %sn", file, line, failure_condition );
|
||||
mbedtls_exit( MBEDTLS_EXIT_FAILURE );
|
||||
}
|
||||
#endif
|
||||
|
||||
int main( void )
|
||||
{
|
||||
FILE *f;
|
||||
|
|
|
@ -68,6 +68,14 @@ int main( void )
|
|||
*/
|
||||
#define GENERATOR "4"
|
||||
|
||||
#if defined( MBEDTLS_CHECK_PARAMS ) && defined(MBEDTLS_PLATFORM_C)
|
||||
void mbedtls_param_failed( char* failure_condition, char* file, int line )
|
||||
{
|
||||
mbedtls_printf("%s:%i: Input param failed - %sn", file, line, failure_condition );
|
||||
mbedtls_exit( MBEDTLS_EXIT_FAILURE );
|
||||
}
|
||||
#endif
|
||||
|
||||
int main( int argc, char **argv )
|
||||
{
|
||||
int ret = 1;
|
||||
|
|
|
@ -70,6 +70,15 @@ int main( void )
|
|||
return( 0 );
|
||||
}
|
||||
#else
|
||||
|
||||
#if defined( MBEDTLS_CHECK_PARAMS ) && defined(MBEDTLS_PLATFORM_C)
|
||||
void mbedtls_param_failed( char* failure_condition, char* file, int line )
|
||||
{
|
||||
mbedtls_printf("%s:%i: Input param failed - %sn", file, line, failure_condition );
|
||||
mbedtls_exit( MBEDTLS_EXIT_FAILURE );
|
||||
}
|
||||
#endif
|
||||
|
||||
int main( void )
|
||||
{
|
||||
FILE *f;
|
||||
|
|
|
@ -52,6 +52,14 @@ int main( void )
|
|||
#include "mbedtls/ctr_drbg.h"
|
||||
#include "mbedtls/ecdh.h"
|
||||
|
||||
#if defined( MBEDTLS_CHECK_PARAMS ) && defined(MBEDTLS_PLATFORM_C)
|
||||
void mbedtls_param_failed( char* failure_condition, char* file, int line )
|
||||
{
|
||||
mbedtls_printf("%s:%i: Input param failed - %sn", file, line, failure_condition );
|
||||
mbedtls_exit( MBEDTLS_EXIT_FAILURE );
|
||||
}
|
||||
#endif
|
||||
|
||||
int main( int argc, char *argv[] )
|
||||
{
|
||||
int ret = 1;
|
||||
|
|
|
@ -99,6 +99,14 @@ static void dump_pubkey( const char *title, mbedtls_ecdsa_context *key )
|
|||
#define dump_pubkey( a, b )
|
||||
#endif
|
||||
|
||||
#if defined( MBEDTLS_CHECK_PARAMS ) && defined(MBEDTLS_PLATFORM_C)
|
||||
void mbedtls_param_failed( char* failure_condition, char* file, int line )
|
||||
{
|
||||
mbedtls_printf("%s:%i: Input param failed - %sn", file, line, failure_condition );
|
||||
mbedtls_exit( MBEDTLS_EXIT_FAILURE );
|
||||
}
|
||||
#endif
|
||||
|
||||
int main( int argc, char *argv[] )
|
||||
{
|
||||
int ret = 1;
|
||||
|
|
|
@ -135,6 +135,15 @@ int main( void )
|
|||
return( 0 );
|
||||
}
|
||||
#else
|
||||
|
||||
#if defined( MBEDTLS_CHECK_PARAMS ) && defined(MBEDTLS_PLATFORM_C)
|
||||
void mbedtls_param_failed( char* failure_condition, char* file, int line )
|
||||
{
|
||||
mbedtls_printf("%s:%i: Input param failed - %sn", file, line, failure_condition );
|
||||
mbedtls_exit( MBEDTLS_EXIT_FAILURE );
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* global options
|
||||
*/
|
||||
|
|
|
@ -73,6 +73,15 @@ int main( void )
|
|||
return( 0 );
|
||||
}
|
||||
#else
|
||||
|
||||
#if defined( MBEDTLS_CHECK_PARAMS ) && defined(MBEDTLS_PLATFORM_C)
|
||||
void mbedtls_param_failed( char* failure_condition, char* file, int line )
|
||||
{
|
||||
mbedtls_printf("%s:%i: Input param failed - %sn", file, line, failure_condition );
|
||||
mbedtls_exit( MBEDTLS_EXIT_FAILURE );
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* global options
|
||||
*/
|
||||
|
|
|
@ -96,6 +96,15 @@ int main( void )
|
|||
return( 0 );
|
||||
}
|
||||
#else
|
||||
|
||||
#if defined( MBEDTLS_CHECK_PARAMS ) && defined(MBEDTLS_PLATFORM_C)
|
||||
void mbedtls_param_failed( char* failure_condition, char* file, int line )
|
||||
{
|
||||
mbedtls_printf("%s:%i: Input param failed - %sn", file, line, failure_condition );
|
||||
mbedtls_exit( MBEDTLS_EXIT_FAILURE );
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* global options
|
||||
*/
|
||||
|
|
|
@ -59,6 +59,15 @@ int main( void )
|
|||
return( 0 );
|
||||
}
|
||||
#else
|
||||
|
||||
#if defined( MBEDTLS_CHECK_PARAMS ) && defined(MBEDTLS_PLATFORM_C)
|
||||
void mbedtls_param_failed( char* failure_condition, char* file, int line )
|
||||
{
|
||||
mbedtls_printf("%s:%i: Input param failed - %sn", file, line, failure_condition );
|
||||
mbedtls_exit( MBEDTLS_EXIT_FAILURE );
|
||||
}
|
||||
#endif
|
||||
|
||||
int main( int argc, char *argv[] )
|
||||
{
|
||||
FILE *f;
|
||||
|
|
|
@ -59,6 +59,15 @@ int main( void )
|
|||
return( 0 );
|
||||
}
|
||||
#else
|
||||
|
||||
#if defined( MBEDTLS_CHECK_PARAMS ) && defined(MBEDTLS_PLATFORM_C)
|
||||
void mbedtls_param_failed( char* failure_condition, char* file, int line )
|
||||
{
|
||||
mbedtls_printf("%s:%i: Input param failed - %sn", file, line, failure_condition );
|
||||
mbedtls_exit( MBEDTLS_EXIT_FAILURE );
|
||||
}
|
||||
#endif
|
||||
|
||||
int main( int argc, char *argv[] )
|
||||
{
|
||||
FILE *f;
|
||||
|
|
|
@ -59,6 +59,14 @@ int main( void )
|
|||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#if defined( MBEDTLS_CHECK_PARAMS ) && defined(MBEDTLS_PLATFORM_C)
|
||||
void mbedtls_param_failed( char* failure_condition, char* file, int line )
|
||||
{
|
||||
mbedtls_printf("%s:%i: Input param failed - %sn", file, line, failure_condition );
|
||||
mbedtls_exit( MBEDTLS_EXIT_FAILURE );
|
||||
}
|
||||
#endif
|
||||
|
||||
int main( int argc, char *argv[] )
|
||||
{
|
||||
FILE *f;
|
||||
|
|
|
@ -55,6 +55,14 @@ int main( void )
|
|||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#if defined( MBEDTLS_CHECK_PARAMS ) && defined(MBEDTLS_PLATFORM_C)
|
||||
void mbedtls_param_failed( char* failure_condition, char* file, int line )
|
||||
{
|
||||
mbedtls_printf("%s:%i: Input param failed - %sn", file, line, failure_condition );
|
||||
mbedtls_exit( MBEDTLS_EXIT_FAILURE );
|
||||
}
|
||||
#endif
|
||||
|
||||
int main( int argc, char *argv[] )
|
||||
{
|
||||
FILE *f;
|
||||
|
|
|
@ -58,6 +58,15 @@ int main( void )
|
|||
return( 0 );
|
||||
}
|
||||
#else
|
||||
|
||||
#if defined( MBEDTLS_CHECK_PARAMS ) && defined(MBEDTLS_PLATFORM_C)
|
||||
void mbedtls_param_failed( char* failure_condition, char* file, int line )
|
||||
{
|
||||
mbedtls_printf("%s:%i: Input param failed - %sn", file, line, failure_condition );
|
||||
mbedtls_exit( MBEDTLS_EXIT_FAILURE );
|
||||
}
|
||||
#endif
|
||||
|
||||
int main( int argc, char *argv[] )
|
||||
{
|
||||
FILE *f;
|
||||
|
|
|
@ -58,6 +58,15 @@ int main( void )
|
|||
return( 0 );
|
||||
}
|
||||
#else
|
||||
|
||||
#if defined( MBEDTLS_CHECK_PARAMS ) && defined(MBEDTLS_PLATFORM_C)
|
||||
void mbedtls_param_failed( char* failure_condition, char* file, int line )
|
||||
{
|
||||
mbedtls_printf("%s:%i: Input param failed - %sn", file, line, failure_condition );
|
||||
mbedtls_exit( MBEDTLS_EXIT_FAILURE );
|
||||
}
|
||||
#endif
|
||||
|
||||
int main( int argc, char *argv[] )
|
||||
{
|
||||
FILE *f;
|
||||
|
|
|
@ -62,6 +62,15 @@ int main( void )
|
|||
return( 0 );
|
||||
}
|
||||
#else
|
||||
|
||||
#if defined( MBEDTLS_CHECK_PARAMS ) && defined(MBEDTLS_PLATFORM_C)
|
||||
void mbedtls_param_failed( char* failure_condition, char* file, int line )
|
||||
{
|
||||
mbedtls_printf("%s:%i: Input param failed - %sn", file, line, failure_condition );
|
||||
mbedtls_exit( MBEDTLS_EXIT_FAILURE );
|
||||
}
|
||||
#endif
|
||||
|
||||
int main( void )
|
||||
{
|
||||
int ret = 1;
|
||||
|
|
|
@ -60,6 +60,14 @@ int main( void )
|
|||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#if defined( MBEDTLS_CHECK_PARAMS ) && defined(MBEDTLS_PLATFORM_C)
|
||||
void mbedtls_param_failed( char* failure_condition, char* file, int line )
|
||||
{
|
||||
mbedtls_printf("%s:%i: Input param failed - %sn", file, line, failure_condition );
|
||||
mbedtls_exit( MBEDTLS_EXIT_FAILURE );
|
||||
}
|
||||
#endif
|
||||
|
||||
int main( int argc, char *argv[] )
|
||||
{
|
||||
FILE *f;
|
||||
|
|
|
@ -59,6 +59,14 @@ int main( void )
|
|||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#if defined( MBEDTLS_CHECK_PARAMS ) && defined(MBEDTLS_PLATFORM_C)
|
||||
void mbedtls_param_failed( char* failure_condition, char* file, int line )
|
||||
{
|
||||
mbedtls_printf("%s:%i: Input param failed - %sn", file, line, failure_condition );
|
||||
mbedtls_exit( MBEDTLS_EXIT_FAILURE );
|
||||
}
|
||||
#endif
|
||||
|
||||
int main( int argc, char *argv[] )
|
||||
{
|
||||
FILE *f;
|
||||
|
|
|
@ -52,6 +52,15 @@ int main( void )
|
|||
return( 0 );
|
||||
}
|
||||
#else
|
||||
|
||||
#if defined( MBEDTLS_CHECK_PARAMS ) && defined(MBEDTLS_PLATFORM_C)
|
||||
void mbedtls_param_failed( char* failure_condition, char* file, int line )
|
||||
{
|
||||
mbedtls_printf("%s:%i: Input param failed - %sn", file, line, failure_condition );
|
||||
mbedtls_exit( MBEDTLS_EXIT_FAILURE );
|
||||
}
|
||||
#endif
|
||||
|
||||
int main( int argc, char *argv[] )
|
||||
{
|
||||
FILE *f;
|
||||
|
|
|
@ -79,6 +79,14 @@ int main( void )
|
|||
|
||||
#define DEBUG_LEVEL 0
|
||||
|
||||
#if defined( MBEDTLS_CHECK_PARAMS ) && defined(MBEDTLS_PLATFORM_C)
|
||||
void mbedtls_param_failed( char* failure_condition, char* file, int line )
|
||||
{
|
||||
mbedtls_printf("%s:%i: Input param failed - %sn", file, line, failure_condition );
|
||||
mbedtls_exit( MBEDTLS_EXIT_FAILURE );
|
||||
}
|
||||
#endif
|
||||
|
||||
static void my_debug( void *ctx, int level,
|
||||
const char *file, int line,
|
||||
const char *str )
|
||||
|
|
|
@ -88,6 +88,14 @@ int main( void )
|
|||
#define READ_TIMEOUT_MS 10000 /* 5 seconds */
|
||||
#define DEBUG_LEVEL 0
|
||||
|
||||
#if defined( MBEDTLS_CHECK_PARAMS ) && defined(MBEDTLS_PLATFORM_C)
|
||||
void mbedtls_param_failed( char* failure_condition, char* file, int line )
|
||||
{
|
||||
mbedtls_printf("%s:%i: Input param failed - %sn", file, line, failure_condition );
|
||||
mbedtls_exit( MBEDTLS_EXIT_FAILURE );
|
||||
}
|
||||
#endif
|
||||
|
||||
static void my_debug( void *ctx, int level,
|
||||
const char *file, int line,
|
||||
const char *str )
|
||||
|
|
|
@ -168,6 +168,14 @@ enum exit_codes
|
|||
ssl_write_failed,
|
||||
};
|
||||
|
||||
#if defined( MBEDTLS_CHECK_PARAMS ) && defined(MBEDTLS_PLATFORM_C)
|
||||
void mbedtls_param_failed( char* failure_condition, char* file, int line )
|
||||
{
|
||||
mbedtls_printf("%s:%i: Input param failed - %sn", file, line, failure_condition );
|
||||
mbedtls_exit( MBEDTLS_EXIT_FAILURE );
|
||||
}
|
||||
#endif
|
||||
|
||||
int main( void )
|
||||
{
|
||||
int ret = exit_ok;
|
||||
|
|
|
@ -70,6 +70,14 @@ int main( void )
|
|||
|
||||
#define DEBUG_LEVEL 1
|
||||
|
||||
#if defined( MBEDTLS_CHECK_PARAMS ) && defined(MBEDTLS_PLATFORM_C)
|
||||
void mbedtls_param_failed( char* failure_condition, char* file, int line )
|
||||
{
|
||||
mbedtls_printf("%s:%i: Input param failed - %sn", file, line, failure_condition );
|
||||
mbedtls_exit( MBEDTLS_EXIT_FAILURE );
|
||||
}
|
||||
#endif
|
||||
|
||||
static void my_debug( void *ctx, int level,
|
||||
const char *file, int line,
|
||||
const char *str )
|
||||
|
|
|
@ -314,6 +314,14 @@ int main( void )
|
|||
#define ALPN_LIST_SIZE 10
|
||||
#define CURVE_LIST_SIZE 20
|
||||
|
||||
#if defined( MBEDTLS_CHECK_PARAMS ) && defined(MBEDTLS_PLATFORM_C)
|
||||
void mbedtls_param_failed( char* failure_condition, char* file, int line )
|
||||
{
|
||||
mbedtls_printf("%s:%i: Input param failed - %sn", file, line, failure_condition );
|
||||
mbedtls_exit( MBEDTLS_EXIT_FAILURE );
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* global options
|
||||
*/
|
||||
|
|
|
@ -86,6 +86,14 @@ int main( void )
|
|||
|
||||
#define DEBUG_LEVEL 0
|
||||
|
||||
#if defined( MBEDTLS_CHECK_PARAMS ) && defined(MBEDTLS_PLATFORM_C)
|
||||
void mbedtls_param_failed( char* failure_condition, char* file, int line )
|
||||
{
|
||||
mbedtls_printf("%s:%i: Input param failed - %sn", file, line, failure_condition );
|
||||
mbedtls_exit( MBEDTLS_EXIT_FAILURE );
|
||||
}
|
||||
#endif
|
||||
|
||||
static void my_debug( void *ctx, int level,
|
||||
const char *file, int line,
|
||||
const char *str )
|
||||
|
|
|
@ -141,6 +141,14 @@ int main( void )
|
|||
" force_ciphersuite=<name> default: all enabled\n"\
|
||||
" acceptable ciphersuite names:\n"
|
||||
|
||||
#if defined( MBEDTLS_CHECK_PARAMS ) && defined(MBEDTLS_PLATFORM_C)
|
||||
void mbedtls_param_failed( char* failure_condition, char* file, int line )
|
||||
{
|
||||
mbedtls_printf("%s:%i: Input param failed - %sn", file, line, failure_condition );
|
||||
mbedtls_exit( MBEDTLS_EXIT_FAILURE );
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* global options
|
||||
*/
|
||||
|
|
|
@ -80,6 +80,14 @@ int main( void )
|
|||
|
||||
#define DEBUG_LEVEL 0
|
||||
|
||||
#if defined( MBEDTLS_CHECK_PARAMS ) && defined(MBEDTLS_PLATFORM_C)
|
||||
void mbedtls_param_failed( char* failure_condition, char* file, int line )
|
||||
{
|
||||
mbedtls_printf("%s:%i: Input param failed - %sn", file, line, failure_condition );
|
||||
mbedtls_exit( MBEDTLS_EXIT_FAILURE );
|
||||
}
|
||||
#endif
|
||||
|
||||
static void my_debug( void *ctx, int level,
|
||||
const char *file, int line,
|
||||
const char *str )
|
||||
|
|
|
@ -426,6 +426,14 @@ int main( void )
|
|||
(out_be)[(i) + 7] = (unsigned char)( ( (in_le) >> 0 ) & 0xFF ); \
|
||||
}
|
||||
|
||||
#if defined( MBEDTLS_CHECK_PARAMS ) && defined(MBEDTLS_PLATFORM_C)
|
||||
void mbedtls_param_failed( char* failure_condition, char* file, int line )
|
||||
{
|
||||
mbedtls_printf("%s:%i: Input param failed - %sn", file, line, failure_condition );
|
||||
mbedtls_exit( MBEDTLS_EXIT_FAILURE );
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* global options
|
||||
*/
|
||||
|
|
|
@ -254,6 +254,14 @@ typedef struct {
|
|||
rsa, dhm, ecdsa, ecdh;
|
||||
} todo_list;
|
||||
|
||||
#if defined( MBEDTLS_CHECK_PARAMS ) && defined(MBEDTLS_PLATFORM_C)
|
||||
void mbedtls_param_failed( char* failure_condition, char* file, int line )
|
||||
{
|
||||
mbedtls_printf("%s:%i: Input param failed - %sn", file, line, failure_condition );
|
||||
mbedtls_exit( MBEDTLS_EXIT_FAILURE );
|
||||
}
|
||||
#endif
|
||||
|
||||
int main( int argc, char *argv[] )
|
||||
{
|
||||
int i;
|
||||
|
|
|
@ -77,6 +77,14 @@
|
|||
#include "mbedtls/memory_buffer_alloc.h"
|
||||
#endif
|
||||
|
||||
#if defined( MBEDTLS_CHECK_PARAMS ) && defined(MBEDTLS_PLATFORM_C)
|
||||
void mbedtls_param_failed( char* failure_condition, char* file, int line )
|
||||
{
|
||||
mbedtls_printf("%s:%i: Input param failed - %sn", file, line, failure_condition );
|
||||
mbedtls_exit( MBEDTLS_EXIT_FAILURE );
|
||||
}
|
||||
#endif
|
||||
|
||||
static int test_snprintf( size_t n, const char ref_buf[10], int ref_ret )
|
||||
{
|
||||
int ret;
|
||||
|
|
|
@ -81,6 +81,14 @@ const char *client_private_keys[MAX_CLIENT_CERTS] =
|
|||
"cert_digest.key"
|
||||
};
|
||||
|
||||
#if defined( MBEDTLS_CHECK_PARAMS ) && defined(MBEDTLS_PLATFORM_C)
|
||||
void mbedtls_param_failed( char* failure_condition, char* file, int line )
|
||||
{
|
||||
mbedtls_printf("%s:%i: Input param failed - %sn", file, line, failure_condition );
|
||||
mbedtls_exit( MBEDTLS_EXIT_FAILURE );
|
||||
}
|
||||
#endif
|
||||
|
||||
int main( void )
|
||||
{
|
||||
int ret = 1, i;
|
||||
|
|
|
@ -99,6 +99,14 @@ int main( void )
|
|||
" permissive=%%d default: 0 (disabled)\n" \
|
||||
"\n"
|
||||
|
||||
#if defined( MBEDTLS_CHECK_PARAMS ) && defined(MBEDTLS_PLATFORM_C)
|
||||
void mbedtls_param_failed( char* failure_condition, char* file, int line )
|
||||
{
|
||||
mbedtls_printf("%s:%i: Input param failed - %sn", file, line, failure_condition );
|
||||
mbedtls_exit( MBEDTLS_EXIT_FAILURE );
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* global options
|
||||
*/
|
||||
|
|
|
@ -100,6 +100,14 @@ int main( void )
|
|||
" SHA384, SHA512\n" \
|
||||
"\n"
|
||||
|
||||
#if defined( MBEDTLS_CHECK_PARAMS ) && defined(MBEDTLS_PLATFORM_C)
|
||||
void mbedtls_param_failed( char* failure_condition, char* file, int line )
|
||||
{
|
||||
mbedtls_printf("%s:%i: Input param failed - %sn", file, line, failure_condition );
|
||||
mbedtls_exit( MBEDTLS_EXIT_FAILURE );
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* global options
|
||||
*/
|
||||
|
|
|
@ -153,6 +153,14 @@ int main( void )
|
|||
" object_signing_ca\n" \
|
||||
"\n"
|
||||
|
||||
#if defined( MBEDTLS_CHECK_PARAMS ) && defined(MBEDTLS_PLATFORM_C)
|
||||
void mbedtls_param_failed( char* failure_condition, char* file, int line )
|
||||
{
|
||||
mbedtls_printf("%s:%i: Input param failed - %sn", file, line, failure_condition );
|
||||
mbedtls_exit( MBEDTLS_EXIT_FAILURE );
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* global options
|
||||
*/
|
||||
|
|
|
@ -60,6 +60,14 @@ int main( void )
|
|||
" filename=%%s default: crl.pem\n" \
|
||||
"\n"
|
||||
|
||||
#if defined( MBEDTLS_CHECK_PARAMS ) && defined(MBEDTLS_PLATFORM_C)
|
||||
void mbedtls_param_failed( char* failure_condition, char* file, int line )
|
||||
{
|
||||
mbedtls_printf("%s:%i: Input param failed - %sn", file, line, failure_condition );
|
||||
mbedtls_exit( MBEDTLS_EXIT_FAILURE );
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* global options
|
||||
*/
|
||||
|
|
|
@ -60,6 +60,14 @@ int main( void )
|
|||
" filename=%%s default: cert.req\n" \
|
||||
"\n"
|
||||
|
||||
#if defined( MBEDTLS_CHECK_PARAMS ) && defined(MBEDTLS_PLATFORM_C)
|
||||
void mbedtls_param_failed( char* failure_condition, char* file, int line )
|
||||
{
|
||||
mbedtls_printf("%s:%i: Input param failed - %sn", file, line, failure_condition );
|
||||
mbedtls_exit( MBEDTLS_EXIT_FAILURE );
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* global options
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue