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

@ -103,7 +103,7 @@ int x509parse_csr( x509_csr *csr, const unsigned char *buf, size_t buflen )
if( csr == NULL || buf == NULL )
return( POLARSSL_ERR_X509_BAD_INPUT_DATA );
memset( csr, 0, sizeof( x509_csr ) );
x509_csr_init( csr );
#if defined(POLARSSL_PEM_PARSE_C)
pem_init( &pem );
@ -405,6 +405,14 @@ int x509parse_csr_info( char *buf, size_t size, const char *prefix,
return( (int) ( size - n ) );
}
/*
* Initialize a CSR
*/
void x509_csr_init( x509_csr *csr )
{
memset( csr, 0, sizeof(x509_csr) );
}
/*
* Unallocate all CSR data
*/