mirror of
https://git.suyu.dev/suyu/mbedtls.git
synced 2025-12-24 00:06:32 +01:00
Introduced x509_crt_init(), x509_crl_init() and x509_csr_init()
This commit is contained in:
parent
86d0c1949e
commit
369d2eb2a2
20 changed files with 79 additions and 34 deletions
|
|
@ -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
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue