mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-04-18 23:42:32 +00:00
Fixed warnings in case application dependencies are not met
This commit is contained in:
parent
2292d1fad0
commit
9a97c5d894
@ -39,21 +39,6 @@
|
|||||||
#include "polarssl/error.h"
|
#include "polarssl/error.h"
|
||||||
#include "polarssl/certs.h"
|
#include "polarssl/certs.h"
|
||||||
|
|
||||||
#define SERVER_PORT 4433
|
|
||||||
#define SERVER_NAME "localhost"
|
|
||||||
#define GET_REQUEST "GET / HTTP/1.0\r\n\r\n"
|
|
||||||
|
|
||||||
#define DEBUG_LEVEL 1
|
|
||||||
|
|
||||||
static void my_debug( void *ctx, int level, const char *str )
|
|
||||||
{
|
|
||||||
if( level < DEBUG_LEVEL )
|
|
||||||
{
|
|
||||||
fprintf( (FILE *) ctx, "%s", str );
|
|
||||||
fflush( (FILE *) ctx );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#if !defined(POLARSSL_BIGNUM_C) || !defined(POLARSSL_ENTROPY_C) || \
|
#if !defined(POLARSSL_BIGNUM_C) || !defined(POLARSSL_ENTROPY_C) || \
|
||||||
!defined(POLARSSL_SSL_TLS_C) || !defined(POLARSSL_SSL_CLI_C) || \
|
!defined(POLARSSL_SSL_TLS_C) || !defined(POLARSSL_SSL_CLI_C) || \
|
||||||
!defined(POLARSSL_NET_C) || !defined(POLARSSL_RSA_C) || \
|
!defined(POLARSSL_NET_C) || !defined(POLARSSL_RSA_C) || \
|
||||||
@ -71,6 +56,22 @@ int main( int argc, char *argv[] )
|
|||||||
return( 0 );
|
return( 0 );
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
|
||||||
|
#define SERVER_PORT 4433
|
||||||
|
#define SERVER_NAME "localhost"
|
||||||
|
#define GET_REQUEST "GET / HTTP/1.0\r\n\r\n"
|
||||||
|
|
||||||
|
#define DEBUG_LEVEL 1
|
||||||
|
|
||||||
|
static void my_debug( void *ctx, int level, const char *str )
|
||||||
|
{
|
||||||
|
if( level < DEBUG_LEVEL )
|
||||||
|
{
|
||||||
|
fprintf( (FILE *) ctx, "%s", str );
|
||||||
|
fflush( (FILE *) ctx );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
int main( int argc, char *argv[] )
|
int main( int argc, char *argv[] )
|
||||||
{
|
{
|
||||||
int ret, len, server_fd;
|
int ret, len, server_fd;
|
||||||
|
@ -55,6 +55,24 @@
|
|||||||
#include "polarssl/certs.h"
|
#include "polarssl/certs.h"
|
||||||
#include "polarssl/x509.h"
|
#include "polarssl/x509.h"
|
||||||
|
|
||||||
|
#if !defined(POLARSSL_BIGNUM_C) || !defined(POLARSSL_ENTROPY_C) || \
|
||||||
|
!defined(POLARSSL_SSL_TLS_C) || !defined(POLARSSL_SSL_CLI_C) || \
|
||||||
|
!defined(POLARSSL_NET_C) || !defined(POLARSSL_RSA_C) || \
|
||||||
|
!defined(POLARSSL_CTR_DRBG_C) || !defined(POLARSSL_X509_PARSE_C)
|
||||||
|
int main( int argc, char *argv[] )
|
||||||
|
{
|
||||||
|
((void) argc);
|
||||||
|
((void) argv);
|
||||||
|
|
||||||
|
printf("POLARSSL_BIGNUM_C and/or POLARSSL_ENTROPY_C and/or "
|
||||||
|
"POLARSSL_SSL_TLS_C and/or POLARSSL_SSL_CLI_C and/or "
|
||||||
|
"POLARSSL_NET_C and/or POLARSSL_RSA_C and/or "
|
||||||
|
"POLARSSL_CTR_DRBG_C and/or POLARSSL_X509_PARSE_C "
|
||||||
|
"not defined.\n");
|
||||||
|
return( 0 );
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
|
||||||
#define DFL_SERVER_NAME "localhost"
|
#define DFL_SERVER_NAME "localhost"
|
||||||
#define DFL_SERVER_PORT 465
|
#define DFL_SERVER_PORT 465
|
||||||
#define DFL_USER_NAME "user"
|
#define DFL_USER_NAME "user"
|
||||||
@ -101,23 +119,6 @@ static void my_debug( void *ctx, int level, const char *str )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !defined(POLARSSL_BIGNUM_C) || !defined(POLARSSL_ENTROPY_C) || \
|
|
||||||
!defined(POLARSSL_SSL_TLS_C) || !defined(POLARSSL_SSL_CLI_C) || \
|
|
||||||
!defined(POLARSSL_NET_C) || !defined(POLARSSL_RSA_C) || \
|
|
||||||
!defined(POLARSSL_CTR_DRBG_C) || !defined(POLARSSL_X509_PARSE_C)
|
|
||||||
int main( int argc, char *argv[] )
|
|
||||||
{
|
|
||||||
((void) argc);
|
|
||||||
((void) argv);
|
|
||||||
|
|
||||||
printf("POLARSSL_BIGNUM_C and/or POLARSSL_ENTROPY_C and/or "
|
|
||||||
"POLARSSL_SSL_TLS_C and/or POLARSSL_SSL_CLI_C and/or "
|
|
||||||
"POLARSSL_NET_C and/or POLARSSL_RSA_C and/or "
|
|
||||||
"POLARSSL_CTR_DRBG_C and/or POLARSSL_X509_PARSE_C "
|
|
||||||
"not defined.\n");
|
|
||||||
return( 0 );
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
static int do_handshake( ssl_context *ssl, struct options *opt )
|
static int do_handshake( ssl_context *ssl, struct options *opt )
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
@ -49,22 +49,6 @@
|
|||||||
#include "polarssl/ssl_cache.h"
|
#include "polarssl/ssl_cache.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define HTTP_RESPONSE \
|
|
||||||
"HTTP/1.0 200 OK\r\nContent-Type: text/html\r\n\r\n" \
|
|
||||||
"<h2>PolarSSL Test Server</h2>\r\n" \
|
|
||||||
"<p>Successful connection using: %s</p>\r\n"
|
|
||||||
|
|
||||||
#define DEBUG_LEVEL 0
|
|
||||||
|
|
||||||
static void my_debug( void *ctx, int level, const char *str )
|
|
||||||
{
|
|
||||||
if( level < DEBUG_LEVEL )
|
|
||||||
{
|
|
||||||
fprintf( (FILE *) ctx, "%s", str );
|
|
||||||
fflush( (FILE *) ctx );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#if !defined(POLARSSL_BIGNUM_C) || !defined(POLARSSL_CERTS_C) || \
|
#if !defined(POLARSSL_BIGNUM_C) || !defined(POLARSSL_CERTS_C) || \
|
||||||
!defined(POLARSSL_ENTROPY_C) || !defined(POLARSSL_SSL_TLS_C) || \
|
!defined(POLARSSL_ENTROPY_C) || !defined(POLARSSL_SSL_TLS_C) || \
|
||||||
!defined(POLARSSL_SSL_SRV_C) || !defined(POLARSSL_NET_C) || \
|
!defined(POLARSSL_SSL_SRV_C) || !defined(POLARSSL_NET_C) || \
|
||||||
@ -82,6 +66,23 @@ int main( int argc, char *argv[] )
|
|||||||
return( 0 );
|
return( 0 );
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
|
||||||
|
#define HTTP_RESPONSE \
|
||||||
|
"HTTP/1.0 200 OK\r\nContent-Type: text/html\r\n\r\n" \
|
||||||
|
"<h2>PolarSSL Test Server</h2>\r\n" \
|
||||||
|
"<p>Successful connection using: %s</p>\r\n"
|
||||||
|
|
||||||
|
#define DEBUG_LEVEL 0
|
||||||
|
|
||||||
|
static void my_debug( void *ctx, int level, const char *str )
|
||||||
|
{
|
||||||
|
if( level < DEBUG_LEVEL )
|
||||||
|
{
|
||||||
|
fprintf( (FILE *) ctx, "%s", str );
|
||||||
|
fflush( (FILE *) ctx );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
int main( int argc, char *argv[] )
|
int main( int argc, char *argv[] )
|
||||||
{
|
{
|
||||||
int ret, len;
|
int ret, len;
|
||||||
|
@ -42,6 +42,25 @@
|
|||||||
#include "polarssl/timing.h"
|
#include "polarssl/timing.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if !defined(POLARSSL_BIGNUM_C) || !defined(POLARSSL_ENTROPY_C) || \
|
||||||
|
!defined(POLARSSL_SSL_TLS_C) || !defined(POLARSSL_SSL_SRV_C) || \
|
||||||
|
!defined(POLARSSL_SSL_CLI_C) || !defined(POLARSSL_NET_C) || \
|
||||||
|
!defined(POLARSSL_RSA_C) || !defined(POLARSSL_CTR_DRBG_C) || \
|
||||||
|
!defined(POLARSSL_X509_PARSE_C)
|
||||||
|
int main( int argc, char *argv[] )
|
||||||
|
{
|
||||||
|
((void) argc);
|
||||||
|
((void) argv);
|
||||||
|
|
||||||
|
printf("POLARSSL_BIGNUM_C and/or POLARSSL_ENTROPY_C and/or "
|
||||||
|
"POLARSSL_SSL_TLS_C and/or POLARSSL_SSL_SRV_C and/or "
|
||||||
|
"POLARSSL_SSL_CLI_C and/or POLARSSL_NET_C and/or "
|
||||||
|
"POLARSSL_RSA_C and/or POLARSSL_CTR_DRBG_C and/or "
|
||||||
|
"POLARSSL_X509_PARSE_C not defined.\n");
|
||||||
|
return( 0 );
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
|
||||||
#define OPMODE_NONE 0
|
#define OPMODE_NONE 0
|
||||||
#define OPMODE_CLIENT 1
|
#define OPMODE_CLIENT 1
|
||||||
#define OPMODE_SERVER 2
|
#define OPMODE_SERVER 2
|
||||||
@ -118,24 +137,6 @@ static void my_debug( void *ctx, int level, const char *str )
|
|||||||
fprintf( stderr, "%s", str );
|
fprintf( stderr, "%s", str );
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !defined(POLARSSL_BIGNUM_C) || !defined(POLARSSL_ENTROPY_C) || \
|
|
||||||
!defined(POLARSSL_SSL_TLS_C) || !defined(POLARSSL_SSL_SRV_C) || \
|
|
||||||
!defined(POLARSSL_SSL_CLI_C) || !defined(POLARSSL_NET_C) || \
|
|
||||||
!defined(POLARSSL_RSA_C) || !defined(POLARSSL_CTR_DRBG_C) || \
|
|
||||||
!defined(POLARSSL_X509_PARSE_C)
|
|
||||||
int main( int argc, char *argv[] )
|
|
||||||
{
|
|
||||||
((void) argc);
|
|
||||||
((void) argv);
|
|
||||||
|
|
||||||
printf("POLARSSL_BIGNUM_C and/or POLARSSL_ENTROPY_C and/or "
|
|
||||||
"POLARSSL_SSL_TLS_C and/or POLARSSL_SSL_SRV_C and/or "
|
|
||||||
"POLARSSL_SSL_CLI_C and/or POLARSSL_NET_C and/or "
|
|
||||||
"POLARSSL_RSA_C and/or POLARSSL_CTR_DRBG_C and/or "
|
|
||||||
"POLARSSL_X509_PARSE_C not defined.\n");
|
|
||||||
return( 0 );
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
/*
|
/*
|
||||||
* perform a single SSL connection
|
* perform a single SSL connection
|
||||||
*/
|
*/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user