1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2026-01-06 11:41:12 +03:00

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

@@ -279,7 +279,7 @@ int x509parse_crl( x509_crl *chain, const unsigned char *buf, size_t buflen )
}
crl = crl->next;
memset( crl, 0, sizeof( x509_crl ) );
x509_crl_init( crl );
}
#if defined(POLARSSL_PEM_PARSE_C)
@@ -514,7 +514,7 @@ int x509parse_crl( x509_crl *chain, const unsigned char *buf, size_t buflen )
}
crl = crl->next;
memset( crl, 0, sizeof( x509_crl ) );
x509_crl_init( crl );
return( x509parse_crl( crl, buf, buflen ) );
}
@@ -679,6 +679,14 @@ int x509parse_crl_info( char *buf, size_t size, const char *prefix,
return( (int) ( size - n ) );
}
/*
* Initialize a CRL chain
*/
void x509_crl_init( x509_crl *crl )
{
memset( crl, 0, sizeof(x509_crl) );
}
/*
* Unallocate all CRL data
*/