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:
@@ -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
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user