mirror of
https://git.suyu.dev/suyu/mbedtls.git
synced 2025-12-21 21:36:21 +01:00
- Made changes for better compatibility with old-style C compilers
This commit is contained in:
parent
ebb2bebbe2
commit
026c03b7f4
9 changed files with 20 additions and 19 deletions
|
|
@ -2,7 +2,7 @@
|
|||
# To compile on SunOS: add "-lsocket -lnsl" to LDFLAGS
|
||||
# To compile on MinGW: add "-lws2_32" to LDFLAGS
|
||||
|
||||
CFLAGS = -I../include -D_FILE_OFFSET_BITS=64
|
||||
CFLAGS = -I../include -D_FILE_OFFSET_BITS=64 -Wall -Wdeclaration-after-statement
|
||||
OFLAGS = -O
|
||||
LDFLAGS = -L../library -lpolarssl
|
||||
|
||||
|
|
|
|||
|
|
@ -41,7 +41,6 @@ int main( void )
|
|||
havege_state hs;
|
||||
FILE *fpub = NULL;
|
||||
FILE *fpriv = NULL;
|
||||
x509_raw cert;
|
||||
|
||||
printf( "\n . Seeding the random number generator..." );
|
||||
fflush( stdout );
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@
|
|||
#include "polarssl/md5.h"
|
||||
#include "polarssl/sha1.h"
|
||||
#include "polarssl/sha2.h"
|
||||
#include "polarssl/sha4.h"
|
||||
#include "polarssl/arc4.h"
|
||||
#include "polarssl/des.h"
|
||||
#include "polarssl/aes.h"
|
||||
|
|
|
|||
|
|
@ -38,6 +38,7 @@
|
|||
#include "polarssl/arc4.h"
|
||||
#include "polarssl/des.h"
|
||||
#include "polarssl/aes.h"
|
||||
#include "polarssl/camellia.h"
|
||||
#include "polarssl/base64.h"
|
||||
#include "polarssl/bignum.h"
|
||||
#include "polarssl/rsa.h"
|
||||
|
|
|
|||
|
|
@ -83,6 +83,8 @@ int main( void )
|
|||
* 1.2. Load own certificate
|
||||
*/
|
||||
char name[512];
|
||||
int flags;
|
||||
|
||||
snprintf(name, 512, "ssl/test-ca/%s", client_certificates[i]);
|
||||
|
||||
printf( " . Loading the client certificatei %s...", name );
|
||||
|
|
@ -105,8 +107,6 @@ int main( void )
|
|||
printf( " . Verify the client certificate with CA certificate..." );
|
||||
fflush( stdout );
|
||||
|
||||
int flags;
|
||||
|
||||
ret = x509parse_verify( &clicert, &cacert, NULL, &flags );
|
||||
if( ret != 0 )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -127,8 +127,8 @@ static int ssl_test( struct options *opt )
|
|||
int client_fd;
|
||||
int bytes_to_read;
|
||||
int bytes_to_write;
|
||||
int offset_to_read;
|
||||
int offset_to_write;
|
||||
int offset_to_read = 0;
|
||||
int offset_to_write = 0;
|
||||
|
||||
long int nb_read;
|
||||
long int nb_written;
|
||||
|
|
@ -136,8 +136,8 @@ static int ssl_test( struct options *opt )
|
|||
unsigned long read_state[5];
|
||||
unsigned long write_state[5];
|
||||
|
||||
unsigned char *read_buf;
|
||||
unsigned char *write_buf;
|
||||
unsigned char *read_buf = NULL;
|
||||
unsigned char *write_buf = NULL;
|
||||
|
||||
struct hr_time t;
|
||||
havege_state hs;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue