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

@ -785,7 +785,7 @@ int x509parse_crt_der( x509_cert *chain, const unsigned char *buf, size_t buflen
prev = crt;
crt = crt->next;
memset( crt, 0, sizeof( x509_cert ) );
x509_crt_init( crt );
}
if( ( ret = x509parse_crt_der_core( crt, buf, buflen ) ) != 0 )
@ -1602,6 +1602,14 @@ int x509parse_verify( x509_cert *crt,
return( 0 );
}
/*
* Initialize a certificate chain
*/
void x509_crt_init( x509_cert *crt )
{
memset( crt, 0, sizeof(x509_cert) );
}
/*
* Unallocate all certificate data
*/