Introduced x509_crt_init(), x509_crl_init() and x509_csr_init()
diff --git a/tests/suites/test_suite_debug.function b/tests/suites/test_suite_debug.function
index eb916ba..6bc524b 100644
--- a/tests/suites/test_suite_debug.function
+++ b/tests/suites/test_suite_debug.function
@@ -30,7 +30,7 @@
ssl_context ssl;
struct buffer_data buffer;
- memset( &crt, 0, sizeof( x509_cert ) );
+ x509_crt_init( &crt );
memset( &ssl, 0, sizeof( ssl_context ) );
memset( buffer.buf, 0, 2000 );
buffer.ptr = buffer.buf;
diff --git a/tests/suites/test_suite_x509parse.function b/tests/suites/test_suite_x509parse.function
index 62a6fd5..082dd33 100644
--- a/tests/suites/test_suite_x509parse.function
+++ b/tests/suites/test_suite_x509parse.function
@@ -38,7 +38,7 @@
char buf[2000];
int res;
- memset( &crt, 0, sizeof( x509_cert ) );
+ x509_crt_init( &crt );
memset( buf, 0, 2000 );
TEST_ASSERT( x509parse_crtfile( &crt, crt_file ) == 0 );
@@ -60,7 +60,7 @@
char buf[2000];
int res;
- memset( &crl, 0, sizeof( x509_crl ) );
+ x509_crl_init( &crl );
memset( buf, 0, 2000 );
TEST_ASSERT( x509parse_crlfile( &crl, crl_file ) == 0 );
@@ -88,9 +88,9 @@
int (*f_vrfy)(void *, x509_cert *, int, int *) = NULL;
char * cn_name = NULL;
- memset( &crt, 0, sizeof( x509_cert ) );
- memset( &ca, 0, sizeof( x509_cert ) );
- memset( &crl, 0, sizeof( x509_crl ) );
+ x509_crt_init( &crt );
+ x509_crt_init( &ca );
+ x509_crl_init( &crl );
if( strcmp( cn_name_str, "NULL" ) != 0 )
cn_name = cn_name_str;
@@ -126,7 +126,7 @@
char buf[2000];
int res = 0;
- memset( &crt, 0, sizeof( x509_cert ) );
+ x509_crt_init( &crt );
memset( buf, 0, 2000 );
TEST_ASSERT( x509parse_crtfile( &crt, crt_file ) == 0 );
@@ -151,7 +151,7 @@
{
x509_cert crt;
- memset( &crt, 0, sizeof( x509_cert ) );
+ x509_crt_init( &crt );
TEST_ASSERT( x509parse_crtfile( &crt, crt_file ) == 0 );
@@ -174,7 +174,7 @@
unsigned char output[2000];
int data_len, res;
- memset( &crt, 0, sizeof( x509_cert ) );
+ x509_crt_init( &crt );
memset( buf, 0, 2000 );
memset( output, 0, 2000 );
@@ -203,7 +203,7 @@
unsigned char output[2000];
int data_len, res;
- memset( &crl, 0, sizeof( x509_crl ) );
+ x509_crl_init( &crl );
memset( buf, 0, 2000 );
memset( output, 0, 2000 );