Introduced x509_crt_init(), x509_crl_init() and x509_csr_init()

This commit is contained in:
Paul Bakker 2013-09-18 11:58:25 +02:00
parent 86d0c1949e
commit 369d2eb2a2
20 changed files with 79 additions and 34 deletions

View file

@ -168,8 +168,8 @@ int main( int argc, char *argv[] )
* Set to sane values
*/
server_fd = 0;
memset( &cacert, 0, sizeof( x509_cert ) );
memset( &clicert, 0, sizeof( x509_cert ) );
x509_crt_init( &cacert );
x509_crt_init( &clicert );
pk_init( &pkey );
if( argc == 0 )
@ -269,7 +269,7 @@ int main( int argc, char *argv[] )
{
x509_cert crt;
x509_cert *cur = &crt;
memset( &crt, 0, sizeof( x509_cert ) );
x509_crt_init( &crt );
/*
* 1.1. Load the certificate(s)

View file

@ -208,9 +208,9 @@ int main( int argc, char *argv[] )
pk_init( &loaded_subject_key );
mpi_init( &serial );
#if defined(POLARSSL_X509_CSR_PARSE_C)
memset( &csr, 0, sizeof(x509_csr) );
x509_csr_init( &csr );
#endif
memset( &issuer_crt, 0, sizeof(x509_cert) );
x509_crt_init( &issuer_crt );
memset( buf, 0, 1024 );
if( argc == 0 )

View file

@ -76,7 +76,7 @@ int main( int argc, char *argv[] )
/*
* Set to sane values
*/
memset( &crl, 0, sizeof( x509_crl ) );
x509_crl_init( &crl );
if( argc == 0 )
{

View file

@ -76,7 +76,7 @@ int main( int argc, char *argv[] )
/*
* Set to sane values
*/
memset( &csr, 0, sizeof( x509_csr ) );
x509_csr_init( &csr );
if( argc == 0 )
{